<commit_before>﻿using System;
using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities;
using Bit.Core.Domains;
using Newtonsoft.Json;

namespace Bit.Api.Models
{
    public class SiteRequestModel
    {
        [StringLength(36)]
        public string FolderId { get; set; }
        public bool Favorite { get; set; }
        [Required]
        [EncryptedString]
        [StringLength(300)]
        public string Name { get; set; }
        [Required]
        [EncryptedString]
        [StringLength(5000)]
        public string Uri { get; set; }
        [EncryptedString]
        [StringLength(200)]
        public string Username { get; set; }
        [Required]
        [EncryptedString]
        [StringLength(300)]
        public string Password { get; set; }
        [EncryptedString]
        [StringLength(5000)]
        public string Notes { get; set; }

        public Cipher ToCipher(string userId = null)
        {
            return ToCipher(new Cipher
            {
                UserId = new Guid(userId)
            });<commit_msg>Do not require uri and password for sites<commit_after>﻿using System;
using System.ComponentModel.DataAnnotations;
using Bit.Api.Utilities;
using Bit.Core.Domains;
using Newtonsoft.Json;

namespace Bit.Api.Models
{
    public class SiteRequestModel
    {
        [StringLength(36)]
        public string FolderId { get; set; }
        public bool Favorite { get; set; }
        [Required]
        [EncryptedString]
        [StringLength(300)]
        public string Name { get; set; }
        [EncryptedString]
        [StringLength(5000)]
        public string Uri { get; set; }
        [EncryptedString]
        [StringLength(200)]
        public string Username { get; set; }
        [EncryptedString]
        [StringLength(300)]
        public string Password { get; set; }
        [EncryptedString]
        [StringLength(5000)]
        public string Notes { get; set; }

        public Cipher ToCipher(string userId = null)
        {
            return ToCipher(new Cipher
            {
                UserId = new Guid(userId)
            });
{'fraction_non_alphanumeric': 0.09306742640075974, 'fraction_numerical': 0.018043684710351376, 'mean_word_length': 2.053623188405797, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4880956', 'n_tokens_mistral': 610, 'n_tokens_neox': 581, 'n_words': 155}