public CipherRequest(Cipher cipher)
        {
            Type           = cipher.Type;
            OrganizationId = cipher.OrganizationId;
            FolderId       = cipher.FolderId;
            Name           = cipher.Name?.EncryptedString;
            Notes          = cipher.Notes?.EncryptedString;
            Favorite       = cipher.Favorite;

            if (cipher.Fields != null)
            {
                Fields = cipher.Fields.Select(f => new FieldType(f));
            }

            if (cipher.PasswordHistory != null)
            {
                PasswordHistory = cipher.PasswordHistory.Select(h => new PasswordHistoryRequest(h));
            }

            switch (Type)
            {
            case CipherType.Login:
                Login = new LoginType(cipher);
                break;

            case CipherType.Card:
                Card = new CardType(cipher);
                break;

            case CipherType.Identity:
                Identity = new IdentityType(cipher);
                break;

            case CipherType.SecureNote:
                SecureNote = new SecureNoteType(cipher);
                break;

            default:
                break;
            }
        }
        public CipherRequest(Cipher cipher)
        {
            Type           = cipher.Type;
            OrganizationId = cipher.OrganizationId;
            FolderId       = cipher.FolderId;
            Name           = cipher.Name?.EncryptedString;
            Notes          = cipher.Notes?.EncryptedString;
            Favorite       = cipher.Favorite;

            if (cipher.Fields != null)
            {
                Fields = cipher.Fields.Select(f => new FieldDataModel
                {
                    Name  = f.Name?.EncryptedString,
                    Value = f.Value?.EncryptedString,
                    Type  = f.Type
                });
            }

            switch (Type)
            {
            case CipherType.Login:
                Login = new LoginType(cipher);
                break;

            case CipherType.Card:
                Card = new CardType(cipher);
                break;

            case CipherType.Identity:
                Identity = new IdentityType(cipher);
                break;

            case CipherType.SecureNote:
                SecureNote = new SecureNoteType(cipher);
                break;

            default:
                break;
            }
        }