using Bit.Core.Vault.Enums; using Bit.Seeder.Data.Distributions; using Bit.Seeder.Data.Enums; namespace Bit.Seeder.Options; /// /// Controls relationship density between users, groups, collections, and ciphers within a seeded organization. /// When null on , steps use default round-robin behavior. /// public class DensityProfile { /// /// User-to-group membership distribution shape. Defaults to Uniform (round-robin). /// public MembershipDistributionShape MembershipShape { get; init; } = MembershipDistributionShape.Uniform; /// /// Skew intensity for PowerLaw and MegaGroup shapes (0.0-1.0). Ignored for Uniform. /// public double MembershipSkew { get; init; } /// /// Minimum collections assigned per non-empty group. /// public int CollectionFanOutMin { get; init; } = 1; /// /// Maximum collections assigned per non-empty group. /// public int CollectionFanOutMax { get; init; } = 3; /// /// Distribution shape for group-to-collection fan-out. /// public CollectionFanOutShape FanOutShape { get; init; } = CollectionFanOutShape.Uniform; /// /// Fraction of groups with zero members (0.0-1.0). /// public double EmptyGroupRate { get; init; } /// /// Fraction of access paths that are direct CollectionUser assignments (0.0-1.0). /// 1.0 = all direct (current default), 0.0 = all group-mediated. /// public double DirectAccessRatio { get; init; } = 1.0; /// /// Permission type weighting for collection access assignments. /// public Distribution PermissionDistribution { get; init; } = PermissionDistributions.Enterprise; /// /// Minimum direct collections per user. /// public int UserCollectionMin { get; init; } = 1; /// /// Maximum direct collections per user. /// public int UserCollectionMax { get; init; } = 3; /// /// Distribution shape for user-to-collection direct assignments. /// public CollectionFanOutShape UserCollectionShape { get; init; } = CollectionFanOutShape.Uniform; /// /// Skew intensity for PowerLaw user-collection shape (0.0-1.0). Ignored for Uniform/FrontLoaded. /// public double UserCollectionSkew { get; init; } /// /// Cipher type distribution override. When null, falls through to Realistic. /// public Distribution? CipherTypeDistribution { get; init; } /// /// Cipher-to-collection assignment skew shape. /// public CipherCollectionSkew CipherSkew { get; init; } = CipherCollectionSkew.Uniform; /// /// Fraction of org ciphers with no collection assignment (0.0-1.0). /// public double OrphanCipherRate { get; init; } /// /// Fraction of non-orphan ciphers assigned to more than one collection (0.0-1.0). /// public double MultiCollectionRate { get; init; } /// /// Maximum number of collections a multi-collection cipher can belong to. /// public int MaxCollectionsPerCipher { get; init; } = 2; /// /// Personal cipher count distribution override. When null, uses flat countPerUser. /// public Distribution<(int Min, int Max)>? PersonalCipherDistribution { get; init; } /// /// Folder count distribution override. When null, uses FolderCountDistributions.Realistic. /// public Distribution<(int Min, int Max)>? FolderDistribution { get; init; } }