diff --git a/CLAUDE.md b/CLAUDE.md index 6b422706a..db7cf80f6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -141,7 +141,7 @@ SysML2.NET.Serializer.TextualNotation - Writers/, AutoGenTextualNotationBuilder/ SysML2.NET.Dal - Data Access Layer (Assembler, ElementFactory) SysML2.NET.REST - REST client + Session SysML2.NET.Kpar - Reader/Writer for .kpar archives -SysML2.NET.Validation - FluentValidation validators for the PSM request DTOs (PSM/AutoGenValidator/, generated) +SysML2.NET.Validation - FluentValidation validators for the PSM request DTOs (PSM/AutoGenValidator/) and the Core DTOs (Core/DTO/AutoGenValidator/), generated SysML2.NET.Viewer - Blazor WebAssembly app (net9.0) SysML2.NET.CodeGenerator - Code generation tool (net10.0, not packaged) ``` diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AnnotatingElementValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AnnotatingElementValidator.cs new file mode 100644 index 000000000..6281ba9a9 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AnnotatingElementValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AnnotatingElement metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AnnotatingElementValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AnnotatingElementValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AssociationValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AssociationValidator.cs new file mode 100644 index 000000000..dd31844e2 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/AssociationValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Associations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Association metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AssociationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AssociationValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/DependencyValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/DependencyValidator.cs new file mode 100644 index 000000000..a0d6ae790 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/DependencyValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Dependencies; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Dependency metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DependencyValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DependencyValidator() + { + this.RuleFor(dto => dto.Client).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Supplier).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/EnumerationDefinitionValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/EnumerationDefinitionValidator.cs new file mode 100644 index 000000000..8451c380c --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/EnumerationDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Enumerations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the EnumerationDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class EnumerationDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public EnumerationDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureTypingValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureTypingValidator.cs new file mode 100644 index 000000000..265e15087 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureTypingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureTyping metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureTypingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureTypingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Type).NotEmpty(); + this.RuleFor(dto => dto.TypedFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureValidator.cs new file mode 100644 index 000000000..bf29f693a --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FeatureValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Feature metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FlowValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FlowValidator.cs new file mode 100644 index 000000000..e675925ef --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FlowValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Flow metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FlowValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FlowValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FramedConcernMembershipValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FramedConcernMembershipValidator.cs new file mode 100644 index 000000000..f41cfd6b9 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/FramedConcernMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.Requirements; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FramedConcernMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FramedConcernMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FramedConcernMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralIntegerValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralIntegerValidator.cs new file mode 100644 index 000000000..3b1031fe3 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralIntegerValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralInteger metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralIntegerValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralIntegerValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralRationalValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralRationalValidator.cs new file mode 100644 index 000000000..fdfcbf134 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/LiteralRationalValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralRational metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralRationalValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralRationalValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MembershipValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MembershipValidator.cs new file mode 100644 index 000000000..f6dce33e5 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Membership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.MemberElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MultiplicityRangeValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MultiplicityRangeValidator.cs new file mode 100644 index 000000000..4b2ebaf62 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/MultiplicityRangeValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Multiplicities; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MultiplicityRange metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MultiplicityRangeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MultiplicityRangeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/OwningMembershipValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/OwningMembershipValidator.cs new file mode 100644 index 000000000..b6fc18797 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/OwningMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the OwningMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class OwningMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public OwningMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/ReferenceSubsettingValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/ReferenceSubsettingValidator.cs new file mode 100644 index 000000000..37e72fb2f --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/ReferenceSubsettingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ReferenceSubsetting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ReferenceSubsettingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ReferenceSubsettingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.ReferencedFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/RequirementUsageValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/RequirementUsageValidator.cs new file mode 100644 index 000000000..f15c9d6f5 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/RequirementUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RequirementUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RequirementUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RequirementUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SelectExpressionValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SelectExpressionValidator.cs new file mode 100644 index 000000000..26ccf3cd8 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SelectExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SelectExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SelectExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SelectExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SubclassificationValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SubclassificationValidator.cs new file mode 100644 index 000000000..c8afee987 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/SubclassificationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Classifiers; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Subclassification metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SubclassificationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SubclassificationValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Subclassifier).NotEmpty(); + this.RuleFor(dto => dto.Superclassifier).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/TextualRepresentationValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/TextualRepresentationValidator.cs new file mode 100644 index 000000000..7fe701395 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/TextualRepresentationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TextualRepresentation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TextualRepresentationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TextualRepresentationValidator() + { + this.RuleFor(dto => dto.Body).NotNull(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Language).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/UsageValidator.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/UsageValidator.cs new file mode 100644 index 000000000..ba8753393 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoValidators/UsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Usage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class UsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public UsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGeneratorTestFixture.cs new file mode 100644 index 000000000..dea85d87e --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGeneratorTestFixture.cs @@ -0,0 +1,79 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators +{ + using System; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators; + using SysML2.NET.CodeGenerator.Tests.Expected.Ecore.Core; + + using uml4net.StructuredClassifiers; + + [TestFixture] + public class UmlCoreDtoValidatorGeneratorTestFixture + { + private DirectoryInfo outputDirectory; + private UmlCoreDtoValidatorGenerator umlCoreDtoValidatorGenerator; + + [OneTimeSetUp] + public void SetUp() + { + var directoryInfo = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + + this.outputDirectory = directoryInfo.CreateSubdirectory(Path.Combine("UML", "_SysML2.NET.Validation.Core.DTO")); + this.umlCoreDtoValidatorGenerator = new UmlCoreDtoValidatorGenerator(); + } + + [Test] + public async Task VerifyGenerateAsync() + { + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateAsync(null, this.outputDirectory), Throws.TypeOf()); + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateAsync(GeneratorSetupFixture.XmiReaderResult, null), Throws.TypeOf()); + + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateAsync(GeneratorSetupFixture.XmiReaderResult, this.outputDirectory), Throws.Nothing); + + var expectedFileNames = GeneratorSetupFixture.XmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(package => package.PackagedElement.OfType()) + .Where(@class => !@class.IsAbstract) + .Select(@class => $"{@class.Name}Validator.cs"); + + var generatedFileNames = this.outputDirectory.GetFiles("*Validator.cs").Select(file => file.Name).ToList(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(generatedFileNames, Is.EquivalentTo(expectedFileNames)); + Assert.That(generatedFileNames, Does.Not.Contain("ElementValidator.cs")); + } + } + + [Test] + [TestCaseSource(typeof(ExpectedConcreteClasses))] + [Category("Expected")] + public async Task VerifyGenerateDtoValidatorAsync(string className) + { + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateDtoValidatorAsync(null, this.outputDirectory, className), Throws.TypeOf()); + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateDtoValidatorAsync(GeneratorSetupFixture.XmiReaderResult, null, className), Throws.TypeOf()); + await Assert.ThatAsync(() => this.umlCoreDtoValidatorGenerator.GenerateDtoValidatorAsync(GeneratorSetupFixture.XmiReaderResult, this.outputDirectory, " "), Throws.TypeOf()); + + var generatedCode = await this.umlCoreDtoValidatorGenerator.GenerateDtoValidatorAsync(GeneratorSetupFixture.XmiReaderResult, this.outputDirectory, className); + + var expected = await File.ReadAllTextAsync(Path.Combine(TestContext.CurrentContext.TestDirectory, + $"Expected/UML/Core/AutoGenDtoValidators/{className}Validator.cs")); + + Assert.That(generatedCode, Is.EqualTo(expected)); + } + } +} diff --git a/SysML2.NET.CodeGenerator.Tests/HandleBarHelpers/DtoValidatorHelperTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/HandleBarHelpers/DtoValidatorHelperTestFixture.cs new file mode 100644 index 000000000..03087264f --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/HandleBarHelpers/DtoValidatorHelperTestFixture.cs @@ -0,0 +1,175 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text.RegularExpressions; + + using HandlebarsDotNet; + using HandlebarsDotNet.Helpers; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.HandleBarHelpers; + + using uml4net.Extensions; + using uml4net.StructuredClassifiers; + + [TestFixture] + public partial class DtoValidatorHelperTestFixture + { + private List concreteClasses; + + [OneTimeSetUp] + public void OneTimeSetUp() + { + this.concreteClasses = GeneratorSetupFixture.XmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .ToList(); + } + + [Test] + public void VerifyQueryCollectionCountRule() + { + using (Assert.EnterMultipleScope()) + { + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(0, int.MaxValue), Is.Null); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(0, 3), Is.EqualTo(".Must(value => value == null || value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, int.MaxValue), Is.EqualTo(".NotEmpty()")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, int.MaxValue), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count >= 2)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, 3), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, 5), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count >= 2).Must(value => value.Count <= 5)")); + } + } + + [Test] + public void VerifyQueryRules() + { + Assert.That(() => DtoValidatorHelper.QueryRules(null), Throws.TypeOf()); + + var membership = this.QueryClass("Membership"); + var owningMembership = this.QueryClass("OwningMembership"); + var feature = this.QueryClass("Feature"); + + List membershipRules = + [ + "this.RuleFor(dto => dto.ElementId).NotNull();", + "this.RuleFor(dto => dto.MemberElement).NotEmpty();", + "this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty();", + "this.RuleFor(dto => dto.Visibility).IsInEnum();" + ]; + + using (Assert.EnterMultipleScope()) + { + Assert.That(DtoValidatorHelper.QueryRules(membership), Is.EqualTo(membershipRules)); + + Assert.That(QueryValidatedPropertyNames(owningMembership), Does.Not.Contain("MemberElement")); + Assert.That(QueryValidatedPropertyNames(owningMembership), Does.Not.Contain("OwnedMemberElement")); + Assert.That(DtoValidatorHelper.QueryRules(owningMembership), Does.Contain("this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty();")); + Assert.That(DtoValidatorHelper.QueryRules(this.QueryClass("FeatureMembership")), Does.Contain("this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty();")); + Assert.That(DtoValidatorHelper.QueryRules(this.QueryClass("ConjugatedPortDefinition")), Does.Contain("this.RuleFor(dto => dto.OwnedRelationship).NotEmpty();")); + + Assert.That(QueryValidatedPropertyNames(this.QueryClass("PortDefinition")), Does.Not.Contain("OwnedRelationship")); + Assert.That(QueryValidatedPropertyNames(feature), Does.Not.Contain("OwnedRelationship")); + Assert.That(QueryValidatedPropertyNames(this.QueryClass("Dependency")), Does.Not.Contain("OwnedRelatedElement")); + + Assert.That(QueryValidatedPropertyNames(feature), Does.Not.Contain("IsComposite")); + Assert.That(QueryValidatedPropertyNames(feature), Does.Not.Contain("DeclaredName")); + Assert.That(QueryValidatedPropertyNames(this.QueryClass("LiteralInteger")), Does.Not.Contain("Value")); + } + + var rulesByClass = this.concreteClasses + .Select(@class => (@class.Name, Rules: DtoValidatorHelper.QueryRules(@class))) + .ToList(); + + var derivedViolations = this.concreteClasses + .SelectMany(@class => QueryValidatedPropertyNames(@class) + .Intersect(QueryDerivedPropertyNames(@class)) + .Select(propertyName => $"{@class.Name}.{propertyName}")) + .ToList(); + + var forbiddenRules = rulesByClass + .SelectMany(entry => entry.Rules) + .Where(rule => rule.Contains("RuleForEach") || rule.Contains("Distinct()") || rule.Contains("HasValue")) + .ToList(); + + var classesWithRepeatedProperty = rulesByClass + .Where(entry => entry.Rules.Select(QuerySelectedPropertyName).Distinct().Count() != entry.Rules.Count) + .Select(entry => entry.Name) + .ToList(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(derivedViolations, Is.Empty); + Assert.That(forbiddenRules, Is.Empty); + Assert.That(classesWithRepeatedProperty, Is.Empty); + } + } + + [Test] + public void VerifyRegisterDtoValidatorHelper() + { + Assert.That(() => ((IHandlebars)null).RegisterDtoValidatorHelper(), Throws.TypeOf()); + + var handlebars = Handlebars.CreateSharedEnvironment(); + HandlebarsHelpers.Register(handlebars); + handlebars.RegisterDtoValidatorHelper(); + + var template = handlebars.Compile("{{DtoValidator.WriteRules this}}"); + + using (Assert.EnterMultipleScope()) + { + Assert.That(template(this.QueryClass("Membership")), Does.Contain("this.RuleFor(dto => dto.MemberElement).NotEmpty();")); + Assert.That(template(this.QueryClass("Membership")), Does.Contain("=>")); + Assert.That(() => template(new { }), Throws.TypeOf()); + Assert.That(() => handlebars.Compile("{{DtoValidator.WriteRules}}")(new { }), Throws.TypeOf()); + } + } + + private static string QuerySelectedPropertyName(string rule) + { + return RuleSelectorRegex().Match(rule).Groups[1].Value; + } + + private static HashSet QueryValidatedPropertyNames(IClass @class) + { + return DtoValidatorHelper.QueryRules(@class) + .Select(QuerySelectedPropertyName) + .ToHashSet(StringComparer.Ordinal); + } + + private static HashSet QueryDerivedPropertyNames(IClass @class) + { + var properties = @class.QueryAllProperties(); + + var nonDerivedNames = properties + .Where(property => !property.IsDerived && !property.IsDerivedUnion) + .Select(property => property.Name.CapitalizeFirstLetter()); + + return properties + .Where(property => property.IsDerived || property.IsDerivedUnion) + .Select(property => property.Name.CapitalizeFirstLetter()) + .Except(nonDerivedNames) + .ToHashSet(StringComparer.Ordinal); + } + + [GeneratedRegex(@"dto => dto\.(\w+)")] + private static partial Regex RuleSelectorRegex(); + + private IClass QueryClass(string name) + { + return this.concreteClasses.Single(x => x.Name == name); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGenerator.cs new file mode 100644 index 000000000..47fdcce9b --- /dev/null +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoValidatorGenerator.cs @@ -0,0 +1,154 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.HandleBarHelpers; + + using uml4net.Extensions; + using uml4net.StructuredClassifiers; + using uml4net.xmi.Readers; + + /// + /// UML based handlebars generator for the FluentValidation validators of the core data transfer objects + /// + public class UmlCoreDtoValidatorGenerator : UmlHandleBarsGenerator + { + /// + /// The name of the template that generates a DTO validator + /// + private const string ValidatorTemplateName = "core-dto-validator-uml-template"; + + /// + /// Generates the validators of the concrete classes of the UML model + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// + /// an awaitable + /// + public override Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(outputDirectory); + + return this.GenerateInternalAsync(xmiReaderResult, outputDirectory); + } + + /// + /// Generates the validator of the specified class + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// + /// The name of the class to generate the validator for + /// + /// + /// The generated code + /// + public Task GenerateDtoValidatorAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory, string name) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(outputDirectory); + ArgumentException.ThrowIfNullOrWhiteSpace(name); + + return this.WriteValidatorAsync(QueryValidatedClasses(xmiReaderResult).Single(x => x.Name == name), outputDirectory); + } + + /// + /// Register the custom helpers + /// + protected override void RegisterHelpers() + { + this.Handlebars.RegisterClassHelper(); + this.Handlebars.RegisterNamedElementHelper(); + this.Handlebars.RegisterDtoValidatorHelper(); + } + + /// + /// Register the code templates + /// + protected override void RegisterTemplates() + { + this.RegisterTemplate(ValidatorTemplateName); + } + + /// + /// Queries the concrete classes that a validator is generated for + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The concrete classes of the UML model + /// + private static IEnumerable QueryValidatedClasses(XmiReaderResult xmiReaderResult) + { + return xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract); + } + + /// + /// Generates the validators of the concrete classes of the UML model + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// + /// an awaitable + /// + private async Task GenerateInternalAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + foreach (var @class in QueryValidatedClasses(xmiReaderResult)) + { + await this.WriteValidatorAsync(@class, outputDirectory); + } + } + + /// + /// Applies the validator template to the class and writes the result to disk + /// + /// + /// The to generate the validator for + /// + /// + /// The target + /// + /// + /// The generated code + /// + private async Task WriteValidatorAsync(IClass @class, DirectoryInfo outputDirectory) + { + var generatedCode = this.CodeCleanup(this.Templates[ValidatorTemplateName](@class)); + + await WriteAsync(generatedCode, outputDirectory, $"{@class.Name}Validator.cs"); + + return generatedCode; + } + } +} diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/DtoValidatorHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/DtoValidatorHelper.cs new file mode 100644 index 000000000..2b651b0c4 --- /dev/null +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/DtoValidatorHelper.cs @@ -0,0 +1,213 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.HandleBarHelpers +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using HandlebarsDotNet; + + using SysML2.NET.CodeGenerator.Extensions; + + using uml4net.Classification; + using uml4net.Extensions; + using uml4net.SimpleClassifiers; + using uml4net.StructuredClassifiers; + + /// + /// A handlebars block helper that writes the FluentValidation rules derived from the non-derived properties of an + /// + public static class DtoValidatorHelper + { + /// + /// Queries the rule statements derived from every non-derived property of the class that is not redefined in it + /// + /// The that the validator validates. + /// The rule statements, ordered by property name. + public static List QueryRules(IClass @class) + { + ArgumentNullException.ThrowIfNull(@class); + + var properties = @class.QueryAllProperties() + .Where(property => !property.TryQueryRedefinedByProperty(@class, out _)) + .ToList(); + + var requiredDerivedProperties = properties + .Where(property => (property.IsDerived || property.IsDerivedUnion) && property.Lower > 0) + .Select(property => (property.Lower, SupersetIds: QueryTransitiveIds(property, current => current.RedefinedProperty.Concat(current.SubsettedProperty)))) + .ToList(); + + return properties + .Where(property => !property.IsDerived && !property.IsDerivedUnion) + .OrderBy(property => property.Name.CapitalizeFirstLetter(), StringComparer.Ordinal) + .SelectMany(property => QueryPropertyRules(property, QueryEffectiveLower(property, requiredDerivedProperties))) + .ToList(); + } + + /// + /// Registers the + /// + /// + /// The context with which the helper needs to be registered + /// + public static void RegisterDtoValidatorHelper(this IHandlebars handlebars) + { + ArgumentNullException.ThrowIfNull(handlebars); + + handlebars.RegisterHelper("DtoValidator.WriteRules", (writer, _, arguments) => + { + if (arguments.Length != 1) + { + throw new HandlebarsException("{{#DtoValidator.WriteRules}} helper must have exactly one argument"); + } + + var @class = arguments[0] as IClass ?? throw new ArgumentException("supposed to be IClass"); + + foreach (var rule in QueryRules(@class)) + { + writer.WriteSafeString(rule + Environment.NewLine); + } + }); + } + + /// + /// Queries the single rule chain that enforces the lower and upper bounds of a collection + /// + /// The lower bound of the collection. + /// The upper bound of the collection, when unbounded. + /// The rule chain appended to RuleFor, or null when the bounds demand nothing. + internal static string QueryCollectionCountRule(int lower, int upper) + { + var isBounded = upper != int.MaxValue; + + if (lower == 0) + { + return isBounded ? $".Must(value => value == null || value.Count <= {upper})" : null; + } + + List validators = [".NotEmpty()"]; + + if (lower > 1) + { + validators.Add($".Must(value => value.Count >= {lower})"); + } + + if (isBounded) + { + validators.Add($".Must(value => value.Count <= {upper})"); + } + + var chain = string.Concat(validators); + + return validators.Count > 1 ? ".Cascade(CascadeMode.Stop)" + chain : chain; + } + + /// + /// Queries the rule statements of a property whose upper bound is greater than one + /// + /// The collection . + /// The effective lower bound of the property. + /// The lambda that selects the property on the DTO. + /// The rule statements. + private static IEnumerable QueryCollectionRules(IProperty property, int lower, string selector) + { + var countRule = QueryCollectionCountRule(lower, property.QueryUpperValue()); + + if (countRule != null) + { + yield return $"this.RuleFor({selector}){countRule};"; + } + } + + /// + /// Queries the lower bound of a non-derived property, raised by every required derived property that subsets or redefines it + /// + /// The non-derived . + /// The lower bound and the superset ids of each required derived property of the class. + /// The effective lower bound. + private static int QueryEffectiveLower(IProperty property, List<(int Lower, HashSet SupersetIds)> requiredDerivedProperties) + { + var redefinitionChainIds = QueryTransitiveIds(property, current => current.RedefinedProperty); + + return requiredDerivedProperties + .Where(derived => derived.SupersetIds.Overlaps(redefinitionChainIds)) + .Select(derived => derived.Lower) + .Append(property.Lower) + .Max(); + } + + /// + /// Queries the rule statements derived from the multiplicity and the type of one property + /// + /// The non-derived . + /// The effective lower bound of the property. + /// The rule statements. + private static IEnumerable QueryPropertyRules(IProperty property, int lower) + { + var selector = $"dto => dto.{property.Name.CapitalizeFirstLetter()}"; + + return property.QueryIsEnumerable() + ? QueryCollectionRules(property, lower, selector) + : QueryScalarRules(property, lower, selector); + } + + /// + /// Queries the rule statements of a property whose upper bound is one + /// + /// The scalar . + /// The effective lower bound of the property. + /// The lambda that selects the property on the DTO. + /// The rule statements. + private static IEnumerable QueryScalarRules(IProperty property, int lower, string selector) + { + switch (property.Type) + { + case IEnumeration: + yield return $"this.RuleFor({selector}).IsInEnum();"; + break; + case IDataType when property.QueryIsString() && lower > 0: + yield return $"this.RuleFor({selector}).NotNull();"; + break; + case IDataType: + break; + default: + if (lower > 0) + { + yield return $"this.RuleFor({selector}).NotEmpty();"; + } + + break; + } + } + + /// + /// Queries the ids of the property and of every property transitively reached through the given edges + /// + /// The to start from. + /// The edges followed from each visited property. + /// The ids of the property and of every property reached. + private static HashSet QueryTransitiveIds(IProperty property, Func> next) + { + HashSet visited = [property.XmiId]; + var queue = new Queue([property]); + + while (queue.Count > 0) + { + foreach (var reached in next(queue.Dequeue()).Where(reached => visited.Add(reached.XmiId))) + { + queue.Enqueue(reached); + } + } + + return visited; + } + } +} diff --git a/SysML2.NET.CodeGenerator/Properties/AssemblyInfo.cs b/SysML2.NET.CodeGenerator/Properties/AssemblyInfo.cs index fe319c5d2..eae02206a 100644 --- a/SysML2.NET.CodeGenerator/Properties/AssemblyInfo.cs +++ b/SysML2.NET.CodeGenerator/Properties/AssemblyInfo.cs @@ -8,5 +8,7 @@ // ------------------------------------------------------------------------------------------------ using System; +using System.Runtime.CompilerServices; [assembly: CLSCompliant(false)] +[assembly: InternalsVisibleTo("SysML2.NET.CodeGenerator.Tests")] diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index e55fdfd51..d0c7bfdd2 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -118,6 +118,9 @@ Always + + Always + Always diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-validator-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-validator-uml-template.hbs new file mode 100644 index 000000000..ce85b369b --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-validator-uml-template.hbs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + {{ #Class.WriteEnumerationNameSpaces this}} + using SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the {{this.Name}} metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class {{this.Name}}Validator : DtoValidator<{{this.Name}}> + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public {{this.Name}}Validator() + { + {{#DtoValidator.WriteRules this}} + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidatorTestFixture.cs new file mode 100644 index 000000000..ac52407bf --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidatorTestFixture.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Systems.Ports; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class ConjugatedPortDefinitionValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new ConjugatedPortDefinitionValidator(); + var conjugatedPortDefinition = new ConjugatedPortDefinition { Id = Guid.NewGuid(), ElementId = "the element id", OwnedRelationship = [Guid.NewGuid()] }; + + Assert.That(validator.Validate(conjugatedPortDefinition).IsValid, Is.True); + + conjugatedPortDefinition.OwnedRelationship = []; + + Assert.That(validator.Validate(conjugatedPortDefinition).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwnedRelationship"])); + + conjugatedPortDefinition.OwnedRelationship = null; + + Assert.That(validator.Validate(conjugatedPortDefinition).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwnedRelationship"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/DependencyValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/DependencyValidatorTestFixture.cs new file mode 100644 index 000000000..f7c3993ce --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/DependencyValidatorTestFixture.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Root.Dependencies; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class DependencyValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new DependencyValidator(); + var dependency = new Dependency { Id = Guid.NewGuid(), ElementId = "the element id", Client = [Guid.NewGuid()], Supplier = [Guid.NewGuid()] }; + + Assert.That(validator.Validate(dependency).IsValid, Is.True); + + dependency.Client = []; + + Assert.That(validator.Validate(dependency).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Client"])); + + dependency.Supplier = null; + + Assert.That(validator.Validate(dependency).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Client", "Supplier"])); + + dependency.Client = [Guid.NewGuid(), Guid.NewGuid()]; + dependency.Supplier = [Guid.NewGuid()]; + + Assert.That(validator.Validate(dependency).IsValid, Is.True); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/FeatureValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/FeatureValidatorTestFixture.cs new file mode 100644 index 000000000..1ed26a897 --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/FeatureValidatorTestFixture.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Core.Features; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class FeatureValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new FeatureValidator(); + var feature = new Feature { Id = Guid.NewGuid(), ElementId = "the element id" }; + + Assert.That(validator.Validate(feature).IsValid, Is.True); + + feature.Direction = FeatureDirectionKind.Inout; + + Assert.That(validator.Validate(feature).IsValid, Is.True); + + feature.Direction = (FeatureDirectionKind)int.MaxValue; + + Assert.That(validator.Validate(feature).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Direction"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/LiteralStringValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/LiteralStringValidatorTestFixture.cs new file mode 100644 index 000000000..828e3189f --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/LiteralStringValidatorTestFixture.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Kernel.Expressions; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class LiteralStringValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new LiteralStringValidator(); + var literalString = new LiteralString { Id = Guid.NewGuid(), ElementId = "the element id", Value = "the value" }; + + Assert.That(validator.Validate(literalString).IsValid, Is.True); + + literalString.Value = string.Empty; + + Assert.That(validator.Validate(literalString).IsValid, Is.True); + + literalString.Value = null; + + Assert.That(validator.Validate(literalString).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Value"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/MembershipValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/MembershipValidatorTestFixture.cs new file mode 100644 index 000000000..8d29a975a --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/MembershipValidatorTestFixture.cs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Root.Namespaces; + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class MembershipValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new MembershipValidator(); + var relationshipId = Guid.NewGuid(); + var membership = new Membership { Id = Guid.NewGuid(), ElementId = "the element id", MemberElement = Guid.NewGuid(), OwningRelatedElement = Guid.NewGuid() }; + + Assert.That(validator.Validate(membership).IsValid, Is.True); + + membership.OwningRelatedElement = null; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwningRelatedElement"])); + + membership.OwningRelatedElement = Guid.NewGuid(); + + membership.MemberElement = Guid.Empty; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["MemberElement"])); + + membership.MemberElement = Guid.NewGuid(); + membership.ElementId = null; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["ElementId"])); + + membership.ElementId = string.Empty; + membership.OwningRelationship = Guid.Empty; + membership.OwnedRelationship = [relationshipId, relationshipId, Guid.Empty]; + membership.AliasIds = [null, null]; + + Assert.That(validator.Validate(membership).IsValid, Is.True); + + membership.OwnedRelationship = null; + membership.AliasIds = null; + + Assert.That(validator.Validate(membership).IsValid, Is.True); + + membership.Visibility = (VisibilityKind)int.MaxValue; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Visibility"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/OwningMembershipValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/OwningMembershipValidatorTestFixture.cs new file mode 100644 index 000000000..6cc41d1fd --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/OwningMembershipValidatorTestFixture.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Root.Namespaces; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class OwningMembershipValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new OwningMembershipValidator(); + var owningMembership = new OwningMembership { Id = Guid.NewGuid(), ElementId = "the element id", OwnedRelatedElement = [Guid.NewGuid()], OwningRelatedElement = Guid.NewGuid() }; + + Assert.That(validator.Validate(owningMembership).IsValid, Is.True); + + owningMembership.OwningRelatedElement = null; + + Assert.That(validator.Validate(owningMembership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwningRelatedElement"])); + + owningMembership.OwningRelatedElement = Guid.NewGuid(); + + owningMembership.OwnedRelatedElement = []; + + Assert.That(validator.Validate(owningMembership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwnedRelatedElement"])); + + owningMembership.OwnedRelatedElement = null; + + Assert.That(validator.Validate(owningMembership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwnedRelatedElement"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidatorTestFixture.cs new file mode 100644 index 000000000..daf81fc45 --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidatorTestFixture.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO.AutoGenValidator +{ + using System; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Systems.Requirements; + using SysML2.NET.Core.Systems.Requirements; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class RequirementConstraintMembershipValidatorTestFixture + { + [Test] + public void VerifyValidate() + { + var validator = new RequirementConstraintMembershipValidator(); + var membership = new RequirementConstraintMembership + { + Id = Guid.NewGuid(), ElementId = "the element id", Kind = RequirementConstraintKind.Requirement, + OwnedRelatedElement = [Guid.NewGuid()], OwningRelatedElement = Guid.NewGuid() + }; + + Assert.That(validator.Validate(membership).IsValid, Is.True); + + membership.OwnedRelatedElement = []; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["OwnedRelatedElement"])); + + membership.OwnedRelatedElement = [Guid.NewGuid()]; + membership.Kind = (RequirementConstraintKind)int.MaxValue; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["Kind"])); + } + } +} diff --git a/SysML2.NET.Validation.Tests/Core/DTO/DtoValidatorTestFixture.cs b/SysML2.NET.Validation.Tests/Core/DTO/DtoValidatorTestFixture.cs new file mode 100644 index 000000000..271dc92ff --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/DtoValidatorTestFixture.cs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Tests.Core.DTO +{ + using System; + using System.Linq; + + using FluentValidation; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Root.Annotations; + using SysML2.NET.Validation.Core.DTO; + + [TestFixture] + public class DtoValidatorTestFixture + { + [Test] + public void VerifyAddCustomValidation() + { + var comment = new Comment { Id = Guid.NewGuid(), Body = "the body" }; + + Assert.That(new ValidatorWithoutCustomValidation().Validate(comment).IsValid, Is.True); + + var validator = new ValidatorWithCustomValidation(); + + Assert.That(validator.Validate(comment).IsValid, Is.True); + + comment.Body = " "; + + Assert.That(validator.Validate(comment).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo([nameof(Comment.Body)])); + Assert.That(new ValidatorWithoutCustomValidation().Validate(comment).IsValid, Is.True); + + comment.Id = Guid.Empty; + + Assert.That(new ValidatorWithoutCustomValidation().Validate(comment).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo([nameof(Comment.Id)])); + } + + private sealed class ValidatorWithoutCustomValidation : DtoValidator + { + } + + private sealed class ValidatorWithCustomValidation : DtoValidator + { + protected override void AddCustomValidation() + { + base.AddCustomValidation(); + + this.RuleFor(dto => dto.Body).Must(value => !string.IsNullOrWhiteSpace(value)); + } + } + } +} diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AcceptActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AcceptActionUsageValidator.cs new file mode 100644 index 000000000..8a622912a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AcceptActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AcceptActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AcceptActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AcceptActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionDefinitionValidator.cs new file mode 100644 index 000000000..8a8450186 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ActionDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ActionDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ActionDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionUsageValidator.cs new file mode 100644 index 000000000..eafc48f3f --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActorMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActorMembershipValidator.cs new file mode 100644 index 000000000..85859c292 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ActorMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ActorMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ActorMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ActorMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationDefinitionValidator.cs new file mode 100644 index 000000000..5bbcad407 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Allocations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AllocationDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AllocationDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AllocationDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationUsageValidator.cs new file mode 100644 index 000000000..5d930f03b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AllocationUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Allocations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AllocationUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AllocationUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AllocationUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseDefinitionValidator.cs new file mode 100644 index 000000000..e3045b19f --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.AnalysisCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AnalysisCaseDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AnalysisCaseDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AnalysisCaseDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseUsageValidator.cs new file mode 100644 index 000000000..dc08f2963 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnalysisCaseUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.AnalysisCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AnalysisCaseUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AnalysisCaseUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AnalysisCaseUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotatingElementValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotatingElementValidator.cs new file mode 100644 index 000000000..6281ba9a9 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotatingElementValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AnnotatingElement metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AnnotatingElementValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AnnotatingElementValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotationValidator.cs new file mode 100644 index 000000000..029f356e5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AnnotationValidator.cs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Annotation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AnnotationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AnnotationValidator() + { + this.RuleFor(dto => dto.AnnotatedElement).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssertConstraintUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssertConstraintUsageValidator.cs new file mode 100644 index 000000000..06be1f2e6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssertConstraintUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Constraints; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AssertConstraintUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AssertConstraintUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AssertConstraintUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssignmentActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssignmentActionUsageValidator.cs new file mode 100644 index 000000000..aa63ada63 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssignmentActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AssignmentActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AssignmentActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AssignmentActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationStructureValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationStructureValidator.cs new file mode 100644 index 000000000..267784d93 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationStructureValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Associations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AssociationStructure metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AssociationStructureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AssociationStructureValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationValidator.cs new file mode 100644 index 000000000..dd31844e2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AssociationValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Associations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Association metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AssociationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AssociationValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeDefinitionValidator.cs new file mode 100644 index 000000000..867e57f7a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Attributes; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AttributeDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AttributeDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AttributeDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeUsageValidator.cs new file mode 100644 index 000000000..18c664088 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/AttributeUsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.Attributes; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the AttributeUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class AttributeUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public AttributeUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BehaviorValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BehaviorValidator.cs new file mode 100644 index 000000000..09fd6b61d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BehaviorValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Behaviors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Behavior metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class BehaviorValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public BehaviorValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorAsUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorAsUsageValidator.cs new file mode 100644 index 000000000..293e99e2d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorAsUsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.Connections; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the BindingConnectorAsUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class BindingConnectorAsUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public BindingConnectorAsUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorValidator.cs new file mode 100644 index 000000000..4f2d4b916 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BindingConnectorValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Connectors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the BindingConnector metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class BindingConnectorValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public BindingConnectorValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BooleanExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BooleanExpressionValidator.cs new file mode 100644 index 000000000..97b11653c --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/BooleanExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the BooleanExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class BooleanExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public BooleanExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationDefinitionValidator.cs new file mode 100644 index 000000000..e544af7b5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Calculations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CalculationDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CalculationDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CalculationDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationUsageValidator.cs new file mode 100644 index 000000000..73f93a3b2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CalculationUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Calculations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CalculationUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CalculationUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CalculationUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseDefinitionValidator.cs new file mode 100644 index 000000000..48723784d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Cases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CaseDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CaseDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CaseDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseUsageValidator.cs new file mode 100644 index 000000000..f01951b33 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CaseUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Cases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CaseUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CaseUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CaseUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassValidator.cs new file mode 100644 index 000000000..bda654955 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Classes; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Class metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ClassValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ClassValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassifierValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassifierValidator.cs new file mode 100644 index 000000000..d080b60b5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ClassifierValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Classifiers; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Classifier metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ClassifierValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ClassifierValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CollectExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CollectExpressionValidator.cs new file mode 100644 index 000000000..e82608712 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CollectExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CollectExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CollectExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CollectExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CommentValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CommentValidator.cs new file mode 100644 index 000000000..cf419035b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CommentValidator.cs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Comment metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CommentValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CommentValidator() + { + this.RuleFor(dto => dto.Body).NotNull(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernDefinitionValidator.cs new file mode 100644 index 000000000..3e68e17d2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConcernDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConcernDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConcernDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernUsageValidator.cs new file mode 100644 index 000000000..d25dbb76f --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConcernUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConcernUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConcernUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConcernUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidator.cs new file mode 100644 index 000000000..6c6969a94 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidator.cs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Ports; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConjugatedPortDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConjugatedPortDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConjugatedPortDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelationship).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortTypingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortTypingValidator.cs new file mode 100644 index 000000000..bdb4eb0f2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugatedPortTypingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Ports; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConjugatedPortTyping metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConjugatedPortTypingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConjugatedPortTypingValidator() + { + this.RuleFor(dto => dto.ConjugatedPortDefinition).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.TypedFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugationValidator.cs new file mode 100644 index 000000000..8c8cf1eea --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConjugationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Conjugation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConjugationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConjugationValidator() + { + this.RuleFor(dto => dto.ConjugatedType).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OriginalType).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionDefinitionValidator.cs new file mode 100644 index 000000000..12bcd41d8 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Connections; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConnectionDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConnectionDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConnectionDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionUsageValidator.cs new file mode 100644 index 000000000..113cd7aac --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Connections; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConnectionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConnectionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConnectionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectorValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectorValidator.cs new file mode 100644 index 000000000..48d065545 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConnectorValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Connectors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Connector metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConnectorValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConnectorValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintDefinitionValidator.cs new file mode 100644 index 000000000..36ab61660 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Constraints; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConstraintDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConstraintDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConstraintDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintUsageValidator.cs new file mode 100644 index 000000000..ab54788b1 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstraintUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Constraints; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConstraintUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConstraintUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConstraintUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstructorExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstructorExpressionValidator.cs new file mode 100644 index 000000000..79b46e29d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ConstructorExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ConstructorExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ConstructorExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ConstructorExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CrossSubsettingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CrossSubsettingValidator.cs new file mode 100644 index 000000000..4b5e2f707 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/CrossSubsettingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the CrossSubsetting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class CrossSubsettingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public CrossSubsettingValidator() + { + this.RuleFor(dto => dto.CrossedFeature).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DataTypeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DataTypeValidator.cs new file mode 100644 index 000000000..fe25811c7 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DataTypeValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.DataTypes; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the DataType metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DataTypeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DataTypeValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DecisionNodeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DecisionNodeValidator.cs new file mode 100644 index 000000000..3accda5ae --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DecisionNodeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the DecisionNode metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DecisionNodeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DecisionNodeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DefinitionValidator.cs new file mode 100644 index 000000000..ed99fbb0a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Definition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DependencyValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DependencyValidator.cs new file mode 100644 index 000000000..a0d6ae790 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DependencyValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Dependencies; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Dependency metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DependencyValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DependencyValidator() + { + this.RuleFor(dto => dto.Client).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Supplier).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DifferencingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DifferencingValidator.cs new file mode 100644 index 000000000..f91cad6f7 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DifferencingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Differencing metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DifferencingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DifferencingValidator() + { + this.RuleFor(dto => dto.DifferencingType).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DisjoiningValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DisjoiningValidator.cs new file mode 100644 index 000000000..63d04ee61 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DisjoiningValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Disjoining metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DisjoiningValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DisjoiningValidator() + { + this.RuleFor(dto => dto.DisjoiningType).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.TypeDisjoined).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DocumentationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DocumentationValidator.cs new file mode 100644 index 000000000..a85429fa2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/DocumentationValidator.cs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Documentation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class DocumentationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public DocumentationValidator() + { + this.RuleFor(dto => dto.Body).NotNull(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ElementFilterMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ElementFilterMembershipValidator.cs new file mode 100644 index 000000000..95365b6fb --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ElementFilterMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Kernel.Packages; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ElementFilterMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ElementFilterMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ElementFilterMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EndFeatureMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EndFeatureMembershipValidator.cs new file mode 100644 index 000000000..8f137d0ee --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EndFeatureMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the EndFeatureMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class EndFeatureMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public EndFeatureMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationDefinitionValidator.cs new file mode 100644 index 000000000..8451c380c --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Enumerations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the EnumerationDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class EnumerationDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public EnumerationDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationUsageValidator.cs new file mode 100644 index 000000000..08bcb0ddf --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EnumerationUsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.Enumerations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the EnumerationUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class EnumerationUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public EnumerationUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EventOccurrenceUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EventOccurrenceUsageValidator.cs new file mode 100644 index 000000000..ece35769e --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/EventOccurrenceUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Occurrences; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the EventOccurrenceUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class EventOccurrenceUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public EventOccurrenceUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExhibitStateUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExhibitStateUsageValidator.cs new file mode 100644 index 000000000..b4c80a2b1 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExhibitStateUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ExhibitStateUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ExhibitStateUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ExhibitStateUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExpressionValidator.cs new file mode 100644 index 000000000..9429c6895 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Expression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainExpressionValidator.cs new file mode 100644 index 000000000..c9bde03f8 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureChainExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureChainExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureChainExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainingValidator.cs new file mode 100644 index 000000000..97e8ba698 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureChainingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureChaining metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureChainingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureChainingValidator() + { + this.RuleFor(dto => dto.ChainingFeature).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureInvertingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureInvertingValidator.cs new file mode 100644 index 000000000..c73feebfe --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureInvertingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureInverting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureInvertingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureInvertingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.FeatureInverted).NotEmpty(); + this.RuleFor(dto => dto.InvertingFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureMembershipValidator.cs new file mode 100644 index 000000000..62dee91d7 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureReferenceExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureReferenceExpressionValidator.cs new file mode 100644 index 000000000..55f8c3d92 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureReferenceExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureReferenceExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureReferenceExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureReferenceExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureTypingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureTypingValidator.cs new file mode 100644 index 000000000..265e15087 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureTypingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureTyping metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureTypingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureTypingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Type).NotEmpty(); + this.RuleFor(dto => dto.TypedFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValidator.cs new file mode 100644 index 000000000..bf29f693a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Feature metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValueValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValueValidator.cs new file mode 100644 index 000000000..d433d93ee --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FeatureValueValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Kernel.FeatureValues; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FeatureValue metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FeatureValueValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FeatureValueValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowDefinitionValidator.cs new file mode 100644 index 000000000..fdcad7e91 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Flows; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FlowDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FlowDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FlowDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowEndValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowEndValidator.cs new file mode 100644 index 000000000..1d56cafeb --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowEndValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FlowEnd metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FlowEndValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FlowEndValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowUsageValidator.cs new file mode 100644 index 000000000..e3356a06a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Flows; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FlowUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FlowUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FlowUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowValidator.cs new file mode 100644 index 000000000..e675925ef --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FlowValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Flow metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FlowValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FlowValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForLoopActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForLoopActionUsageValidator.cs new file mode 100644 index 000000000..b21921144 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForLoopActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ForLoopActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ForLoopActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ForLoopActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForkNodeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForkNodeValidator.cs new file mode 100644 index 000000000..b63ba46ff --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ForkNodeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ForkNode metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ForkNodeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ForkNodeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FramedConcernMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FramedConcernMembershipValidator.cs new file mode 100644 index 000000000..f41cfd6b9 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FramedConcernMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.Requirements; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the FramedConcernMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FramedConcernMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FramedConcernMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FunctionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FunctionValidator.cs new file mode 100644 index 000000000..6b2d5ab97 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/FunctionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Function metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class FunctionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public FunctionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IfActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IfActionUsageValidator.cs new file mode 100644 index 000000000..ad57ea638 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IfActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the IfActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class IfActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public IfActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IncludeUseCaseUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IncludeUseCaseUsageValidator.cs new file mode 100644 index 000000000..f22820d6d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IncludeUseCaseUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.UseCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the IncludeUseCaseUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class IncludeUseCaseUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public IncludeUseCaseUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IndexExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IndexExpressionValidator.cs new file mode 100644 index 000000000..6b7d4d6a2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IndexExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the IndexExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class IndexExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public IndexExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InteractionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InteractionValidator.cs new file mode 100644 index 000000000..86006e0cd --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InteractionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Interaction metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class InteractionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public InteractionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceDefinitionValidator.cs new file mode 100644 index 000000000..186310b50 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Interfaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the InterfaceDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class InterfaceDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public InterfaceDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceUsageValidator.cs new file mode 100644 index 000000000..2a0b00bef --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InterfaceUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Interfaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the InterfaceUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class InterfaceUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public InterfaceUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IntersectingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IntersectingValidator.cs new file mode 100644 index 000000000..ab0308ba1 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/IntersectingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Intersecting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class IntersectingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public IntersectingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.IntersectingType).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvariantValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvariantValidator.cs new file mode 100644 index 000000000..8d8d36f9b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvariantValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Invariant metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class InvariantValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public InvariantValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvocationExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvocationExpressionValidator.cs new file mode 100644 index 000000000..6f2fd9998 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/InvocationExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the InvocationExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class InvocationExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public InvocationExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemDefinitionValidator.cs new file mode 100644 index 000000000..7b4f3cb77 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Items; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ItemDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ItemDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ItemDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemUsageValidator.cs new file mode 100644 index 000000000..1fad084fe --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ItemUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Items; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ItemUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ItemUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ItemUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/JoinNodeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/JoinNodeValidator.cs new file mode 100644 index 000000000..8de60020e --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/JoinNodeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the JoinNode metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class JoinNodeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public JoinNodeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LibraryPackageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LibraryPackageValidator.cs new file mode 100644 index 000000000..55c9941c6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LibraryPackageValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Packages; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LibraryPackage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LibraryPackageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LibraryPackageValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralBooleanValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralBooleanValidator.cs new file mode 100644 index 000000000..4a5704d8b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralBooleanValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralBoolean metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralBooleanValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralBooleanValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralExpressionValidator.cs new file mode 100644 index 000000000..5dab5ba17 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralInfinityValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralInfinityValidator.cs new file mode 100644 index 000000000..177fe847b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralInfinityValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralInfinity metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralInfinityValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralInfinityValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralIntegerValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralIntegerValidator.cs new file mode 100644 index 000000000..3b1031fe3 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralIntegerValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralInteger metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralIntegerValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralIntegerValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralRationalValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralRationalValidator.cs new file mode 100644 index 000000000..fdfcbf134 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralRationalValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralRational metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralRationalValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralRationalValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralStringValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralStringValidator.cs new file mode 100644 index 000000000..e843fd2e4 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/LiteralStringValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the LiteralString metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class LiteralStringValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public LiteralStringValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Value).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipExposeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipExposeValidator.cs new file mode 100644 index 000000000..4b3b7b6f4 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipExposeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MembershipExpose metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MembershipExposeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MembershipExposeValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.ImportedMembership).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipImportValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipImportValidator.cs new file mode 100644 index 000000000..98ce2232b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipImportValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MembershipImport metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MembershipImportValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MembershipImportValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.ImportedMembership).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipValidator.cs new file mode 100644 index 000000000..f6dce33e5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Membership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.MemberElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MergeNodeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MergeNodeValidator.cs new file mode 100644 index 000000000..a02c76981 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MergeNodeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MergeNode metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MergeNodeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MergeNodeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetaclassValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetaclassValidator.cs new file mode 100644 index 000000000..450e1cdd7 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetaclassValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Metadata; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Metaclass metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MetaclassValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MetaclassValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataAccessExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataAccessExpressionValidator.cs new file mode 100644 index 000000000..09522e328 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataAccessExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MetadataAccessExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MetadataAccessExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MetadataAccessExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataDefinitionValidator.cs new file mode 100644 index 000000000..7f428fad1 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Metadata; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MetadataDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MetadataDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MetadataDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataFeatureValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataFeatureValidator.cs new file mode 100644 index 000000000..29c2322ab --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataFeatureValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Metadata; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MetadataFeature metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MetadataFeatureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MetadataFeatureValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataUsageValidator.cs new file mode 100644 index 000000000..192cf76ce --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MetadataUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Metadata; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MetadataUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MetadataUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MetadataUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityRangeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityRangeValidator.cs new file mode 100644 index 000000000..4b2ebaf62 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityRangeValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Multiplicities; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the MultiplicityRange metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MultiplicityRangeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MultiplicityRangeValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityValidator.cs new file mode 100644 index 000000000..512ff2343 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/MultiplicityValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Multiplicity metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class MultiplicityValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public MultiplicityValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceExposeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceExposeValidator.cs new file mode 100644 index 000000000..cb233f508 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceExposeValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the NamespaceExpose metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class NamespaceExposeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public NamespaceExposeValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.ImportedNamespace).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceImportValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceImportValidator.cs new file mode 100644 index 000000000..baf45979d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceImportValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the NamespaceImport metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class NamespaceImportValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public NamespaceImportValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.ImportedNamespace).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceValidator.cs new file mode 100644 index 000000000..18abb2fc0 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NamespaceValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Namespace metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class NamespaceValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public NamespaceValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NullExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NullExpressionValidator.cs new file mode 100644 index 000000000..f4c1f269b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/NullExpressionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the NullExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class NullExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public NullExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ObjectiveMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ObjectiveMembershipValidator.cs new file mode 100644 index 000000000..3a6a3386c --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ObjectiveMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Cases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ObjectiveMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ObjectiveMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ObjectiveMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceDefinitionValidator.cs new file mode 100644 index 000000000..c4c7ff7fa --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Occurrences; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the OccurrenceDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class OccurrenceDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public OccurrenceDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceUsageValidator.cs new file mode 100644 index 000000000..cce71a0bb --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OccurrenceUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Occurrences; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the OccurrenceUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class OccurrenceUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public OccurrenceUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OperatorExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OperatorExpressionValidator.cs new file mode 100644 index 000000000..0d7f26b49 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OperatorExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the OperatorExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class OperatorExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public OperatorExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OwningMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OwningMembershipValidator.cs new file mode 100644 index 000000000..b6fc18797 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/OwningMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Root.Namespaces; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the OwningMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class OwningMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public OwningMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PackageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PackageValidator.cs new file mode 100644 index 000000000..cd162401a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PackageValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Packages; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Package metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PackageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PackageValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ParameterMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ParameterMembershipValidator.cs new file mode 100644 index 000000000..266550f63 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ParameterMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Kernel.Behaviors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ParameterMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ParameterMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ParameterMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartDefinitionValidator.cs new file mode 100644 index 000000000..398b9cb4b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Parts; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PartDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PartDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PartDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartUsageValidator.cs new file mode 100644 index 000000000..53aa0548d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PartUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Parts; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PartUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PartUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PartUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PayloadFeatureValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PayloadFeatureValidator.cs new file mode 100644 index 000000000..0c868efa6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PayloadFeatureValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PayloadFeature metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PayloadFeatureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PayloadFeatureValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PerformActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PerformActionUsageValidator.cs new file mode 100644 index 000000000..41d6e0063 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PerformActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PerformActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PerformActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PerformActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortConjugationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortConjugationValidator.cs new file mode 100644 index 000000000..9e6b9dbba --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortConjugationValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Ports; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PortConjugation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PortConjugationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PortConjugationValidator() + { + this.RuleFor(dto => dto.ConjugatedType).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OriginalPortDefinition).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortDefinitionValidator.cs new file mode 100644 index 000000000..57f31dad5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Ports; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PortDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PortDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PortDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortUsageValidator.cs new file mode 100644 index 000000000..4257306a9 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PortUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Ports; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the PortUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PortUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PortUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PredicateValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PredicateValidator.cs new file mode 100644 index 000000000..efee7f0d5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/PredicateValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Predicate metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class PredicateValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public PredicateValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RedefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RedefinitionValidator.cs new file mode 100644 index 000000000..8f135a867 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RedefinitionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Redefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RedefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RedefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.RedefinedFeature).NotEmpty(); + this.RuleFor(dto => dto.RedefiningFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceSubsettingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceSubsettingValidator.cs new file mode 100644 index 000000000..37e72fb2f --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceSubsettingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ReferenceSubsetting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ReferenceSubsettingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ReferenceSubsettingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.ReferencedFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceUsageValidator.cs new file mode 100644 index 000000000..be406bdb3 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReferenceUsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ReferenceUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ReferenceUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ReferenceUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingDefinitionValidator.cs new file mode 100644 index 000000000..6e3df0fb2 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RenderingDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RenderingDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RenderingDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingUsageValidator.cs new file mode 100644 index 000000000..ead1904cc --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RenderingUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RenderingUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RenderingUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RenderingUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidator.cs new file mode 100644 index 000000000..9b7a1e234 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.Requirements; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RequirementConstraintMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RequirementConstraintMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RequirementConstraintMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementDefinitionValidator.cs new file mode 100644 index 000000000..d9fd5026e --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RequirementDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RequirementDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RequirementDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementUsageValidator.cs new file mode 100644 index 000000000..f15c9d6f5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RequirementUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RequirementUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RequirementUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementVerificationMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementVerificationMembershipValidator.cs new file mode 100644 index 000000000..5059f28ff --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/RequirementVerificationMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.Requirements; + using SysML2.NET.Core.DTO.Systems.VerificationCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the RequirementVerificationMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class RequirementVerificationMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public RequirementVerificationMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ResultExpressionMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ResultExpressionMembershipValidator.cs new file mode 100644 index 000000000..49511c5d3 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ResultExpressionMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ResultExpressionMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ResultExpressionMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ResultExpressionMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReturnParameterMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReturnParameterMembershipValidator.cs new file mode 100644 index 000000000..a9eef9796 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ReturnParameterMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Kernel.Functions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ReturnParameterMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ReturnParameterMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ReturnParameterMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SatisfyRequirementUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SatisfyRequirementUsageValidator.cs new file mode 100644 index 000000000..fc44b73cc --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SatisfyRequirementUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SatisfyRequirementUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SatisfyRequirementUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SatisfyRequirementUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SelectExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SelectExpressionValidator.cs new file mode 100644 index 000000000..26ccf3cd8 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SelectExpressionValidator.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Expressions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SelectExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SelectExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SelectExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Operator).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SendActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SendActionUsageValidator.cs new file mode 100644 index 000000000..a7d58bb82 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SendActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SendActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SendActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SendActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SpecializationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SpecializationValidator.cs new file mode 100644 index 000000000..5fab1ed86 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SpecializationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Specialization metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SpecializationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SpecializationValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.General).NotEmpty(); + this.RuleFor(dto => dto.Specific).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StakeholderMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StakeholderMembershipValidator.cs new file mode 100644 index 000000000..204bd45d6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StakeholderMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the StakeholderMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StakeholderMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StakeholderMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateDefinitionValidator.cs new file mode 100644 index 000000000..a2017f0a6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the StateDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StateDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StateDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateSubactionMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateSubactionMembershipValidator.cs new file mode 100644 index 000000000..01414ae6d --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateSubactionMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.States; + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the StateSubactionMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StateSubactionMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StateSubactionMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateUsageValidator.cs new file mode 100644 index 000000000..280d4c048 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StateUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the StateUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StateUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StateUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StepValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StepValidator.cs new file mode 100644 index 000000000..d0db3044a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StepValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Behaviors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Step metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StepValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StepValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StructureValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StructureValidator.cs new file mode 100644 index 000000000..cb747dbca --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/StructureValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Kernel.Structures; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Structure metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class StructureValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public StructureValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubclassificationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubclassificationValidator.cs new file mode 100644 index 000000000..c8afee987 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubclassificationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Classifiers; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Subclassification metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SubclassificationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SubclassificationValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Subclassifier).NotEmpty(); + this.RuleFor(dto => dto.Superclassifier).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubjectMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubjectMembershipValidator.cs new file mode 100644 index 000000000..6e3213958 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubjectMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Requirements; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SubjectMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SubjectMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SubjectMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubsettingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubsettingValidator.cs new file mode 100644 index 000000000..06c213f5b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SubsettingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Subsetting metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SubsettingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SubsettingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.SubsettedFeature).NotEmpty(); + this.RuleFor(dto => dto.SubsettingFeature).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionAsUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionAsUsageValidator.cs new file mode 100644 index 000000000..f033f4e2a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionAsUsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.Connections; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SuccessionAsUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SuccessionAsUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SuccessionAsUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowUsageValidator.cs new file mode 100644 index 000000000..ce7037231 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Flows; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SuccessionFlowUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SuccessionFlowUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SuccessionFlowUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowValidator.cs new file mode 100644 index 000000000..94403c91a --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionFlowValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Interactions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the SuccessionFlow metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SuccessionFlowValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SuccessionFlowValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionValidator.cs new file mode 100644 index 000000000..4197eb268 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/SuccessionValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Kernel.Connectors; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Succession metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class SuccessionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public SuccessionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TerminateActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TerminateActionUsageValidator.cs new file mode 100644 index 000000000..3fafec59e --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TerminateActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TerminateActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TerminateActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TerminateActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TextualRepresentationValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TextualRepresentationValidator.cs new file mode 100644 index 000000000..7fe701395 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TextualRepresentationValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TextualRepresentation metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TextualRepresentationValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TextualRepresentationValidator() + { + this.RuleFor(dto => dto.Body).NotNull(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Language).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionFeatureMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionFeatureMembershipValidator.cs new file mode 100644 index 000000000..0f87bb95b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionFeatureMembershipValidator.cs @@ -0,0 +1,49 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.Systems.States; + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TransitionFeatureMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TransitionFeatureMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TransitionFeatureMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionUsageValidator.cs new file mode 100644 index 000000000..95e7429cc --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TransitionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.States; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TransitionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TransitionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TransitionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TriggerInvocationExpressionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TriggerInvocationExpressionValidator.cs new file mode 100644 index 000000000..31e3546b5 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TriggerInvocationExpressionValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Actions; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TriggerInvocationExpression metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TriggerInvocationExpressionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TriggerInvocationExpressionValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.Kind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeFeaturingValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeFeaturingValidator.cs new file mode 100644 index 000000000..651da4728 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeFeaturingValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Features; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the TypeFeaturing metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TypeFeaturingValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TypeFeaturingValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.FeatureOfType).NotEmpty(); + this.RuleFor(dto => dto.FeaturingType).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeValidator.cs new file mode 100644 index 000000000..30579773b --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/TypeValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Type metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class TypeValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public TypeValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UnioningValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UnioningValidator.cs new file mode 100644 index 000000000..288552dc9 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UnioningValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Core.Types; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Unioning metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class UnioningValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public UnioningValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.UnioningType).NotEmpty(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UsageValidator.cs new file mode 100644 index 000000000..ba8753393 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UsageValidator.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the Usage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class UsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public UsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseDefinitionValidator.cs new file mode 100644 index 000000000..1abc46486 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.UseCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the UseCaseDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class UseCaseDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public UseCaseDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseUsageValidator.cs new file mode 100644 index 000000000..d0d45cc94 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/UseCaseUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.UseCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the UseCaseUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class UseCaseUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public UseCaseUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VariantMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VariantMembershipValidator.cs new file mode 100644 index 000000000..6e1d0dba6 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VariantMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the VariantMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class VariantMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public VariantMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseDefinitionValidator.cs new file mode 100644 index 000000000..9a8a17d89 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.VerificationCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the VerificationCaseDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class VerificationCaseDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public VerificationCaseDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseUsageValidator.cs new file mode 100644 index 000000000..4f57a5a85 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/VerificationCaseUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.VerificationCases; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the VerificationCaseUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class VerificationCaseUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public VerificationCaseUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewDefinitionValidator.cs new file mode 100644 index 000000000..d7a0a3690 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ViewDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ViewDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ViewDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewRenderingMembershipValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewRenderingMembershipValidator.cs new file mode 100644 index 000000000..5f042c973 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewRenderingMembershipValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ViewRenderingMembership metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ViewRenderingMembershipValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ViewRenderingMembershipValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty(); + this.RuleFor(dto => dto.Visibility).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewUsageValidator.cs new file mode 100644 index 000000000..97d60d956 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ViewUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ViewUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ViewUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointDefinitionValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointDefinitionValidator.cs new file mode 100644 index 000000000..fa65d67ba --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointDefinitionValidator.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ViewpointDefinition metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ViewpointDefinitionValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ViewpointDefinitionValidator() + { + this.RuleFor(dto => dto.ElementId).NotNull(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointUsageValidator.cs new file mode 100644 index 000000000..378c38957 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/ViewpointUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Views; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the ViewpointUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class ViewpointUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public ViewpointUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/AutoGenValidator/WhileLoopActionUsageValidator.cs b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/WhileLoopActionUsageValidator.cs new file mode 100644 index 000000000..d0023b568 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/AutoGenValidator/WhileLoopActionUsageValidator.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using System.CodeDom.Compiler; + + using FluentValidation; + + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Systems.Occurrences; + using SysML2.NET.Core.DTO.Systems.Actions; + + /// + /// Validates a against the multiplicities and types of the non-derived properties of the WhileLoopActionUsage metaclass. + /// A rule inferred from a required derived property only checks the lower bound of its storage, not its upper bound or element type. + /// + [GeneratedCode("SysML2.NET", "latest")] + public sealed partial class WhileLoopActionUsageValidator : DtoValidator + { + /// + /// Initializes a new instance of the class + /// and registers its generated rules + /// + public WhileLoopActionUsageValidator() + { + this.RuleFor(dto => dto.Direction).IsInEnum(); + this.RuleFor(dto => dto.ElementId).NotNull(); + this.RuleFor(dto => dto.PortionKind).IsInEnum(); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Validation/Core/DTO/DtoValidator.cs b/SysML2.NET.Validation/Core/DTO/DtoValidator.cs new file mode 100644 index 000000000..73a2fb552 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/DtoValidator.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Validation.Core.DTO +{ + using FluentValidation; + + using SysML2.NET.Core.DTO.Root.Elements; + + /// + /// Base class of the validators that check a core data transfer object against the multiplicities and types of its metaclass + /// + /// + /// The type that is validated + /// + public abstract class DtoValidator : AbstractValidator where TElement : IElement + { + /// + /// Initializes a new instance of the class, registers the identifier rule and the hand-coded rules + /// + protected DtoValidator() + { + this.RuleFor(dto => dto.Id).NotEmpty(); + this.RegisterCustomValidation(); + } + + /// + /// Registers the hand-coded rules that complement the rules derived from the UML model + /// + /// + /// The base constructor invokes this method once, before the derived constructor registers the generated rules. + /// + protected virtual void AddCustomValidation() + { + } + + /// + /// Invokes from the constructor through a non-virtual call site + /// + private void RegisterCustomValidation() + { + this.AddCustomValidation(); + } + } +} diff --git a/SysML2.NET.Validation/SysML2.NET.Validation.csproj b/SysML2.NET.Validation/SysML2.NET.Validation.csproj index ba971f967..0579e0fa2 100644 --- a/SysML2.NET.Validation/SysML2.NET.Validation.csproj +++ b/SysML2.NET.Validation/SysML2.NET.Validation.csproj @@ -4,7 +4,7 @@ net10.0 14.0 0.26.0 - A .NET implementation of the OMG SysML v2 REST/HTTP PSM request validators + A .NET implementation of the OMG SysML v2 Core DTO and REST/HTTP PSM request validators SysML2.NET.Validation Starion Group S.A. Copyright © Starion Group S.A.