diff --git a/CLAUDE.md b/CLAUDE.md index 01856a174..35d296d2a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -157,7 +157,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..da173261d --- /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 reports a warning and 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..2995603a0 --- /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 reports a warning and 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..7dffda550 --- /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 reports a warning and 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..602067a7a --- /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 reports a warning and 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..a7da86824 --- /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 reports a warning and 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..2a83d7d8a --- /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 reports a warning and 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..fe2887fc5 --- /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 reports a warning and 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..158a9d3ae --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..1de804832 --- /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 reports a warning and 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..dbcec8e9c --- /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 reports a warning and 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..1b05dc754 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..b075cc45d --- /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 reports a warning and 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..cc4dd1db1 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..2aea438d2 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..286dd65b6 --- /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 reports a warning and 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..0994750f0 --- /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 reports a warning and 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..11c8c60de --- /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 reports a warning and 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..ce5b09c63 --- /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 reports a warning and 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..a0d7ded9b --- /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 reports a warning and 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..d66b72872 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/HandleBarHelpers/DtoValidatorHelperTestFixture.cs @@ -0,0 +1,182 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// SPDX-License-Identifier: Apache-2.0 +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.HandleBarHelpers +{ + 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 SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators; + + 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, false), Is.Null); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(0, 3, false), Is.EqualTo(".Must(value => value == null || value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, int.MaxValue, false), Is.EqualTo(".NotEmpty()")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, int.MaxValue, false), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count >= 2)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, 3, false), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, 5, false), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().Must(value => value.Count >= 2).Must(value => value.Count <= 5)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(0, int.MaxValue, true), Is.Null); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(0, 3, true), Is.EqualTo(".Must(value => value == null || value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, int.MaxValue, true), Is.EqualTo(".NotEmpty().WithSeverity(Severity.Warning)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, int.MaxValue, true), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().WithSeverity(Severity.Warning).Must(value => value.Count >= 2).WithSeverity(Severity.Warning)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(1, 3, true), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().WithSeverity(Severity.Warning).Must(value => value.Count <= 3)")); + Assert.That(DtoValidatorHelper.QueryCollectionCountRule(2, 5, true), Is.EqualTo(".Cascade(CascadeMode.Stop).NotEmpty().WithSeverity(Severity.Warning).Must(value => value.Count >= 2).WithSeverity(Severity.Warning).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().WithSeverity(Severity.Warning);", + "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().WithSeverity(Severity.Warning);")); + Assert.That(DtoValidatorHelper.QueryRules(this.QueryClass("FeatureMembership")), Does.Contain("this.RuleFor(dto => dto.OwnedRelatedElement).NotEmpty().WithSeverity(Severity.Warning);")); + Assert.That(DtoValidatorHelper.QueryRules(this.QueryClass("ConjugatedPortDefinition")), Does.Contain("this.RuleFor(dto => dto.OwnedRelationship).NotEmpty().WithSeverity(Severity.Warning);")); + Assert.That(DtoValidatorHelper.QueryRules(this.QueryClass("Dependency")), Does.Contain("this.RuleFor(dto => dto.Client).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(new { }), Throws.TypeOf()); + Assert.That(() => handlebars.Compile("{{DtoValidator.WriteRules}}")(new { }), Throws.TypeOf()); + } + } + + 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); + } + + 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); + } + + [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..980a85fae --- /dev/null +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/DtoValidatorHelper.cs @@ -0,0 +1,223 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 + { + /// + /// The suffix that lowers a rule inferred from a required derived property to a warning + /// + private const string WarningSeverity = ".WithSeverity(Severity.Warning)"; + + /// + /// 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. + /// Whether the lower bound is raised by a required derived property, which reports its violation as a warning. + /// The rule chain appended to RuleFor, or null when the bounds demand nothing. + internal static string QueryCollectionCountRule(int lower, int upper, bool isLowerInferred) + { + var isBounded = upper != int.MaxValue; + + if (lower == 0) + { + return isBounded ? $".Must(value => value == null || value.Count <= {upper})" : null; + } + + var lowerSeverity = isLowerInferred ? WarningSeverity : string.Empty; + + List validators = [".NotEmpty()" + lowerSeverity]; + + if (lower > 1) + { + validators.Add($".Must(value => value.Count >= {lower})" + lowerSeverity); + } + + 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(), lower > property.Lower); + + 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) + { + var severity = lower > property.Lower ? WarningSeverity : string.Empty; + + 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(){severity};"; + break; + case IDataType: + break; + default: + if (lower > 0) + { + yield return $"this.RuleFor({selector}).NotEmpty(){severity};"; + } + + 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 9afae193e..d77b19a55 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..5f48b9c14 --- /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 reports a warning and 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..d1a2b3b9f --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/ConjugatedPortDefinitionValidatorTestFixture.cs @@ -0,0 +1,42 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 FluentValidation; + + 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, failure.Severity)), Is.EquivalentTo([("OwnedRelationship", Severity.Warning)])); + + conjugatedPortDefinition.OwnedRelationship = null; + + Assert.That(validator.Validate(conjugatedPortDefinition).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("OwnedRelationship", Severity.Warning)])); + } + } +} 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..98713ef6b --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/DependencyValidatorTestFixture.cs @@ -0,0 +1,47 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 FluentValidation; + + 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, failure.Severity)), Is.EquivalentTo([("Client", Severity.Error)])); + + dependency.Supplier = null; + + Assert.That(validator.Validate(dependency).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("Client", Severity.Error), ("Supplier", Severity.Error)])); + + 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..e634cab77 --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/MembershipValidatorTestFixture.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 FluentValidation; + + 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, failure.Severity)), Is.EquivalentTo([("OwningRelatedElement", Severity.Warning)])); + + membership.OwningRelatedElement = Guid.NewGuid(); + + membership.MemberElement = Guid.Empty; + + Assert.That(validator.Validate(membership).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("MemberElement", Severity.Error)])); + + membership.MemberElement = Guid.NewGuid(); + membership.ElementId = null; + + Assert.That(validator.Validate(membership).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo(["ElementId"])); + + membership.ElementId = string.Empty; + + Assert.That(validator.Validate(membership).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("ElementId", Severity.Error)])); + + membership.ElementId = "the element id"; + 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..94ec62049 --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/OwningMembershipValidatorTestFixture.cs @@ -0,0 +1,48 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 FluentValidation; + + 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, failure.Severity)), Is.EquivalentTo([("OwningRelatedElement", Severity.Warning)])); + + owningMembership.OwningRelatedElement = Guid.NewGuid(); + + owningMembership.OwnedRelatedElement = []; + + Assert.That(validator.Validate(owningMembership).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("OwnedRelatedElement", Severity.Warning)])); + + owningMembership.OwnedRelatedElement = null; + + Assert.That(validator.Validate(owningMembership).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("OwnedRelatedElement", Severity.Warning)])); + } + } +} 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..612860d65 --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/AutoGenValidator/RequirementConstraintMembershipValidatorTestFixture.cs @@ -0,0 +1,48 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 FluentValidation; + + 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, failure.Severity)), Is.EquivalentTo([("OwnedRelatedElement", Severity.Warning)])); + + membership.OwnedRelatedElement = [Guid.NewGuid()]; + membership.Kind = (RequirementConstraintKind)int.MaxValue; + + Assert.That(validator.Validate(membership).Errors.Select(failure => (failure.PropertyName, failure.Severity)), Is.EquivalentTo([("Kind", Severity.Error)])); + } + } +} 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..6a3eea54f --- /dev/null +++ b/SysML2.NET.Validation.Tests/Core/DTO/DtoValidatorTestFixture.cs @@ -0,0 +1,74 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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)])); + + comment.Id = Guid.NewGuid(); + comment.ElementId = string.Empty; + + Assert.That(new ValidatorWithoutCustomValidation().Validate(comment).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo([nameof(Comment.ElementId)])); + + comment.ElementId = " "; + + Assert.That(new ValidatorWithoutCustomValidation().Validate(comment).Errors.Select(failure => failure.PropertyName), Is.EquivalentTo([nameof(Comment.ElementId)])); + + comment.ElementId = "the element id"; + comment.Body = string.Empty; + + Assert.That(new CommentValidator().Validate(comment).IsValid, Is.True); + } + + 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..6e2d4e2e8 --- /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 reports a warning and 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..2819810d9 --- /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 reports a warning and 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..16dd6421a --- /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 reports a warning and 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..06e397d90 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..081953f2f --- /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 reports a warning and 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..933ca78ca --- /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 reports a warning and 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..88ab8e070 --- /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 reports a warning and 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..ce32fe47d --- /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 reports a warning and 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..da173261d --- /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 reports a warning and 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..697ae3c23 --- /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 reports a warning and 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..ad1472410 --- /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 reports a warning and 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..ec792c385 --- /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 reports a warning and 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..5e32c05dc --- /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 reports a warning and 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..2995603a0 --- /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 reports a warning and 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..cb1345eea --- /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 reports a warning and 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..ec0085936 --- /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 reports a warning and 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..948633d7e --- /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 reports a warning and 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..9c2556c8f --- /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 reports a warning and 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..e2b7b9de3 --- /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 reports a warning and 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..def57e0a1 --- /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 reports a warning and 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..bfecb33f7 --- /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 reports a warning and 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..5c3088c22 --- /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 reports a warning and 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..e0f8b121f --- /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 reports a warning and 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..8a1335a57 --- /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 reports a warning and 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..c53bdef28 --- /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 reports a warning and 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..c6e6a728b --- /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 reports a warning and 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..a023022cd --- /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 reports a warning and 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..b6cf18c48 --- /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 reports a warning and 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..878408e91 --- /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 reports a warning and 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..44a28e582 --- /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 reports a warning and 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..6769b5d5d --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..b3d5a36b6 --- /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 reports a warning and 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..3d53b419d --- /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 reports a warning and 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..c17856a0e --- /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 reports a warning and 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..4e6c5b4a6 --- /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 reports a warning and 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..c5bef1113 --- /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 reports a warning and 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..b315f21b5 --- /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 reports a warning and 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..49c34b8ba --- /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 reports a warning and 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..bdcc636bf --- /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 reports a warning and 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..0916f317c --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..de12d58c8 --- /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 reports a warning and 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..446237f79 --- /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 reports a warning and 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..41769bc45 --- /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 reports a warning and 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..7dffda550 --- /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 reports a warning and 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..1e7c01d1e --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..5802d5c3f --- /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 reports a warning and 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..a4adcc48a --- /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 reports a warning and 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..fa5e30c21 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..6194e070d --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..602067a7a --- /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 reports a warning and 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..33aa67cfc --- /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 reports a warning and 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..cff278b99 --- /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 reports a warning and 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..4e0cabf48 --- /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 reports a warning and 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..bd2ef1e76 --- /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 reports a warning and 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..131785323 --- /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 reports a warning and 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..e7ccdf315 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..ca085e944 --- /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 reports a warning and 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..57792230a --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..617d1eac0 --- /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 reports a warning and 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..a7da86824 --- /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 reports a warning and 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..2a83d7d8a --- /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 reports a warning and 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..18b06cd5c --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..a5dfb8e62 --- /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 reports a warning and 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..df7e444f0 --- /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 reports a warning and 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..e387d416e --- /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 reports a warning and 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..fe2887fc5 --- /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 reports a warning and 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..7bc148cd0 --- /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 reports a warning and 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..5c2d70108 --- /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 reports a warning and 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..158a9d3ae --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..96eb835dc --- /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 reports a warning and 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..0f32077ba --- /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 reports a warning and 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..feb2e0d6c --- /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 reports a warning and 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..25b23ec0f --- /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 reports a warning and 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..593ef2e30 --- /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 reports a warning and 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..f109623ff --- /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 reports a warning and 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..4d58212f1 --- /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 reports a warning and 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..66046feb3 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..2ae336c08 --- /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 reports a warning and 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..28f8eb3fb --- /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 reports a warning and 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..b4fef3aa8 --- /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 reports a warning and 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..9ed6dde64 --- /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 reports a warning and 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..d229c8c55 --- /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 reports a warning and 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..674e63f3c --- /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 reports a warning and 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..777114ce7 --- /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 reports a warning and 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..2f092e65c --- /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 reports a warning and 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..f38da3626 --- /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 reports a warning and 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..1de804832 --- /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 reports a warning and 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..dbcec8e9c --- /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 reports a warning and 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..10a694b2c --- /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 reports a warning and 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..77ac09e19 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..4868afba7 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..1b05dc754 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..f1b9511d9 --- /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 reports a warning and 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..4a47b648b --- /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 reports a warning and 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..be7dfc4b8 --- /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 reports a warning and 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..336a3e77e --- /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 reports a warning and 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..63ec795c2 --- /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 reports a warning and 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..7ba496c61 --- /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 reports a warning and 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..b075cc45d --- /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 reports a warning and 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..c78f6ba24 --- /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 reports a warning and 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..755ce1ab5 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..484e71783 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..378c4c035 --- /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 reports a warning and 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..eee7107bf --- /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 reports a warning and 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..868843dd3 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..1f18bcb47 --- /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 reports a warning and 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..956be38fc --- /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 reports a warning and 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..71342736c --- /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 reports a warning and 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..cc4dd1db1 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..633e72313 --- /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 reports a warning and 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..ebfb6ffca --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..3ddab25c5 --- /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 reports a warning and 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..9fbfc7bc6 --- /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 reports a warning and 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..db521c8d4 --- /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 reports a warning and 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..8e57696e7 --- /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 reports a warning and 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..82cb2f68f --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------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..dd7d9560d --- /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 reports a warning and 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..fbdc94a56 --- /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 reports a warning and 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..3da6a0da5 --- /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 reports a warning and 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..68aed4a78 --- /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 reports a warning and 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..2aea438d2 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..5216d8b82 --- /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 reports a warning and 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..c292a74fe --- /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 reports a warning and 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..f6cdf7b34 --- /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 reports a warning and 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..ffd983700 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..1c0571376 --- /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 reports a warning and 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..286dd65b6 --- /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 reports a warning and 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..fee6fefb4 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..1cd96d6e2 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..8fd49c764 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..2a6d8fcd0 --- /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 reports a warning and 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..0994750f0 --- /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 reports a warning and 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..54cfc35c2 --- /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 reports a warning and 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..a7481c32e --- /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 reports a warning and 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..ad4e1ae2a --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..beff0f0dc --- /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 reports a warning and 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..bf7a7701a --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..36af325d3 --- /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 reports a warning and 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..4f579c439 --- /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 reports a warning and 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..81e1f7693 --- /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 reports a warning and 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..11c8c60de --- /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 reports a warning and 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..6c1c28f81 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..5f3ecc811 --- /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 reports a warning and 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..90b98441f --- /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 reports a warning and 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..59e85197f --- /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 reports a warning and 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..a159559af --- /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 reports a warning and 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..74696b23e --- /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 reports a warning and 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..b8aec7e92 --- /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 reports a warning and 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..ce5b09c63 --- /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 reports a warning and 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..c500a6d1a --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..456ae142b --- /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 reports a warning and 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..d0a3139ce --- /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 reports a warning and 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..3b3038fc4 --- /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 reports a warning and 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..a1de3ba81 --- /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 reports a warning and 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..15cb240d3 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + 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..a0d7ded9b --- /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 reports a warning and 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..fe611369f --- /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 reports a warning and 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..e99103c2a --- /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 reports a warning and 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..41ddd1569 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..07058a04d --- /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 reports a warning and 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..01e970911 --- /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 reports a warning and 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..b944be735 --- /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 reports a warning and 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..3dcb40283 --- /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 reports a warning and 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().WithSeverity(Severity.Warning); + this.RuleFor(dto => dto.OwningRelatedElement).NotEmpty().WithSeverity(Severity.Warning); + 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..a67efbf97 --- /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 reports a warning and 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..a0ce0d6ae --- /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 reports a warning and 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..020e45563 --- /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 reports a warning and 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..7d0987997 --- /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 reports a warning and 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..ab68b6141 --- /dev/null +++ b/SysML2.NET.Validation/Core/DTO/DtoValidator.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------ +// +// +// 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 rules and the hand-coded rules + /// + protected DtoValidator() + { + this.RuleFor(dto => dto.Id).NotEmpty(); + this.RuleFor(dto => dto.ElementId).NotEmpty().When(dto => dto.ElementId != null); + 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 8f0ecbf75..69c835508 100644 --- a/SysML2.NET.Validation/SysML2.NET.Validation.csproj +++ b/SysML2.NET.Validation/SysML2.NET.Validation.csproj @@ -13,10 +13,6 @@ Git Sam Gerené true - - [Add] FluentValidation validators for the 12 request types of the Systems Modeling API and Services REST/HTTP PSM, generated from its OpenAPI description (#444) - [Add] RequestValidator<TRequest> base class, whose AddCustomValidation registers hand-coded rules alongside the generated ones (#444) - true true