From 2b7b4b61034a84d9ae0a9d35e3aabbf2ba50b1fe Mon Sep 17 00:00:00 2001 From: idimov-keeper <78815270+idimov-keeper@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:11:07 -0500 Subject: [PATCH] KSM-557 Added new and updated PAM field types (#652) * removed ReSharper suppressions * KSM-557 Added new and updated PAM field types --- sdk/dotNet/QuickTest/Program.cs | 1 - sdk/dotNet/README.md | 1 + .../src/SecretManagement.cs | 2 - .../SecretsManagerClient.Test.cs | 2 - sdk/dotNet/SecretsManager/JsonUtils.cs | 1 - sdk/dotNet/SecretsManager/RecordData.cs | 388 +++++++----------- .../SecretsManager/SecretsManagerClient.cs | 63 --- 7 files changed, 148 insertions(+), 310 deletions(-) diff --git a/sdk/dotNet/QuickTest/Program.cs b/sdk/dotNet/QuickTest/Program.cs index e7d77a81..87752614 100644 --- a/sdk/dotNet/QuickTest/Program.cs +++ b/sdk/dotNet/QuickTest/Program.cs @@ -21,7 +21,6 @@ private static void Main() private static async Task GetSecrets() { var storage = new LocalConfigStorage("test_config_storage.json"); - // ReSharper disable once StringLiteralTypo SecretsManagerClient.InitializeStorage(storage, "US:ONE_TIME_TOKEN"); var options = new SecretsManagerOptions(storage); // var options = new SecretsManagerOptions(storage, SecretsManagerClient.CachingPostFunction); diff --git a/sdk/dotNet/README.md b/sdk/dotNet/README.md index cc10cda8..56be50d6 100644 --- a/sdk/dotNet/README.md +++ b/sdk/dotNet/README.md @@ -6,6 +6,7 @@ ## 16.6.7 * KSM-550 - Stop generating UIDs that start with "-" +* KSM-557 - Added new and updated PAM field types ## 16.6.6 diff --git a/sdk/dotNet/SecretManagement.Keeper/src/SecretManagement.cs b/sdk/dotNet/SecretManagement.Keeper/src/SecretManagement.cs index 73780dbf..3cdc44f2 100644 --- a/sdk/dotNet/SecretManagement.Keeper/src/SecretManagement.cs +++ b/sdk/dotNet/SecretManagement.Keeper/src/SecretManagement.cs @@ -46,8 +46,6 @@ public static async Task GetVaultConfigFromConfigString(string con return KeeperResult.Ok(storage.AsHashTable()); } - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] public class KeeperResult { private object result; diff --git a/sdk/dotNet/SecretsManager.Test.Core/SecretsManagerClient.Test.cs b/sdk/dotNet/SecretsManager.Test.Core/SecretsManagerClient.Test.cs index b16d43fa..d415a0e7 100644 --- a/sdk/dotNet/SecretsManager.Test.Core/SecretsManagerClient.Test.cs +++ b/sdk/dotNet/SecretsManager.Test.Core/SecretsManagerClient.Test.cs @@ -8,8 +8,6 @@ namespace SecretsManager.Test { using QueryFunction = Func>; - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class TestResponse { public string transmissionKey { get; set; } diff --git a/sdk/dotNet/SecretsManager/JsonUtils.cs b/sdk/dotNet/SecretsManager/JsonUtils.cs index e70a5ab7..931f5510 100644 --- a/sdk/dotNet/SecretsManager/JsonUtils.cs +++ b/sdk/dotNet/SecretsManager/JsonUtils.cs @@ -1,4 +1,3 @@ -using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/sdk/dotNet/SecretsManager/RecordData.cs b/sdk/dotNet/SecretsManager/RecordData.cs index 2c60db46..8d347843 100644 --- a/sdk/dotNet/SecretsManager/RecordData.cs +++ b/sdk/dotNet/SecretsManager/RecordData.cs @@ -1,12 +1,9 @@ using System; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; namespace SecretsManager { - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeeperRecordData { public string title { get; set; } @@ -16,9 +13,6 @@ public class KeeperRecordData public string notes { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeeperRecordField { public string type { get; set; } @@ -30,9 +24,6 @@ public class KeeperRecordField public object complexity { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeeperFileData { public string title { get; set; } @@ -42,9 +33,6 @@ public class KeeperFileData public long lastModified { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeeperField { public string type { get; set; } @@ -53,33 +41,28 @@ public static bool IsFieldClass(object field) { bool result = field switch { - AccountNumber or AddressRef or Addresses or BankAccounts or BirthDate or - CardRef or Checkbox or DatabaseType or Date or DirectoryType or Email or ExpirationDate or FileRef or Hosts or KeyPairs or - LicenseNumber or Login or Multiline or Names or OneTimeCode or PamHostname or Passkeys or PamResources or Password or - PaymentCards or Phones or PinCode or RecordRef or Scripts or Schedules or Secret or SecureNote or - SecurityQuestions or Text or Url => true, + AccountNumber or AddressRef or Addresses or AppFillers or BankAccounts or BirthDate or + CardRef or Checkbox or DatabaseType or Date or DirectoryType or Dropdown or + Email or ExpirationDate or FileRef or Hosts or IsSsidHidden or KeyPairs or + LicenseNumber or Login or Multiline or Names or OneTimeCode or Otp or PamHostname or + Passkeys or PamRemoteBrowserSettings or PamResources or PamSettings or Password or + PaymentCards or Phones or PinCode or RbiUrl or RecordRef or Scripts or Schedules or + Secret or SecureNote or SecurityQuestions or Text or TrafficEncryptionSeed or Url or + WifiEncryption => true, _ => false }; return result; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Login : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Login field constructor with the single value to eliminate the complexity of the passing List as a value public Login(string fieldValue) { type = "login"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PasswordComplexity { public int? length { get; set; } @@ -89,9 +72,6 @@ public class PasswordComplexity public int? special { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Password : KeeperField { public bool? required { get; set; } @@ -99,52 +79,42 @@ public class Password : KeeperField public bool? enforceGeneration { get; set; } public PasswordComplexity complexity { get; set; } public List value { get; set; } - - // Password field constructor with the single value to eliminate the complexity of the passing List as a value public Password(string fieldValue) { type = "password"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Url : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Url field constructor with the single value to eliminate the complexity of the passing List as a value public Url(string fieldValue) { type = "url"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] + // "file" - obsolete and removed legacy field - "fldt_file": { key: 'file_or_photo', default: "File or Photo" }, public class FileRef : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // FileRef field constructor with the single value to eliminate the complexity of the passing List as a value public FileRef(string fieldValue) { type = "fileRef"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class OneTimeCode : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // OneTimeCode field constructor with the single value to eliminate the complexity of the passing List as a value public OneTimeCode(string fieldValue) { type = "oneTimeCode"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] + public class Otp : KeeperField + { + public bool? required { get; set; } + public bool? privacyScreen { get; set; } + public List value { get; set; } + + public Otp(string fieldValue) { type = "otp"; value = new List { fieldValue }; } + } + public class Name { public string first { get; set; } @@ -152,161 +122,100 @@ public class Name public string last { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Names : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Names field constructor with the single value to eliminate the complexity of the passing List as a value public Names(Name fieldValue) { type = "name"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class BirthDate : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // BirthDate field constructor with the single value to eliminate the complexity of the passing List as a value public BirthDate(Int64 fieldValue) { type = "birthDate"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Date : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Date field constructor with the single value to eliminate the complexity of the passing List as a value public Date(Int64 fieldValue) { type = "date"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class ExpirationDate : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // ExpirationDate field constructor with the single value to eliminate the complexity of the passing List as a value public ExpirationDate(Int64 fieldValue) { type = "expirationDate"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Text : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Text field constructor with the single value to eliminate the complexity of the passing List as a value public Text(string fieldValue) { type = "text"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class SecurityQuestion { public string question { get; set; } public string answer { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class SecurityQuestions : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // SecurityQuestions field constructor with the single value to eliminate the complexity of the passing List as a value public SecurityQuestions(SecurityQuestion fieldValue) { type = "securityQuestion"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Multiline : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Multiline field constructor with the single value to eliminate the complexity of the passing List as a value public Multiline(string fieldValue) { type = "multiline"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Email : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Email field constructor with the single value to eliminate the complexity of the passing List as a value public Email(string fieldValue) { type = "email"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class CardRef : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // CardRef field constructor with the single value to eliminate the complexity of the passing List as a value public CardRef(string fieldValue) { type = "cardRef"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class AddressRef : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // AddressRef field constructor with the single value to eliminate the complexity of the passing List as a value public AddressRef(string fieldValue) { type = "addressRef"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PinCode : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // PinCode field constructor with the single value to eliminate the complexity of the passing List as a value public PinCode(string fieldValue) { type = "pinCode"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Phone { public string region { get; set; } // Region code. Ex. US @@ -315,61 +224,38 @@ public class Phone public string type { get; set; } // Phone number type. Ex. Mobile } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Phones : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Phones field constructor with the single value to eliminate the complexity of the passing List as a value public Phones(Phone fieldValue) { type = "phone"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Secret : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Secret field constructor with the single value to eliminate the complexity of the passing List as a value public Secret(string fieldValue) { type = "secret"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class SecureNote : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // SecureNote field constructor with the single value to eliminate the complexity of the passing List as a value public SecureNote(string fieldValue) { type = "note"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class AccountNumber : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // AccountNumber field constructor with the single value to eliminate the complexity of the passing List as a value public AccountNumber(string fieldValue) { type = "accountNumber"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PaymentCard { public string cardNumber { get; set; } @@ -377,22 +263,14 @@ public class PaymentCard public string cardSecurityCode { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PaymentCards : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // PaymentCards field constructor with the single value to eliminate the complexity of the passing List as a value public PaymentCards(PaymentCard fieldValue) { type = "paymentCard"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class BankAccount { public string accountType { get; set; } @@ -401,66 +279,42 @@ public class BankAccount public string otherType { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class BankAccounts : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // BankAccounts field constructor with the single value to eliminate the complexity of the passing List as a value public BankAccounts(BankAccount fieldValue) { type = "bankAccount"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeyPair { public string publicKey { get; set; } public string privateKey { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class KeyPairs : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // KeyPairs field constructor with the single value to eliminate the complexity of the passing List as a value public KeyPairs(KeyPair fieldValue) { type = "keyPair"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Host { public string hostName { get; set; } public string port { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Hosts : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // Hosts field constructor with the single value to eliminate the complexity of the passing List as a value public Hosts(Host fieldValue) { type = "host"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Address { public string street1 { get; set; } @@ -471,97 +325,61 @@ public class Address public string zip { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Addresses : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List
value { get; set; } - - // Addresses field constructor with the single value to eliminate the complexity of the passing List as a value public Addresses(Address fieldValue) { type = "address"; value = new List
{ fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class LicenseNumber : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // LicenseNumber field constructor with the single value to eliminate the complexity of the passing List as a value public LicenseNumber(string fieldValue) { type = "licenseNumber"; value = new List { fieldValue }; } } - //isSSIDHidden - //wifiEncryption - - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class RecordRef : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // RecordRef field constructor with the single value to eliminate the complexity of the passing List as a value public RecordRef(string fieldValue) { type = "recordRef"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Schedule { public string type { get; set; } - public string utcTime { get; set; } + public string cron { get; set; } + // utcTime - replaced by time and tz + public string time { get; set; } + public string tz { get; set; } public string weekday { get; set; } public int intervalCount { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Schedules : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // Schedules field constructor with the single value to eliminate the complexity of the passing List as a value public Schedules(Schedule fieldValue) { type = "schedule"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class DirectoryType : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // DirectoryType field constructor with the single value to eliminate the complexity of the passing List as a value public DirectoryType(string fieldValue) { type = "directoryType"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class DatabaseType : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // DatabaseType field constructor with the single value to eliminate the complexity of the passing List as a value public DatabaseType(string fieldValue) { type = "databaseType"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Script { public string fileRef { get; set; } @@ -569,9 +387,6 @@ public class Script public List recordRef { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PrivateKey { public string crv { get; set; } @@ -583,9 +398,6 @@ public class PrivateKey public string y { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Passkey { public PrivateKey privateKey { get; set; } @@ -597,76 +409,170 @@ public class Passkey public long? createdDate { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PamHostname : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List value { get; set; } - - // PamHostname field constructor with the single value to eliminate the complexity of the passing List as a value public PamHostname(Host fieldValue) { type = "pamHostname"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] + public class AllowedSettings + { + public bool? connections { get; set; } + public bool? portForwards { get; set; } + public bool? rotation { get; set; } + public bool? sessionRecording { get; set; } + public bool? typescriptRecording { get; set; } + } + public class PamResource { public string controllerUid { get; set; } public string folderUid { get; set; } public List resourceRef { get; set; } + public AllowedSettings allowedSettings { get; set; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class PamResources : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // PamResources field constructor with the single value to eliminate the complexity of the passing List as a value public PamResources(PamResource fieldValue) { type = "pamResources"; value = new List { fieldValue }; } } - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] public class Checkbox : KeeperField { public bool? required { get; set; } public List value { get; set; } - - // Checkbox field constructor with the single value to eliminate the complexity of the passing List as a value public Checkbox(bool fieldValue) { type = "checkbox"; value = new List { fieldValue }; } } - - [SuppressMessage("ReSharper", "InconsistentNaming")] - [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] + public class Scripts : KeeperField { public bool? required { get; set; } public bool? privacyScreen { get; set; } public List