diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs new file mode 100644 index 00000000..5f081103 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AnnotatingElementMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AnnotatingElement may not be null"); + } + + writer.WriteArrayHeader(8); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 7: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs new file mode 100644 index 00000000..2ba1fe74 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AssociationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Associations.Association dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Association may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Associations.Association Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Associations.Association(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs new file mode 100644 index 00000000..d48c0eb7 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs @@ -0,0 +1,253 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DependencyMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Dependencies.Dependency dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Dependency may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + var client = dto.Client; + writer.WriteArrayHeader(client.Count); + for (var i = 0; i < client.Count; i++) + { + WriteGuidBin16(ref writer, client[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var supplier = dto.Supplier; + writer.WriteArrayHeader(supplier.Count); + for (var i = 0; i < supplier.Count; i++) + { + WriteGuidBin16(ref writer, supplier[i]); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Dependencies.Dependency Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Dependencies.Dependency(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + valueLength = reader.ReadArrayHeader(); + dto.Client.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.Client.Add(ReadGuidBin16(ref reader)); + } + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.Supplier.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.Supplier.Add(ReadGuidBin16(ref reader)); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..13e5fad0 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs @@ -0,0 +1,199 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class EnumerationDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The EnumerationDefinition may not be null"); + } + + writer.WriteArrayHeader(11); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs new file mode 100644 index 00000000..655ad4a0 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.Feature dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Feature may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.Feature Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.Feature(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs new file mode 100644 index 00000000..7e2fa974 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureTypingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.FeatureTyping dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureTyping may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.Type); + + WriteGuidBin16(ref writer, dto.TypedFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.FeatureTyping Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.FeatureTyping(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.Type = ReadGuidBin16(ref reader); + break; + case 12: + dto.TypedFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs new file mode 100644 index 00000000..c7eedd7d --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FlowMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.Flow dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Flow may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.Flow Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.Flow(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..f04e8e1d --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FramedConcernMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FramedConcernMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = RequirementConstraintKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = RequirementConstraintKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs new file mode 100644 index 00000000..fe4d871e --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralIntegerMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralInteger may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadInt32(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs new file mode 100644 index 00000000..63b70571 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralRationalMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralRational may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadInt32(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs new file mode 100644 index 00000000..b1c5a856 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.Membership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Membership may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + WriteGuidBin16(ref writer, dto.MemberElement); + + writer.Write(dto.MemberName); + + writer.Write(dto.MemberShortName); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.Membership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.Membership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.MemberElement = ReadGuidBin16(ref reader); + break; + case 8: + dto.MemberName = reader.ReadString(); + break; + case 9: + dto.MemberShortName = reader.ReadString(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs new file mode 100644 index 00000000..2108283d --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MultiplicityRangeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MultiplicityRange may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..fc78c742 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class OwningMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The OwningMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs new file mode 100644 index 00000000..1097b305 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ReferenceSubsettingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ReferenceSubsetting may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.ReferencedFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.ReferencedFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs new file mode 100644 index 00000000..8ee9166b --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RequirementUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RequirementUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsComposite = reader.ReadBoolean(); + break; + case 7: + dto.IsConstant = reader.ReadBoolean(); + break; + case 8: + dto.IsDerived = reader.ReadBoolean(); + break; + case 9: + dto.IsEnd = reader.ReadBoolean(); + break; + case 10: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 11: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + case 20: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..80cdf561 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SelectExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SelectExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs new file mode 100644 index 00000000..0fe97aad --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SubclassificationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Classifiers.Subclassification dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Subclassification may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.Subclassifier); + + WriteGuidBin16(ref writer, dto.Superclassifier); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Classifiers.Subclassification Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Classifiers.Subclassification(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.Subclassifier = ReadGuidBin16(ref reader); + break; + case 12: + dto.Superclassifier = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs new file mode 100644 index 00000000..6d2cd47c --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TextualRepresentationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TextualRepresentation may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.Body); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.Language); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.Body = reader.ReadString(); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.Language = reader.ReadString(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs new file mode 100644 index 00000000..eb3f1caa --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class UsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Usage may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/Payload.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/Payload.cs new file mode 100644 index 00000000..b70c734f --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/Payload.cs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +/* ------------------------------------------- | + | index | property name | + | ------------------------------------------- | + | 0 | Created | + | ------------------------------------------- | + | 1 | AnnotatingElement | + * ------------------------------------------- | */ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using NET.Core.DTO.Root.Annotations; + + /// + /// The acts as envelope around the Core DTO classes and is used as + /// construct to transport the objects using MessagePack + /// + internal class Payload + { + /// + /// Gets or sets the at which the was created + /// + internal DateTime Created { get; set; } = DateTime.UtcNow; + + /// + /// Gets or sets the list of . + /// + internal List AnnotatingElement { get; set; } = []; + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadFactory.cs new file mode 100644 index 00000000..e5579827 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadFactory.cs @@ -0,0 +1,101 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Common; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// The purpose of the class is to create an + /// instance of + /// + internal static class PayloadFactory + { + /// + /// Creates an instance of from the provided + /// + /// + /// The on the bases of which the will + /// be created + /// + /// + /// An instance of + /// + internal static Payload ToPayload(this IEnumerable dataItems) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + var payload = new Payload + { + Created = DateTime.UtcNow, + }; + + foreach (var dataItem in dataItems) + { + switch (dataItem) + { + case AnnotatingElement annotatingElement: + payload.AnnotatingElement.Add(annotatingElement); + break; + } + } + return payload; + } + + /// + /// Creates an from the provided . + /// + /// + /// The that carries the s. + /// + /// + /// an . + /// + internal static IEnumerable ToDataItems(this Payload payload) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload)); + } + + var result = new List(); + + result.AddRange(payload.AnnotatingElement); + + return result; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs new file mode 100644 index 00000000..42ab1c12 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs @@ -0,0 +1,129 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using global::MessagePack; + using global::MessagePack.Formatters; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// The purpose of the is to provide + /// the contract for serialization of the type + /// + internal class PayloadMessagePackFormatter : IMessagePackFormatter + { + /// + /// Serializes an . + /// + /// + /// The writer to use when serializing the . + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, Payload payload, MessagePackSerializerOptions options) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload), "The Payload may not be null"); + } + + var formatterResolver = options.Resolver; + + writer.WriteArrayHeader(147); + + writer.Write(payload.Created); + + writer.WriteArrayHeader(payload.AnnotatingElement.Count); + foreach (var annotatingElement in payload.AnnotatingElement) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, annotatingElement, options); + } + + writer.Flush(); + } + + /// + /// Deserializes an . + /// + /// + /// The reader to deserialize from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized value. + /// + public Payload Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + var formatterResolver = options.Resolver; + options.Security.DepthStep(ref reader); + + var payload = new Payload(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + payload.Created = reader.ReadDateTime(); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var actualFiniteState = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AnnotatingElement.Add(actualFiniteState); + } + + break; + } + } + + return payload; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlMessagePackGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlMessagePackGeneratorTestFixture.cs new file mode 100644 index 00000000..d6450d72 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlMessagePackGeneratorTestFixture.cs @@ -0,0 +1,100 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators +{ + using NUnit.Framework; + using SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators; + using SysML2.NET.CodeGenerator.Tests.Expected.Ecore.Core; + using System.IO; + using System.Threading.Tasks; + + [TestFixture] + public class UmlMessagePackGeneratorTestFixture + { + private DirectoryInfo umlMessagePackPayloadDirectoryInfo; + private DirectoryInfo umlMessagePackFormatterDirectoryInfo; + private DirectoryInfo umlMessagePackDataResolverGetFormatterHelperDirectoryInfo; + private UmlMessagePackGenerator umlMessagePackGenerator; + + [OneTimeSetUp] + public void SetUp() + { + var directoryInfo = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + + this.umlMessagePackPayloadDirectoryInfo = directoryInfo.CreateSubdirectory(Path.Combine("UML", "_SysML2.NET.Serializer.MessagePack.Core.AutoGenMessagePackPayload")); + this.umlMessagePackFormatterDirectoryInfo = directoryInfo.CreateSubdirectory(Path.Combine("UML", "_SysML2.NET.Serializer.MessagePack.Core.AutoGenMessagePackFormatter")); + this.umlMessagePackDataResolverGetFormatterHelperDirectoryInfo = directoryInfo.CreateSubdirectory(Path.Combine("UML", "_SysML2.NET.Serializer.MessagePack.Core.AutoGenDataResolverGetFormatterHelper")); + + this.umlMessagePackGenerator = new UmlMessagePackGenerator(); + } + + [Test] + public async Task Verify_that_Payload_is_generated() + { + await Assert.ThatAsync(() => this.umlMessagePackGenerator.GenerateMessagePackPayload(GeneratorSetupFixture.XmiReaderResult, + this.umlMessagePackPayloadDirectoryInfo), + Throws.Nothing); + } + + [Test] + public async Task Verify_that_DataResolverGetFormatterHelper_is_generated() + { + await Assert.ThatAsync(() => this.umlMessagePackGenerator.GenerateDataResolverGetFormatterHelper(GeneratorSetupFixture.XmiReaderResult, + this.umlMessagePackDataResolverGetFormatterHelperDirectoryInfo), + Throws.Nothing); + } + + [Test] + public async Task Verify_that_PayloadFactory_is_generated() + { + await Assert.ThatAsync(() => this.umlMessagePackGenerator.GenerateMessagePackPayloadFactory(GeneratorSetupFixture.XmiReaderResult, + this.umlMessagePackPayloadDirectoryInfo), + Throws.Nothing); + } + + [Test] + public async Task Verify_that_PayloadMessagePackFormatter_is_generated() + { + await Assert.ThatAsync(() => this.umlMessagePackGenerator.GenerateMessagePackPayloadMessagePackFormatter(GeneratorSetupFixture.XmiReaderResult, + this.umlMessagePackPayloadDirectoryInfo), + Throws.Nothing); + } + + + [Test, TestCaseSource(typeof(ExpectedConcreteClasses)), Category("Expected")] + public async Task Verify_that_generated_Matches_Expected_MessagePackFormatter_Per_Class(string className) + { + var generatedCode = await this.umlMessagePackGenerator.GenerateMessagePackFormatter(GeneratorSetupFixture.XmiReaderResult, this.umlMessagePackFormatterDirectoryInfo, className); + + var expected = await File.ReadAllTextAsync(Path.Combine(TestContext.CurrentContext.TestDirectory, $"Expected/UML/Core/AutoGenMessagePackFormatter/{className}MessagePackFormatter.cs")); + + Assert.That(generatedCode, Is.EqualTo(expected)); + } + + [Test] + public async Task Verify_that_MessagePackFormatters_are_generated() + { + await Assert.ThatAsync(() => this.umlMessagePackGenerator.GenerateMessagePackFormatters(GeneratorSetupFixture.XmiReaderResult, + this.umlMessagePackFormatterDirectoryInfo), + Throws.Nothing); + } + } +} \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj index ab23374a..13417d2b 100644 --- a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj +++ b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj @@ -17,11 +17,39 @@ en-US + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -47,6 +75,72 @@ + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always @@ -782,8 +876,4 @@ - - - - \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs new file mode 100644 index 00000000..a4bc8e45 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Extensions +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Linq; + + using uml4net.Classification; + using uml4net.Extensions; + using uml4net.Packages; + using uml4net.StructuredClassifiers; + + /// + /// Extension methods for interface + /// + public static class ClassExtensions + { + /// + /// Queries all the properties that are implemented by the class directly or through superclasses + /// or interface implementations EXCLUDING IsDerived + /// + /// + /// The from which to query the properties + /// + /// + /// A of + /// + public static ReadOnlyCollection QueryAllNonDerivedProperties(this IClass @class) + { + var properties = @class.QueryAllProperties() + .Where(x => !x.IsDerived); + + return properties.ToList().AsReadOnly(); + } + + /// + /// Queries all the properties that are implemented by the class directly or through superclasses + /// or interface implementations EXCLUDING IsDerived and EXCLUDING properties that have been + /// redefined in the context of the current class + /// + /// + /// The from which to query the properties + /// + /// + /// A of + /// + public static ReadOnlyCollection QueryAllNonDerivedNonRedefinedProperties(this IClass @class) + { + var properties = @class.QueryAllProperties() + .Where(x => !x.IsDerived) + .Where(x => !x.TryQueryRedefinedByProperty(@class, out _)) + .OrderBy(x => x.Name); + + return properties.ToList().AsReadOnly(); + } + + /// + /// Counts and returns to amount of non derived properties + /// + /// + /// The subject + /// + /// + /// the amount of non derived properties + /// + public static int CountAllNonDerivedProperties(this IClass @class) + { + return @class.QueryAllNonDerivedProperties().Count; + } + + /// + /// Counts and returns to amount of non derived properties + /// + /// + /// The subject + /// + /// + /// the amount of non derived properties + /// + public static int CountAllNonDerivedNonRedefinedProperties(this IClass @class) + { + return @class.QueryAllNonDerivedNonRedefinedProperties().Count; + } + } +} diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlMessagePackGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlMessagePackGenerator.cs new file mode 100644 index 00000000..2c33207b --- /dev/null +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlMessagePackGenerator.cs @@ -0,0 +1,310 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators +{ + using System; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using uml4net.Extensions; + using uml4net.HandleBars; + using uml4net.StructuredClassifiers; + using uml4net.xmi.Readers; + + using NamedElementHelper = SysML2.NET.CodeGenerator.HandleBarHelpers.NamedElementHelper; + using PropertyHelper = SysML2.NET.CodeGenerator.HandleBarHelpers.PropertyHelper; + + /// + /// A UML Handlebars based DTO MessagePack code generator + /// + public class UmlMessagePackGenerator : UmlHandleBarsGenerator + { + /// + /// Gets the name of the template used to generate the MessagePack Payload + /// + private const string MessagePackPayloadTemplateName = "core-messagepack-payload-uml-template"; + + /// + /// Gets the name of the template used to generate the MessagePack PayloadFactory + /// + private const string MessagePackPayloadFactoryTemplateName = "core-messagepack-payloadfactory-uml-template"; + + /// + /// Gets the name of the template used to generate the MessagePack PayloadMessagePackFormatter + /// + private const string PayloadMessagePackFormatterTemplateName = "core-messagepack-payloadmessagepackformatter-uml-template"; + + /// + /// Gets the name of the template used to generate the MessagePack DTO specific PayloadMessagePackFormatter + /// + private const string DtoMessagePackFormatterTemplateName = "core-dto-messagepackformatter-uml-template"; + + /// + /// Gets the name of the template used to generate the MessagePack DataResolverGetFormatterHelper + /// + private const string MessagePackDataResolverGetFormatterHelper = "core-messagepack-DataResolverGetFormatterHelper"; + + /// + /// Generates code specific to the concrete implementation + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// + /// an awaitable + /// + public override Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + throw new System.NotImplementedException(); + } + + /// + /// Generates the MessagePack PayloadMessagePackFormatter + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// The generated code as string + /// + public async Task GenerateMessagePackPayloadFactory(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[MessagePackPayloadFactoryTemplateName]; + + var classes = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .OrderBy(x => x.Name) + .ToList(); + + var generatedPayloadMessagePackFormatter = template(classes); + + generatedPayloadMessagePackFormatter = this.CodeCleanup(generatedPayloadMessagePackFormatter ); + + const string fileName = "PayloadMessagePackFormatter.cs"; + + await Write(generatedPayloadMessagePackFormatter , outputDirectory, fileName); + + return generatedPayloadMessagePackFormatter ; + } + + /// + /// Generates the MessagePack Payload + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// The generated code as string + /// + public async Task GenerateMessagePackPayload(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[MessagePackPayloadTemplateName]; + + var classes = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .OrderBy(x => x.Name) + .ToList(); + + var generateMessagePackPayload = template(classes); + + generateMessagePackPayload = this.CodeCleanup(generateMessagePackPayload); + + const string fileName = "Payload.cs"; + + await Write(generateMessagePackPayload, outputDirectory, fileName); + + return generateMessagePackPayload; + } + + /// + /// Generates the MessagePack DataResolverGetFormatterHelper + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// The generated code as string + /// + public async Task GenerateDataResolverGetFormatterHelper(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[MessagePackDataResolverGetFormatterHelper]; + + var classes = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .OrderBy(x => x.Name) + .ToList(); + + var generateMessagePackDataResolverGetFormatterHelper = template(classes); + + generateMessagePackDataResolverGetFormatterHelper = this.CodeCleanup(generateMessagePackDataResolverGetFormatterHelper); + + const string fileName = "DataResolverGetFormatterHelper.cs"; + + await Write(generateMessagePackDataResolverGetFormatterHelper, outputDirectory, fileName); + + return generateMessagePackDataResolverGetFormatterHelper; + } + + /// + /// Generates the MessagePack PayloadMessagePackFormatter + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// The generated code as string + /// + public async Task GenerateMessagePackPayloadMessagePackFormatter(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[PayloadMessagePackFormatterTemplateName]; + + var classes = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .OrderBy(x => x.Name) + .ToList(); + + var generateMessagePackPayloadFormatter = template(classes); + + generateMessagePackPayloadFormatter = this.CodeCleanup(generateMessagePackPayloadFormatter); + + const string fileName = "PayloadMessagePackFormatter.cs"; + + await Write(generateMessagePackPayloadFormatter, outputDirectory, fileName); + + return generateMessagePackPayloadFormatter; + } + + /// + /// Generates the MessagePack MessagePackFormatter + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// The generated code as string + /// + public async Task GenerateMessagePackFormatters(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[DtoMessagePackFormatterTemplateName]; + + var classes = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .OrderBy(x => x.Name) + .ToList(); + + foreach (var @class in classes) + { + var generatedMessagePackFormatter = template(@class); + + generatedMessagePackFormatter = this.CodeCleanup(generatedMessagePackFormatter); + + var fileName = $"{@class.Name.CapitalizeFirstLetter()}MessagePackFormatter.cs"; + + await WriteAsync(generatedMessagePackFormatter, outputDirectory, fileName); + } + } + + /// + /// Generates the named MessagePackFormatter is to be generated + /// + /// + /// the holding the UML model + /// + /// + /// The to which the generated class is written + /// + /// + /// the name of the for which the + /// + /// + /// The generated code as string + /// + public async Task GenerateMessagePackFormatter(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory, string className) + { + var template = this.Templates[DtoMessagePackFormatterTemplateName]; + + var @class = xmiReaderResult.QueryRoot(null, name: "SysML").QueryPackages() + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .Single(x => x.Name == className); + + var generatedMessagePackFormatter = template(@class); + + generatedMessagePackFormatter = this.CodeCleanup(generatedMessagePackFormatter); + + var fileName = $"{@class.Name.CapitalizeFirstLetter()}MessagePackFormatter.cs"; + + await WriteAsync(generatedMessagePackFormatter, outputDirectory, fileName); + + return generatedMessagePackFormatter; + } + + /// + /// Register the custom helpers + /// + protected override void RegisterHelpers() + { + this.Handlebars.RegisterStringHelper(); + this.Handlebars.RegisterClassHelper(); + this.Handlebars.RegisterPropertyHelper(); + + SysML2.NET.CodeGenerator.HandleBarHelpers.ClassHelper.RegisterClassHelper(this.Handlebars); + SysML2.NET.CodeGenerator.HandleBarHelpers.NamedElementHelper.RegisterNamedElementHelper(this.Handlebars); + SysML2.NET.CodeGenerator.HandleBarHelpers.PropertyHelper.RegisterPropertyHelper(this.Handlebars); + } + + /// + /// Register the code templates + /// + protected override void RegisterTemplates() + { + this.RegisterTemplate(MessagePackPayloadTemplateName); + this.RegisterTemplate(MessagePackPayloadFactoryTemplateName); + this.RegisterTemplate(MessagePackDataResolverGetFormatterHelper); + this.RegisterTemplate(PayloadMessagePackFormatterTemplateName); + this.RegisterTemplate(DtoMessagePackFormatterTemplateName); + } + } +} diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs index acaf3b0b..0323a408 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2025 Starion Group S.A. +// Copyright 2022-2026 Starion Group S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using HandlebarsDotNet; using SysML2.NET.CodeGenerator.Extensions; + using uml4net.CommonStructure; using uml4net.Extensions; using uml4net.SimpleClassifiers; @@ -134,6 +135,40 @@ public static void RegisterClassHelper(this IHandlebars handlebars) writer.WriteSafeString($"using SysML2.NET.Core.{namespacePrefix}.{orderedNamespace} ;{Environment.NewLine}"); } }); + + // writes the count of non-derived properties of the IClass + handlebars.RegisterHelper("Class.WriteCountAllNonDerivedProperties", (writer, context, _) => { + + if (context.Value is not IClass @class) + { + throw new ArgumentException("supposed to be IClass"); + } + + writer.WriteSafeString(@class.CountAllNonDerivedProperties()); + }); + + // Queries all the properties that are non derived and not redefined in the + // context of the current class + handlebars.RegisterHelper("Class.QueryAllNonDerivedNonRedefinedProperties", (context, _) => + { + if (!(context.Value is IClass @class)) + { + throw new ArgumentException("#Class.QueryAllNonDerivedNonRedefinedProperties: supposed to be IClass"); + } + + return @class.QueryAllNonDerivedNonRedefinedProperties(); + }); + + // writes the count of non-derived and non Redefined properties of the IClass + handlebars.RegisterHelper("Class.WriteCountAllNonDerivedNonRedefinedProperties", (writer, context, _) => { + + if (context.Value is not IClass @class) + { + throw new ArgumentException("supposed to be IClass"); + } + + writer.WriteSafeString(@class.CountAllNonDerivedNonRedefinedProperties()); + }); } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs index 463e8216..c525fef7 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs @@ -479,6 +479,248 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) writer.WriteSafeString(sb + Environment.NewLine); }); + handlebars.RegisterHelper("Property.WriteForDTOMessagePackFormatterSerialize", (writer, context, arguments) => + { + if (context.Value is not IProperty property) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize context supposed to be IProperty"); + } + + if (arguments.Length != 2) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize supposed to be have 2 arguments IProperty"); + } + + if (arguments[1] is not IClass generatedClass) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize supposed to be have an IClass as second argument"); + } + + // derived, derived-union and readonly properties are ignored + if (property.IsDerived || property.IsDerivedUnion || property.IsReadOnly) + { + return; + } + + // properties that have been redefined in the context of the + // generated class are ignored + if (property.TryQueryRedefinedByProperty(generatedClass, out _)) + { + return; + } + + var sb = new StringBuilder(); + + if (property.Type is IDataType) + { + if (property.QueryIsEnum()) + { + if (property.QueryIsNullable()) + { + sb.AppendLine($"if (dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.HasValue)"); + sb.AppendLine("{"); + sb.AppendLine($" var {property.Name}Bytes = {property.QueryTypeName()}Provider.ToUtf8LowerBytes(dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Value);"); + sb.AppendLine($" writer.WriteString({property.Name}Bytes);"); + sb.AppendLine("}"); + sb.AppendLine("else"); + sb.AppendLine("{"); + sb.AppendLine(" writer.WriteNil();"); + sb.AppendLine("}"); + } + else + { + sb.AppendLine($" var {property.Name}Bytes = {property.QueryTypeName()}Provider.ToUtf8LowerBytes(dto.{StringExtensions.CapitalizeFirstLetter(property.Name)});"); + sb.AppendLine($" writer.WriteString({property.Name}Bytes);"); + } + } + else if (property.QueryIsEnumerable()) + { + sb.AppendLine($"writer.WriteArrayHeader(dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Count);"); + sb.AppendLine($"for (var i = 0; i < dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Count; i++)"); + sb.AppendLine("{"); + sb.AppendLine($"writer.Write(dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}[i]);"); + sb.AppendLine("}"); + } + else + { + sb.AppendLine($"writer.Write(dto.{StringExtensions.CapitalizeFirstLetter(property.Name)});"); + } + } + else if (property.QueryIsReferenceProperty()) + { + if (property.QueryIsEnumerable()) + { + sb.AppendLine($"var {StringExtensions.LowerCaseFirstLetter(property.Name)} = dto.{StringExtensions.CapitalizeFirstLetter(property.Name)};"); + + // when properties are not ordered, they are serialized ordered by GUID + if (!property.IsOrdered) + { + sb.AppendLine($"if ({StringExtensions.LowerCaseFirstLetter(property.Name)}.Count > 1)"); + sb.AppendLine("{"); + sb.AppendLine($"{StringExtensions.LowerCaseFirstLetter(property.Name)}.Sort(GuidComparer);"); + sb.AppendLine("}"); + sb.AppendLine(); + } + + sb.AppendLine($"writer.WriteArrayHeader({StringExtensions.LowerCaseFirstLetter(property.Name)}.Count);"); + sb.AppendLine($"for (var i = 0; i < {StringExtensions.LowerCaseFirstLetter(property.Name)}.Count; i++)"); + sb.AppendLine("{"); + sb.AppendLine($"WriteGuidBin16(ref writer, {StringExtensions.LowerCaseFirstLetter(property.Name)}[i]);"); + sb.AppendLine("}"); + } + else if (property.QueryIsNullable()) + { + sb.AppendLine($"if (dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.HasValue)"); + sb.AppendLine("{"); + sb.AppendLine($"WriteGuidBin16(ref writer, dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Value);"); + sb.AppendLine("}"); + sb.AppendLine("else"); + sb.AppendLine("{"); + sb.AppendLine("writer.WriteNil();"); + sb.AppendLine("}"); + } + else + { + sb.AppendLine($"WriteGuidBin16(ref writer, dto.{StringExtensions.CapitalizeFirstLetter(property.Name)});"); + } + } + + sb.AppendLine(); + + writer.WriteSafeString(sb); + }); + + handlebars.RegisterHelper("Property.WriteForDTOMessagePackFormatterDeSerialize", (writer, context, arguments) => + { + if (context.Value is not IProperty property) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize context supposed to be IProperty"); + } + + if (arguments.Length != 2) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize supposed to be have 2 arguments IProperty"); + } + + if (arguments[1] is not IClass generatedClass) + { + throw new ArgumentException("The #Property.WriteForDTOMessagePackFormatterSerialize supposed to be have an IClass as second argument"); + } + + // derived, derived-union and readonly properties are ignored + if (property.IsDerived || property.IsDerivedUnion || property.IsReadOnly) + { + return; + } + + // properties that have been redefined in the context of the + // generated class are ignored + if (property.TryQueryRedefinedByProperty(generatedClass, out _)) + { + return; + } + + var sb = new StringBuilder(); + + if (property.Type is IDataType) + { + if (property.QueryIsEnum()) + { + sb.AppendLine($"var {property.Name}Sequence = reader.ReadStringSequence();"); + + if (property.QueryIsNullable()) + { + sb.AppendLine($"if (!{property.Name}Sequence.HasValue)"); + sb.AppendLine("{"); + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = null;"); + sb.AppendLine("}"); + sb.AppendLine("else"); + sb.AppendLine("{"); + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = {property.QueryTypeName()}Provider.Parse({property.Name}Sequence.Value);"); + sb.AppendLine("}"); + } + else + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = {property.QueryTypeName()}Provider.Parse({property.Name}Sequence.Value);"); + } + } + else if (property.QueryIsEnumerable()) + { + sb.AppendLine("valueLength = reader.ReadArrayHeader();"); + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Capacity = valueLength;"); + sb.AppendLine("for (valueCounter = 0; valueCounter < valueLength; valueCounter++)"); + sb.AppendLine("{"); + + if (property.QueryIsBool()) + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Add(reader.ReadBoolean());"); + } + else if (property.QueryCSharpTypeName() == "DateTime") + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Add(reader.ReadDateTime());"); + } + else if (property.QueryIsString()) + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Add(reader.ReadString());"); + } + else if (property.QueryIsNumeric()) + { + + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Add(reader.ReadInt32());"); + } + + sb.Append("}"); + } + else + { + if (property.QueryIsBool()) + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = reader.ReadBoolean();"); + } + else if (property.QueryCSharpTypeName() == "DateTime") + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = reader.ReadDateTime();"); + } + else if (property.QueryIsString()) + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = reader.ReadString();"); + } + else if (property.QueryIsNumeric()) + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = reader.ReadInt32();"); + } + } + } + else if (property.QueryIsReferenceProperty()) + { + if (property.QueryIsEnumerable()) + { + sb.AppendLine("valueLength = reader.ReadArrayHeader();"); + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Capacity = valueLength;"); + sb.AppendLine("for (valueCounter = 0; valueCounter < valueLength; valueCounter++)"); + sb.AppendLine("{"); + sb.AppendLine($" dto.{StringExtensions.CapitalizeFirstLetter(property.Name)}.Add(ReadGuidBin16(ref reader));"); + sb.AppendLine("}"); + } + else if (property.QueryIsNullable()) + { + sb.AppendLine("if (reader.TryReadNil())"); + sb.AppendLine("{"); + sb.AppendLine($" dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = null;"); + sb.AppendLine("}"); + sb.AppendLine("else"); + sb.AppendLine("{"); + sb.AppendLine($" dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = ReadGuidBin16(ref reader);"); + sb.AppendLine("}"); + } + else + { + sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = ReadGuidBin16(ref reader);"); + } + } + writer.WriteSafeString(sb); + }); + handlebars.RegisterHelper("Property.WriteTypeForExtendClass", (writer, context, _) => { if (context.Value is not IProperty property) diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index cf766052..66324cc4 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -127,6 +127,9 @@ Always + + Always + Always @@ -148,6 +151,18 @@ Always + + Always + + + Always + + + Always + + + Always + Always diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-messagepackformatter-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-messagepackformatter-uml-template.hbs new file mode 100644 index 00000000..9855b054 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-messagepackformatter-uml-template.hbs @@ -0,0 +1,124 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class {{this.Name}}MessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{this.Name}} dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The {{this.Name}} may not be null"); + } + + writer.WriteArrayHeader({{Math.Add (Class.WriteCountAllNonDerivedNonRedefinedProperties this) 1 }} ); + + WriteGuidBin16(ref writer, dto.Id); + + {{ #each (Class.QueryAllNonDerivedNonRedefinedProperties this) as | property | }} + {{ # Property.WriteForDTOMessagePackFormatterSerialize property ../}} + {{/each}} + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{this.Name}} Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{this.Name}}(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + {{ #each (Class.QueryAllNonDerivedNonRedefinedProperties this) as | property | }} + case {{Math.Add @index 1}}: + {{ # Property.WriteForDTOMessagePackFormatterDeSerialize property ../}} + break; + {{/each}} + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-DataResolverGetFormatterHelper.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-DataResolverGetFormatterHelper.hbs new file mode 100644 index 00000000..c03b9787 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-DataResolverGetFormatterHelper.hbs @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using global::MessagePack.Formatters; + + /// + /// Helper class that resolves a based on a + /// + internal static class DataResolverGetFormatterHelper + { + private static readonly Dictionary FormatterMap = new() + { + { typeof(Payload), new PayloadMessagePackFormatter() }, + {{#each this as | class |}} + { typeof(SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{class.Name}}), new {{class.Name}}MessagePackFormatter() }, + {{/each}} + }; + + /// + /// Gets a for the specific + /// + /// + /// The subject + /// + /// + /// an instance of + /// + internal static object GetFormatter(Type t) + { + object formatter; + if (FormatterMap.TryGetValue(t, out formatter)) + { + return formatter; + } + + // If type can not get, must return null for fallback mechanism. + return null; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payload-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payload-uml-template.hbs new file mode 100644 index 00000000..0e351c68 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payload-uml-template.hbs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +/* -------------------------------------------------------------------------- | + | index | property name | + | -------------------------------------------------------------------------- | + | -------------------------------------------------------------------------- | + | 0 | Created | + | -------------------------------------------------------------------------- | +{{#each this as | class |}} + | {{Math.Add @index 1}} | {{ #NamedElement.WriteFullyQualifiedNameSpace class }}.{{class.Name}} + | -------------------------------------------------------------------------- | +{{/each}} + * -------------------------------------------------------------------------- | */ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + /// + /// The acts as envelope around the Core DTO classes and is used as + /// construct to transport the objects using MessagePack + /// + internal class Payload + { + /// + /// Gets or sets the at which the was created + /// + internal DateTime Created { get; set; } = DateTime.UtcNow; + + {{#each this as | class |}} + /// + /// Gets or sets the list of . + /// + internal List {{class.Name}} { get; set; } = []; + + {{/each}} + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadfactory-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadfactory-uml-template.hbs new file mode 100644 index 00000000..9a9727ec --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadfactory-uml-template.hbs @@ -0,0 +1,206 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Common; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// The purpose of the class is to create an + /// instance of + /// + internal static class PayloadFactory + { + /// + /// Creates an instance of from the provided + /// + /// + /// The on the bases of which the will + /// be created + /// + /// + /// An instance of + /// + internal static Payload ToPayload(this IEnumerable dataItems) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + var payload = new Payload + { + Created = DateTime.UtcNow, + }; + + // compute the capacity of each DTO type to optimize the size of the Payload properties + var capacity = new Dictionary(capacity: {{ Enumerable.Count this }}); + + foreach (var item in dataItems) + { + var type = item.GetType(); + capacity.TryGetValue(type, out var current); + capacity[type] = current + 1; + } + + // based on the computed capacity, set the size of each Payload property + {{#each this as | class |}} + SetCapacity(payload.{{class.Name}}, capacity, typeof(SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{class.Name}})); + {{/each}} + + // iterate through the dataItems and allocate to the appropriate Payload property + foreach (var dataItem in dataItems) + { + switch (dataItem) + { + {{#each this as | class |}} + case SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{class.Name}} {{String.LowerCaseFirstLetter class.Name}}Dto: + payload.{{class.Name}}.Add({{String.LowerCaseFirstLetter class.Name}}Dto); + break; + {{/each}} + } + } + + return payload; + } + + /// + /// Creates an from the provided . + /// + /// + /// The that carries the s. + /// + /// + /// an . + /// + internal static IEnumerable ToDataItems(this Payload payload) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload)); + } + + var capacity = 0 + {{#each this as | class |}} + + payload.{{class.Name}}.Count + {{/each}} + ; + + var result = new List(capacity); + + {{#each this as | class |}} + AddRange(result, payload.{{class.Name}}); + {{/each}} + + return result; + } + + /// + /// Adds all elements from the specified source list to the target list + /// without incurring additional allocations or intermediate collections. + /// + /// + /// The concrete data type of the elements being added. The type must + /// implement . + /// + /// + /// The destination list that receives the elements. + /// + /// + /// The source list whose elements are appended to the list. + /// + /// + /// This method is intentionally implemented using a foreach loop over + /// rather than calling + /// in order to: + /// + /// + /// Avoid unnecessary interface-based enumeration when aggregating heterogeneous + /// collections into a . + /// + /// + /// Benefit from the struct-based enumerator used by , + /// which minimizes overhead in tight loops. + /// + /// + /// Centralize the constraint and casting logic in a single, + /// well-defined location. + /// + /// + /// This method is intended for high-throughput aggregation of DTO payloads + /// where predictable performance and minimal allocations are required. + /// + private static void AddRange(List target, List source) where T : IData + { + foreach (var item in source) + { + target.Add(item); + } + } + + /// + /// Ensures that the specified list has sufficient capacity to hold all + /// elements of the given runtime type without triggering internal resizing. + /// + /// + /// The element type of the . + /// + /// + /// The list whose is adjusted, if required. + /// + /// + /// A lookup table mapping concrete runtime types to the number of elements + /// of that type present in the source collection. + /// + /// + /// The concrete runtime corresponding to the elements + /// stored in the . + /// + /// + /// This method is used during payload construction to pre-size collections + /// based on a prior counting pass. Pre-sizing avoids repeated internal + /// reallocations and array copying that would otherwise occur when elements + /// are added incrementally. + /// + /// The capacity is only increased when the required size exceeds the current + /// capacity; existing capacity is never reduced. + /// + private static void SetCapacity(List list, Dictionary counts, Type key) + { + if (counts.TryGetValue(key, out var required) && required > list.Capacity) + { + list.Capacity = required; + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadmessagepackformatter-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadmessagepackformatter-uml-template.hbs new file mode 100644 index 00000000..cb55a594 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-messagepack-payloadmessagepackformatter-uml-template.hbs @@ -0,0 +1,144 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +/* -------------------------------------------------------------------------- | + | index | property name | + | -------------------------------------------------------------------------- | + | -------------------------------------------------------------------------- | + | 0 | Created | + | -------------------------------------------------------------------------- | +{{#each this as | class |}} + | {{Math.Add @index 1}} | {{ #NamedElement.WriteFullyQualifiedNameSpace class }}.{{class.Name}} + | -------------------------------------------------------------------------- | +{{/each}} + * -------------------------------------------------------------------------- | */ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for serialization of the type + /// + internal class PayloadMessagePackFormatter : IMessagePackFormatter + { + /// + /// Serializes an . + /// + /// + /// The writer to use when serializing the . + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, Payload payload, MessagePackSerializerOptions options) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload), "The Payload may not be null"); + } + + var formatterResolver = options.Resolver; + + writer.WriteArrayHeader({{Enumerable.Count this}}); + + writer.Write(payload.Created); + + {{#each this as | class |}} + writer.WriteArrayHeader(payload.{{ class.Name }}.Count); + foreach (var {{String.LowerCaseFirstLetter class.Name}}Dto in payload.{{ class.Name }}) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, {{String.LowerCaseFirstLetter class.Name}}Dto, options); + } + + {{/each}} + + writer.Flush(); + } + + /// + /// Deserializes an . + /// + /// + /// The reader to deserialize from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized value. + /// + public Payload Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + var formatterResolver = options.Resolver; + options.Security.DepthStep(ref reader); + + var payload = new Payload(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + payload.Created = reader.ReadDateTime(); + break; + {{#each this as | class |}} + case {{Math.Add @index 1}}: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var {{String.LowerCaseFirstLetter class.Name}}Dto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.{{ class.Name }}.Add({{String.LowerCaseFirstLetter class.Name}}Dto); + } + + break; + {{/each}} + } + } + + return payload; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Extensions/Comparers/GuidComparer.cs b/SysML2.NET.Extensions/Comparers/GuidComparer.cs new file mode 100644 index 00000000..6614aedc --- /dev/null +++ b/SysML2.NET.Extensions/Comparers/GuidComparer.cs @@ -0,0 +1,44 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Extensions.Comparers +{ + using System; + using System.Collections.Generic; + + /// + /// an IComparer to compare s + /// + public class GuidComparer : IComparer + { + /// + /// Compares this instance to a specified object or Guid and returns an indication of their relative values + /// + /// the first to compare + /// the second to compare + /// + /// A signed number indicating the relative values of this instance and value. + /// + public int Compare(Guid x, Guid y) + { + return x.CompareTo(y); + } + } +} \ No newline at end of file diff --git a/SysML2.NET.Serializer.MessagePack.Tests/Comparers/GuidComparerTestFixture.cs b/SysML2.NET.Serializer.MessagePack.Tests/Comparers/GuidComparerTestFixture.cs new file mode 100644 index 00000000..5e7f3b3b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack.Tests/Comparers/GuidComparerTestFixture.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Extensions.Tests.Comparers +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using NUnit.Framework; + + using SysML2.NET.Extensions.Comparers; + + [TestFixture] + public class GuidComparerTestFixture + { + [Test] + public void Verify_that_List_of_Guid_is_ordered() + { + var id_1 = Guid.Parse("622d8e0f-ed5e-4dde-92b8-97ff06e69110"); + var id_2 = Guid.Parse("90e43d0c-edf8-4630-963b-90e6530ac9db"); + var id_3 = Guid.Parse("47b3abc1-ce06-40ef-8ea6-466e7eaccccd"); + + Assert.That(-1, Is.EqualTo(id_1.CompareTo(id_2))); + + var ids = new List { id_1, id_2, id_3 }; + var ordered = new List { id_3, id_1, id_2 }; + + var result = ids.OrderBy(x => x, new GuidComparer()); + + Assert.That(ordered, Is.EqualTo(result)); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack.Tests/Data/projects.000e9890-6935-43e6-a5d7-5d7cac601f4c.commits.6d7ad9fd-6520-4ff2-885b-8c5c129e6c27.elements.json b/SysML2.NET.Serializer.MessagePack.Tests/Data/projects.000e9890-6935-43e6-a5d7-5d7cac601f4c.commits.6d7ad9fd-6520-4ff2-885b-8c5c129e6c27.elements.json new file mode 100644 index 00000000..388c5dc4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack.Tests/Data/projects.000e9890-6935-43e6-a5d7-5d7cac601f4c.commits.6d7ad9fd-6520-4ff2-885b-8c5c129e6c27.elements.json @@ -0,0 +1,6591 @@ +[ + { + "@type": "PartDefinition", + "@id": "00a43608-2368-4843-9ea9-3aa81e45f9a7", + "aliasIds": [], + "declaredName": "ManualClutch", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "00a43608-2368-4843-9ea9-3aa81e45f9a7", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [], + "membership": [], + "multiplicity": null, + "name": "ManualClutch", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "6dcfcc89-e3cc-4155-ac61-76dc3c99e1b3" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [ { "@id": "6dcfcc89-e3cc-4155-ac61-76dc3c99e1b3" } ], + "ownedState": [], + "ownedSubclassification": [ { "@id": "6dcfcc89-e3cc-4155-ac61-76dc3c99e1b3" } ], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningMembership": { "@id": "6d65280a-3437-4bfd-9415-cc8f15b84b6e" }, + "owningNamespace": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningRelationship": { "@id": "6d65280a-3437-4bfd-9415-cc8f15b84b6e" }, + "qualifiedName": "'7b-Variant Configurations'::VariantDefinitions::ManualClutch", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "Feature", + "@id": "00a6ef10-d3dc-4741-9029-2c9978c2f083", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "out", + "documentation": [], + "elementId": "00a6ef10-d3dc-4741-9029-2c9978c2f083", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "featureMembership": [ { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } ], + "featuringType": [ { "@id": "738f5e86-d9ce-471e-bca4-c104b54c4fbc" } ], + "importedMembership": [], + "inheritedFeature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "inheritedMembership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } + ], + "membership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "multiplicity": null, + "name": "result", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "738f5e86-d9ce-471e-bca4-c104b54c4fbc" }, + "owningFeatureMembership": { "@id": "8a780d8b-61a6-472b-8b80-2564aa9f7c36" }, + "owningMembership": { "@id": "8a780d8b-61a6-472b-8b80-2564aa9f7c36" }, + "owningNamespace": { "@id": "738f5e86-d9ce-471e-bca4-c104b54c4fbc" }, + "owningRelationship": { "@id": "8a780d8b-61a6-472b-8b80-2564aa9f7c36" }, + "owningType": { "@id": "738f5e86-d9ce-471e-bca4-c104b54c4fbc" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "84d12e9d-b862-400d-baa4-7cf408e58361" } ], + "unioningType": [] + }, + { + "@type": "Feature", + "@id": "00d1245a-a46c-479b-afd5-dba8ba24e659", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "00d1245a-a46c-479b-afd5-dba8ba24e659", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "39d40e6a-46bf-4142-804e-2841c33afb0b" } ], + "featureMembership": [ { "@id": "7630453a-d3c5-43e9-af5c-4e89331d25ff" } ], + "featuringType": [ { "@id": "a79d05e4-0fda-410a-ac84-38329b659d22" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "96770cc9-f100-4027-bc4f-ffde5338dc06" }, + { "@id": "39d40e6a-46bf-4142-804e-2841c33afb0b" } + ], + "membership": [ + { "@id": "ec51ea26-932b-4eb6-b389-01e7631a2c09" }, + { "@id": "7630453a-d3c5-43e9-af5c-4e89331d25ff" } + ], + "multiplicity": null, + "name": "source", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "96770cc9-f100-4027-bc4f-ffde5338dc06" }, + { "@id": "39d40e6a-46bf-4142-804e-2841c33afb0b" } + ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "39d40e6a-46bf-4142-804e-2841c33afb0b" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "7630453a-d3c5-43e9-af5c-4e89331d25ff" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "96770cc9-f100-4027-bc4f-ffde5338dc06" }, + { "@id": "39d40e6a-46bf-4142-804e-2841c33afb0b" } + ], + "ownedMembership": [ + { "@id": "ec51ea26-932b-4eb6-b389-01e7631a2c09" }, + { "@id": "7630453a-d3c5-43e9-af5c-4e89331d25ff" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "ec51ea26-932b-4eb6-b389-01e7631a2c09" }, + { "@id": "7630453a-d3c5-43e9-af5c-4e89331d25ff" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "a79d05e4-0fda-410a-ac84-38329b659d22" }, + "owningFeatureMembership": { "@id": "2f5315ae-b971-40f5-ba15-4f699965ee86" }, + "owningMembership": { "@id": "2f5315ae-b971-40f5-ba15-4f699965ee86" }, + "owningNamespace": { "@id": "a79d05e4-0fda-410a-ac84-38329b659d22" }, + "owningRelationship": { "@id": "2f5315ae-b971-40f5-ba15-4f699965ee86" }, + "owningType": { "@id": "a79d05e4-0fda-410a-ac84-38329b659d22" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "ParameterMembership", + "@id": "024b30a6-5250-4c39-bec5-9902380c5a01", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "024b30a6-5250-4c39-bec5-9902380c5a01", + "feature": { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" }, + "memberElementId": "0b625251-ff48-4e44-a134-54bdc4f2a40d", + "memberName": "y", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" }, + "ownedMemberElementId": "0b625251-ff48-4e44-a134-54bdc4f2a40d", + "ownedMemberFeature": { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" }, + "ownedMemberName": "y", + "ownedMemberParameter": { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "owningRelationship": null, + "owningType": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" } + ], + "shortName": null, + "source": [ { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" } ], + "target": [ { "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d" } ], + "textualRepresentation": [], + "type": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "visibility": "private" + }, + { + "@type": "ReferenceUsage", + "@id": "02577148-0077-4a79-a325-c1fc8e68e2bc", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "definition": [], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": "out", + "documentation": [], + "elementId": "02577148-0077-4a79-a325-c1fc8e68e2bc", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "member": [], + "membership": [], + "multiplicity": null, + "name": "result", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "dfd73761-4222-498c-b5e4-5c2fcf4fd28a" }, + "owningMembership": { "@id": "dfd73761-4222-498c-b5e4-5c2fcf4fd28a" }, + "owningNamespace": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "owningRelationship": { "@id": "dfd73761-4222-498c-b5e4-5c2fcf4fd28a" }, + "owningType": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "owningUsage": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "qualifiedName": "'7b-Variant Configurations'::VariabilityModel::anyVehicleConfig::'engine-wheel selection constraint'::result", + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "PortDefinition", + "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" }, + "declaredName": "AutomaticClutchPort", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "0257f14b-7b82-4e97-9195-d4768c30c1cd", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [ { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ + { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" }, + { "@id": "07d1840c-4b14-45a7-a8bf-5ea0f591997f" } + ], + "membership": [ + { "@id": "069fe4af-b8f5-4148-8838-eaf11de5463d" }, + { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } + ], + "multiplicity": null, + "name": "AutomaticClutchPort", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" } ], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [ { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" } ], + "ownedMembership": [ { "@id": "069fe4af-b8f5-4148-8838-eaf11de5463d" } ], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ + { "@id": "d865ad91-3e9e-49ff-82dd-e3968914dda3" }, + { "@id": "069fe4af-b8f5-4148-8838-eaf11de5463d" } + ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [ { "@id": "d865ad91-3e9e-49ff-82dd-e3968914dda3" } ], + "ownedState": [], + "ownedSubclassification": [ { "@id": "d865ad91-3e9e-49ff-82dd-e3968914dda3" } ], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningMembership": { "@id": "469c8ec6-8232-414d-993d-f7bde4358d22" }, + "owningNamespace": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningRelationship": { "@id": "469c8ec6-8232-414d-993d-f7bde4358d22" }, + "qualifiedName": "'7b-Variant Configurations'::VariantDefinitions::AutomaticClutchPort", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "ParameterMembership", + "@id": "026aea3b-e975-4b2a-b0f1-5178a69b0986", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "026aea3b-e975-4b2a-b0f1-5178a69b0986", + "feature": { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" }, + "memberElementId": "0a820373-dc7c-4428-93f0-5e21723a31a1", + "memberName": "x", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" }, + "ownedMemberElementId": "0a820373-dc7c-4428-93f0-5e21723a31a1", + "ownedMemberFeature": { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" }, + "ownedMemberName": "x", + "ownedMemberParameter": { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "owningRelationship": null, + "owningType": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" } + ], + "shortName": null, + "source": [ { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" } ], + "target": [ { "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1" } ], + "textualRepresentation": [], + "type": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "visibility": "private" + }, + { + "@type": "FeatureReferenceExpression", + "@id": "0292b0ea-288d-4128-b9fa-f4f19231eadf", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } ], + "direction": null, + "documentation": [], + "elementId": "0292b0ea-288d-4128-b9fa-f4f19231eadf", + "endFeature": [], + "endOwningType": null, + "feature": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } + ], + "featureMembership": [ + { "@id": "a1ea9228-a9a2-4fa1-acac-46c171136e3a" }, + { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" } + ], + "featuringType": [ { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } + ], + "membership": [ + { "@id": "a1ea9228-a9a2-4fa1-acac-46c171136e3a" }, + { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" } + ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } + ], + "ownedEndFeature": [], + "ownedFeature": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } + ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ + { "@id": "a1ea9228-a9a2-4fa1-acac-46c171136e3a" }, + { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" } + ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } + ], + "ownedMembership": [ + { "@id": "a1ea9228-a9a2-4fa1-acac-46c171136e3a" }, + { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "a1ea9228-a9a2-4fa1-acac-46c171136e3a" }, + { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "b28ba9aa-3a90-42b0-a66e-3a9f35bf7591" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "ac610a46-e2b3-4a91-a956-db9ac4be8992" }, + "owningNamespace": { "@id": "b28ba9aa-3a90-42b0-a66e-3a9f35bf7591" }, + "owningRelationship": { "@id": "ac610a46-e2b3-4a91-a956-db9ac4be8992" }, + "owningType": null, + "parameter": [ { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" } ], + "qualifiedName": null, + "referent": { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + "result": { "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "OwningMembership", + "@id": "03a6b6ab-ec6e-4d18-a0ff-9fe67a838155", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "03a6b6ab-ec6e-4d18-a0ff-9fe67a838155", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b" }, + "memberElementId": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "b4de81c5-52cb-4884-973e-9dc12bb016d5" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b" }, + "ownedMemberElementId": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "b4de81c5-52cb-4884-973e-9dc12bb016d5" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "b4de81c5-52cb-4884-973e-9dc12bb016d5" }, + { "@id": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b" } + ], + "shortName": null, + "source": [ { "@id": "b4de81c5-52cb-4884-973e-9dc12bb016d5" } ], + "target": [ { "@id": "8a6a099c-6cb2-4255-845f-543d4d9e1d3b" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "046fe6e5-f78b-4a42-9fe9-eb856abe3876", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } ], + "membership": [ { "@id": "047febb5-2f13-4f15-a018-42368ad8a1c6" } ], + "multiplicity": null, + "name": "firstValue", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } ], + "ownedMembership": [ { "@id": "047febb5-2f13-4f15-a018-42368ad8a1c6" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "047febb5-2f13-4f15-a018-42368ad8a1c6" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "owningFeatureMembership": { "@id": "9026738a-67cc-44b2-b178-f6693f378dbb" }, + "owningMembership": { "@id": "9026738a-67cc-44b2-b178-f6693f378dbb" }, + "owningNamespace": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "owningRelationship": { "@id": "9026738a-67cc-44b2-b178-f6693f378dbb" }, + "owningType": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "FeatureValue", + "@id": "047febb5-2f13-4f15-a018-42368ad8a1c6", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "047febb5-2f13-4f15-a018-42368ad8a1c6", + "featureWithValue": { "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" }, + "memberElementId": "e3abf91a-38c6-43cd-a241-4aeae2fba909", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" }, + "ownedMemberElementId": "e3abf91a-38c6-43cd-a241-4aeae2fba909", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876" }, + { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } + ], + "shortName": null, + "source": [ { "@id": "046fe6e5-f78b-4a42-9fe9-eb856abe3876" } ], + "target": [ { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" } ], + "textualRepresentation": [], + "value": { "@id": "e3abf91a-38c6-43cd-a241-4aeae2fba909" }, + "visibility": "public" + }, + { + "@type": "FeatureReferenceExpression", + "@id": "04c936e2-8594-4702-b708-631067fe5583", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "direction": null, + "documentation": [], + "elementId": "04c936e2-8594-4702-b708-631067fe5583", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "featureMembership": [ { "@id": "b2801162-48f8-418e-b79f-8000b86046d5" } ], + "featuringType": [ { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": true, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } + ], + "membership": [ + { "@id": "37d77c8b-4acd-4c29-b0d7-e88df95a8cd9" }, + { "@id": "b2801162-48f8-418e-b79f-8000b86046d5" } + ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "b2801162-48f8-418e-b79f-8000b86046d5" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "ownedMembership": [ + { "@id": "37d77c8b-4acd-4c29-b0d7-e88df95a8cd9" }, + { "@id": "b2801162-48f8-418e-b79f-8000b86046d5" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "37d77c8b-4acd-4c29-b0d7-e88df95a8cd9" }, + { "@id": "b2801162-48f8-418e-b79f-8000b86046d5" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "bad9ca61-d032-48ab-9af6-cf35943f6e69" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "987efbb2-4e33-4c62-97f0-aac3a7526e9a" }, + "owningNamespace": { "@id": "bad9ca61-d032-48ab-9af6-cf35943f6e69" }, + "owningRelationship": { "@id": "987efbb2-4e33-4c62-97f0-aac3a7526e9a" }, + "owningType": null, + "parameter": [ { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" } ], + "qualifiedName": null, + "referent": { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + "result": { "@id": "c4281068-9fc9-460b-9804-a63300083d7e" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "LiteralInteger", + "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "direction": null, + "documentation": [], + "elementId": "054127a9-d60e-428d-89cb-8c2684fe7a76", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "featureMembership": [ { "@id": "20d877e5-99d2-4f76-82ff-1111fe634479" } ], + "featuringType": [ { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": true, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "membership": [ { "@id": "20d877e5-99d2-4f76-82ff-1111fe634479" } ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "20d877e5-99d2-4f76-82ff-1111fe634479" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "ownedMembership": [ { "@id": "20d877e5-99d2-4f76-82ff-1111fe634479" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "20d877e5-99d2-4f76-82ff-1111fe634479" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "0636fa77-ef04-41bb-8733-4c4695ec17fe" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "a28238b6-9c5e-4283-8cf4-f65eae4cf313" }, + "owningNamespace": { "@id": "0636fa77-ef04-41bb-8733-4c4695ec17fe" }, + "owningRelationship": { "@id": "a28238b6-9c5e-4283-8cf4-f65eae4cf313" }, + "owningType": null, + "parameter": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "qualifiedName": null, + "result": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "value": 2 + }, + { + "@type": "ReturnParameterMembership", + "@id": "05eb3d92-c0ed-4298-a4fd-115e2df12eb6", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "05eb3d92-c0ed-4298-a4fd-115e2df12eb6", + "feature": { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" }, + "memberElementId": "91b5aa2f-9e85-4577-801c-c2e3de7790a5", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" }, + "ownedMemberElementId": "91b5aa2f-9e85-4577-801c-c2e3de7790a5", + "ownedMemberFeature": { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + "owningRelationship": null, + "owningType": { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" } + ], + "shortName": null, + "source": [ { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" } ], + "target": [ { "@id": "91b5aa2f-9e85-4577-801c-c2e3de7790a5" } ], + "textualRepresentation": [], + "type": { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + "visibility": "public" + }, + { + "@type": "MultiplicityRange", + "@id": "0636fa77-ef04-41bb-8733-4c4695ec17fe", + "aliasIds": [], + "bound": [ { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } ], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": null, + "documentation": [], + "elementId": "0636fa77-ef04-41bb-8733-4c4695ec17fe", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "lowerBound": null, + "member": [ { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } ], + "membership": [ { "@id": "a28238b6-9c5e-4283-8cf4-f65eae4cf313" } ], + "multiplicity": null, + "name": null, + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } ], + "ownedMembership": [ { "@id": "a28238b6-9c5e-4283-8cf4-f65eae4cf313" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "a28238b6-9c5e-4283-8cf4-f65eae4cf313" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "ae33ee50-497b-4d4a-90c5-977e2f0f707e" }, + "owningNamespace": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "owningRelationship": { "@id": "ae33ee50-497b-4d4a-90c5-977e2f0f707e" }, + "owningType": null, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "upperBound": { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } + }, + { + "@type": "OwningMembership", + "@id": "063d63da-7467-4895-950a-f207e50b2320", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "063d63da-7467-4895-950a-f207e50b2320", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc" }, + "memberElementId": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc" }, + "ownedMemberElementId": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + { "@id": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc" } + ], + "shortName": null, + "source": [ { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" } ], + "target": [ { "@id": "6bbad425-2306-4d4e-85d0-f234c4b0a4dc" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "064c8edd-b4c5-4097-ba38-b0bfe4ccbc5a", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "064c8edd-b4c5-4097-ba38-b0bfe4ccbc5a", + "feature": { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" }, + "memberElementId": "2c85fc8e-b620-47b5-9fee-31001e1c8071", + "memberName": "", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" }, + "ownedMemberElementId": "2c85fc8e-b620-47b5-9fee-31001e1c8071", + "ownedMemberFeature": { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" }, + "ownedMemberName": "", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" }, + "owningRelationship": null, + "owningType": { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" }, + { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" } + ], + "shortName": null, + "source": [ { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" } ], + "target": [ { "@id": "2c85fc8e-b620-47b5-9fee-31001e1c8071" } ], + "textualRepresentation": [], + "type": { "@id": "ce6343fa-b9af-44f7-92ae-5f83fdad9254" }, + "visibility": "public" + }, + { + "@type": "OwningMembership", + "@id": "069fe4af-b8f5-4148-8838-eaf11de5463d", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "069fe4af-b8f5-4148-8838-eaf11de5463d", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" }, + "memberElementId": "59043fa2-8326-454c-9860-e4ba1acb5a4a", + "memberName": "~AutomaticClutchPort", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" }, + "ownedMemberElementId": "59043fa2-8326-454c-9860-e4ba1acb5a4a", + "ownedMemberName": "~AutomaticClutchPort", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" }, + { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" } + ], + "shortName": null, + "source": [ { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" } ], + "target": [ { "@id": "59043fa2-8326-454c-9860-e4ba1acb5a4a" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureTyping", + "@id": "06ca0999-4bd8-421e-bc3a-4a66ebbbc118", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "06ca0999-4bd8-421e-bc3a-4a66ebbbc118", + "general": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningFeature": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "owningRelationship": null, + "owningType": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" } + ], + "shortName": null, + "source": [ { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } ], + "specific": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "target": [ { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" } ], + "textualRepresentation": [], + "type": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "typedFeature": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } + }, + { + "@type": "OwningMembership", + "@id": "07291059-e894-4bc7-bbc0-b39f2b5dd57b", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "07291059-e894-4bc7-bbc0-b39f2b5dd57b", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff" }, + "memberElementId": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff", + "memberName": "Wheel", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff" }, + "ownedMemberElementId": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff", + "ownedMemberName": "Wheel", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + { "@id": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff" } + ], + "shortName": null, + "source": [ { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" } ], + "target": [ { "@id": "fcf3e22c-3be2-41cd-bb08-a0115c1f98ff" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "ReturnParameterMembership", + "@id": "0754e6c9-b1f7-4497-a9e2-01721f4ca9be", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0754e6c9-b1f7-4497-a9e2-01721f4ca9be", + "feature": { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" }, + "memberElementId": "e52d0909-ec73-4e0a-8dc4-4efef9e99224", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" }, + "ownedMemberElementId": "e52d0909-ec73-4e0a-8dc4-4efef9e99224", + "ownedMemberFeature": { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "owningRelationship": null, + "owningType": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" } + ], + "shortName": null, + "source": [ { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" } ], + "target": [ { "@id": "e52d0909-ec73-4e0a-8dc4-4efef9e99224" } ], + "textualRepresentation": [], + "type": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "0762c02a-dbe3-4186-8f54-cfda73ff0e52", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "0762c02a-dbe3-4186-8f54-cfda73ff0e52", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" } ], + "membership": [ { "@id": "79589e95-e819-4ed9-90ed-8494a8f80fd1" } ], + "multiplicity": null, + "name": "y", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" } ], + "ownedMembership": [ { "@id": "79589e95-e819-4ed9-90ed-8494a8f80fd1" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "79589e95-e819-4ed9-90ed-8494a8f80fd1" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "owningFeatureMembership": { "@id": "df858488-c8f4-4397-b0f7-8569292aecd3" }, + "owningMembership": { "@id": "df858488-c8f4-4397-b0f7-8569292aecd3" }, + "owningNamespace": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "owningRelationship": { "@id": "df858488-c8f4-4397-b0f7-8569292aecd3" }, + "owningType": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "ConjugatedPortDefinition", + "@id": "07d1840c-4b14-45a7-a8bf-5ea0f591997f", + "aliasIds": [], + "conjugatedPortDefinition": null, + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "07d1840c-4b14-45a7-a8bf-5ea0f591997f", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [ { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": true, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ { "@id": "07d1840c-4b14-45a7-a8bf-5ea0f591997f" } ], + "membership": [ { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } ], + "multiplicity": null, + "name": "~ClutchPort", + "originalPortDefinition": { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" }, + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": { "@id": "e1fb3ec0-057e-4d8a-8023-abe595b03b7f" }, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedPortConjugator": { "@id": "e1fb3ec0-057e-4d8a-8023-abe595b03b7f" }, + "ownedReference": [], + "ownedRelationship": [ { "@id": "e1fb3ec0-057e-4d8a-8023-abe595b03b7f" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" }, + "owningMembership": { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" }, + "owningNamespace": { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" }, + "owningRelationship": { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::ClutchPort::'~ClutchPort'", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "FeatureReferenceExpression", + "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } ], + "direction": null, + "documentation": [], + "elementId": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be", + "endFeature": [], + "endOwningType": null, + "feature": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } + ], + "featureMembership": [ + { "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8" }, + { "@id": "b66d974b-520e-4efc-86c1-a83865aaa780" } + ], + "featuringType": [ { "@id": "62110a4b-3137-497f-8af0-c0a7e095b5b5" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } + ], + "membership": [ + { "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8" }, + { "@id": "b66d974b-520e-4efc-86c1-a83865aaa780" } + ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } + ], + "ownedEndFeature": [], + "ownedFeature": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } + ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ + { "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8" }, + { "@id": "b66d974b-520e-4efc-86c1-a83865aaa780" } + ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } + ], + "ownedMembership": [ + { "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8" }, + { "@id": "b66d974b-520e-4efc-86c1-a83865aaa780" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8" }, + { "@id": "b66d974b-520e-4efc-86c1-a83865aaa780" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "171b02a2-8a45-4db9-9607-0f1281ce8dc5" }, + "owningNamespace": { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + "owningRelationship": { "@id": "171b02a2-8a45-4db9-9607-0f1281ce8dc5" }, + "owningType": null, + "parameter": [ { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" } ], + "qualifiedName": null, + "referent": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "result": { "@id": "389bac66-1504-4f95-a8b2-01b7c660b091" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "Membership", + "@id": "08dd0671-cd9e-4083-96d0-4a6b4901f16b", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "08dd0671-cd9e-4083-96d0-4a6b4901f16b", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + "memberElementId": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "6c9c90f9-c410-4ca8-af26-f66c440fb395" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "6c9c90f9-c410-4ca8-af26-f66c440fb395" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "6c9c90f9-c410-4ca8-af26-f66c440fb395" }, + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" } + ], + "shortName": null, + "source": [ { "@id": "6c9c90f9-c410-4ca8-af26-f66c440fb395" } ], + "target": [ { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "Membership", + "@id": "0902cbf1-407b-4c27-b914-22e6d700d36d", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0902cbf1-407b-4c27-b914-22e6d700d36d", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + "memberElementId": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" }, + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" } + ], + "shortName": null, + "source": [ { "@id": "dd99de52-d818-439f-a2d1-297d13151f39" } ], + "target": [ { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "ParameterMembership", + "@id": "090954b0-3629-49e1-9471-9b18b36b22ef", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "090954b0-3629-49e1-9471-9b18b36b22ef", + "feature": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "memberElementId": "913b2dfa-eaba-46d9-8064-25385a278985", + "memberName": "collection", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "ownedMemberElementId": "913b2dfa-eaba-46d9-8064-25385a278985", + "ownedMemberFeature": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "ownedMemberName": "collection", + "ownedMemberParameter": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "owningRelationship": null, + "owningType": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" } + ], + "shortName": null, + "source": [ { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" } ], + "target": [ { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" } ], + "textualRepresentation": [], + "type": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "visibility": "private" + }, + { + "@type": "PartDefinition", + "@id": "096580c9-edd5-4b4a-b036-08af7158404d", + "aliasIds": [], + "declaredName": "Driveshaft", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "096580c9-edd5-4b4a-b036-08af7158404d", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [], + "membership": [], + "multiplicity": null, + "name": "Driveshaft", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningMembership": { "@id": "5c70f1fc-1e55-46a5-8767-cb82b9b5574e" }, + "owningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": { "@id": "5c70f1fc-1e55-46a5-8767-cb82b9b5574e" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::Driveshaft", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "ReturnParameterMembership", + "@id": "09ed5662-4d11-4716-92ea-147996d7863e", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "09ed5662-4d11-4716-92ea-147996d7863e", + "feature": { "@id": "0a587242-36da-4038-9047-9731af14bf5e" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "0a587242-36da-4038-9047-9731af14bf5e" }, + "memberElementId": "0a587242-36da-4038-9047-9731af14bf5e", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "0a587242-36da-4038-9047-9731af14bf5e" }, + "ownedMemberElementId": "0a587242-36da-4038-9047-9731af14bf5e", + "ownedMemberFeature": { "@id": "0a587242-36da-4038-9047-9731af14bf5e" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "0a587242-36da-4038-9047-9731af14bf5e" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "0a587242-36da-4038-9047-9731af14bf5e" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "owningRelationship": null, + "owningType": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + { "@id": "0a587242-36da-4038-9047-9731af14bf5e" } + ], + "shortName": null, + "source": [ { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" } ], + "target": [ { "@id": "0a587242-36da-4038-9047-9731af14bf5e" } ], + "textualRepresentation": [], + "type": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "visibility": "public" + }, + { + "@type": "ReferenceUsage", + "@id": "0a587242-36da-4038-9047-9731af14bf5e", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "definition": [], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": "out", + "documentation": [], + "elementId": "0a587242-36da-4038-9047-9731af14bf5e", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "member": [], + "membership": [], + "multiplicity": null, + "name": "result", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "09ed5662-4d11-4716-92ea-147996d7863e" }, + "owningMembership": { "@id": "09ed5662-4d11-4716-92ea-147996d7863e" }, + "owningNamespace": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "owningRelationship": { "@id": "09ed5662-4d11-4716-92ea-147996d7863e" }, + "owningType": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "owningUsage": { "@id": "5c1dd2fb-ebf7-4c84-b6b4-ab0363ef54a4" }, + "qualifiedName": "'7b-Variant Configurations'::RequirementsModel::normalPerformanceRequirement::result", + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "Feature", + "@id": "0a820373-dc7c-4428-93f0-5e21723a31a1", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "0a820373-dc7c-4428-93f0-5e21723a31a1", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "d3715ab2-ae9e-416f-9bd4-055753be68cb" } ], + "membership": [ { "@id": "fc0e022f-5d23-419e-9276-436973bf23cc" } ], + "multiplicity": null, + "name": "x", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "d3715ab2-ae9e-416f-9bd4-055753be68cb" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "d3715ab2-ae9e-416f-9bd4-055753be68cb" } ], + "ownedMembership": [ { "@id": "fc0e022f-5d23-419e-9276-436973bf23cc" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "fc0e022f-5d23-419e-9276-436973bf23cc" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "owningFeatureMembership": { "@id": "026aea3b-e975-4b2a-b0f1-5178a69b0986" }, + "owningMembership": { "@id": "026aea3b-e975-4b2a-b0f1-5178a69b0986" }, + "owningNamespace": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "owningRelationship": { "@id": "026aea3b-e975-4b2a-b0f1-5178a69b0986" }, + "owningType": { "@id": "634c7beb-4472-4cde-9035-12cf587be9a1" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "PortDefinition", + "@id": "0a99119c-3308-44be-b826-2b358c2d5996", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" }, + "declaredName": "VehicleToRoadPort", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "0a99119c-3308-44be-b826-2b358c2d5996", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } ], + "membership": [ { "@id": "18157f27-b145-4ced-96f3-faa3f071cd07" } ], + "multiplicity": null, + "name": "VehicleToRoadPort", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } ], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [ { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } ], + "ownedMembership": [ { "@id": "18157f27-b145-4ced-96f3-faa3f071cd07" } ], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "18157f27-b145-4ced-96f3-faa3f071cd07" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningMembership": { "@id": "149742ca-1428-4b95-a2b3-383fafd4dbe2" }, + "owningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": { "@id": "149742ca-1428-4b95-a2b3-383fafd4dbe2" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::VehicleToRoadPort", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "Feature", + "@id": "0b625251-ff48-4e44-a134-54bdc4f2a40d", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "0b625251-ff48-4e44-a134-54bdc4f2a40d", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" } ], + "membership": [ { "@id": "86e575a7-436a-4093-8e2c-09ff3f82048b" } ], + "multiplicity": null, + "name": "y", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" } ], + "ownedMembership": [ { "@id": "86e575a7-436a-4093-8e2c-09ff3f82048b" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "86e575a7-436a-4093-8e2c-09ff3f82048b" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "owningFeatureMembership": { "@id": "024b30a6-5250-4c39-bec5-9902380c5a01" }, + "owningMembership": { "@id": "024b30a6-5250-4c39-bec5-9902380c5a01" }, + "owningNamespace": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "owningRelationship": { "@id": "024b30a6-5250-4c39-bec5-9902380c5a01" }, + "owningType": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "PortConjugation", + "@id": "0ba514a6-12f4-4005-8d7d-4fbd85a20fdf", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" }, + "conjugatedType": { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" }, + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0ba514a6-12f4-4005-8d7d-4fbd85a20fdf", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "originalPortDefinition": { "@id": "b7a118d3-f9e7-44d8-9503-6c4c875f6274" }, + "originalType": { "@id": "b7a118d3-f9e7-44d8-9503-6c4c875f6274" }, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" }, + "owningRelationship": null, + "owningType": { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" }, + { "@id": "b7a118d3-f9e7-44d8-9503-6c4c875f6274" } + ], + "shortName": null, + "source": [ { "@id": "476d3c76-563a-425b-af33-7d57c33cc4ef" } ], + "target": [ { "@id": "b7a118d3-f9e7-44d8-9503-6c4c875f6274" } ], + "textualRepresentation": [] + }, + { + "@type": "OwningMembership", + "@id": "0bb34e99-8c21-46f6-96e8-a1f10f30fa92", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0bb34e99-8c21-46f6-96e8-a1f10f30fa92", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "memberElementId": "965f2ecc-ae6d-409f-90b3-2352fd654ba1", + "memberName": "highPerformanceRequirement", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "ba58cfe3-77af-4b73-94bc-84e09b364cc6" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "ownedMemberElementId": "965f2ecc-ae6d-409f-90b3-2352fd654ba1", + "ownedMemberName": "highPerformanceRequirement", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "ba58cfe3-77af-4b73-94bc-84e09b364cc6" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "ba58cfe3-77af-4b73-94bc-84e09b364cc6" }, + { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } + ], + "shortName": null, + "source": [ { "@id": "ba58cfe3-77af-4b73-94bc-84e09b364cc6" } ], + "target": [ { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureValue", + "@id": "0bffb9e1-068e-4350-b8cd-fd78f3265481", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0bffb9e1-068e-4350-b8cd-fd78f3265481", + "featureWithValue": { "@id": "62d2f0c2-7830-4ebb-9c46-7f97394842aa" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "memberElementId": "ce799e80-d744-458e-b8de-9aacae37eb99", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "62d2f0c2-7830-4ebb-9c46-7f97394842aa" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "ownedMemberElementId": "ce799e80-d744-458e-b8de-9aacae37eb99", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "62d2f0c2-7830-4ebb-9c46-7f97394842aa" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "62d2f0c2-7830-4ebb-9c46-7f97394842aa" }, + { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" } + ], + "shortName": null, + "source": [ { "@id": "62d2f0c2-7830-4ebb-9c46-7f97394842aa" } ], + "target": [ { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" } ], + "textualRepresentation": [], + "value": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "visibility": "public" + }, + { + "@type": "ReturnParameterMembership", + "@id": "0d11aa65-edfb-4927-9aaa-19622658108d", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0d11aa65-edfb-4927-9aaa-19622658108d", + "feature": { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" }, + "memberElementId": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" }, + "ownedMemberElementId": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a", + "ownedMemberFeature": { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "owningRelationship": null, + "owningType": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" } + ], + "shortName": null, + "source": [ { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" } ], + "target": [ { "@id": "b60f2d4d-97f5-43db-b9c4-2a821f7ed40a" } ], + "textualRepresentation": [], + "type": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "0d646347-2a41-4fdc-8b71-316eef0ad608", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0d646347-2a41-4fdc-8b71-316eef0ad608", + "feature": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "memberElementId": "f8bd9751-c20c-4fd8-89b4-c24f29279733", + "memberName": "transmissionChoice", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "ownedMemberElementId": "f8bd9751-c20c-4fd8-89b4-c24f29279733", + "ownedMemberFeature": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "ownedMemberName": "transmissionChoice", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningRelationship": null, + "owningType": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" } + ], + "shortName": null, + "source": [ { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" } ], + "target": [ { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" } ], + "textualRepresentation": [], + "type": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "visibility": "public" + }, + { + "@type": "PartUsage", + "@id": "0d6a8e34-a3de-4801-838a-f7c5fd3cdbbb", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "transmission", + "declaredShortName": null, + "definition": [ { "@id": "6132fc45-1c28-46ed-bee5-e869584b818e" } ], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "0d6a8e34-a3de-4801-838a-f7c5fd3cdbbb", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "featureMembership": [ { "@id": "d93bfa83-ed2e-4875-9932-f892822db562" } ], + "featuringType": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "importedMembership": [], + "individualDefinition": null, + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": true, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": false, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "itemDefinition": [ { "@id": "6132fc45-1c28-46ed-bee5-e869584b818e" } ], + "member": [ + { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } + ], + "membership": [ + { "@id": "28eb8802-f739-4124-99f2-ea61a88bc74a" }, + { "@id": "d93bfa83-ed2e-4875-9932-f892822db562" } + ], + "multiplicity": { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + "name": "transmission", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "nestedMetadata": [], + "nestedOccurrence": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "nestedPart": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "occurrenceDefinition": [ { "@id": "6132fc45-1c28-46ed-bee5-e869584b818e" } ], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } + ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "d93bfa83-ed2e-4875-9932-f892822db562" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } + ], + "ownedMembership": [ + { "@id": "28eb8802-f739-4124-99f2-ea61a88bc74a" }, + { "@id": "d93bfa83-ed2e-4875-9932-f892822db562" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "89f4a465-3a2b-4894-9935-b2bdad00abb9" }, + { "@id": "28eb8802-f739-4124-99f2-ea61a88bc74a" }, + { "@id": "d93bfa83-ed2e-4875-9932-f892822db562" } + ], + "ownedSpecialization": [ { "@id": "89f4a465-3a2b-4894-9935-b2bdad00abb9" } ], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [ { "@id": "89f4a465-3a2b-4894-9935-b2bdad00abb9" } ], + "ownedUnioning": [], + "owner": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "fe7faf20-5a51-4194-a483-8ad2c2f4e619" }, + "owningMembership": { "@id": "fe7faf20-5a51-4194-a483-8ad2c2f4e619" }, + "owningNamespace": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningRelationship": { "@id": "fe7faf20-5a51-4194-a483-8ad2c2f4e619" }, + "owningType": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningUsage": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "partDefinition": [ { "@id": "6132fc45-1c28-46ed-bee5-e869584b818e" } ], + "portionKind": null, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::vehicle::transmission", + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "6132fc45-1c28-46ed-bee5-e869584b818e" } ], + "unioningType": [], + "usage": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "variant": [], + "variantMembership": [] + }, + { + "@type": "ReturnParameterMembership", + "@id": "0da3841e-2acd-40b1-bb59-c832024be822", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0da3841e-2acd-40b1-bb59-c832024be822", + "feature": { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" }, + "memberElementId": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" }, + "ownedMemberElementId": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb", + "ownedMemberFeature": { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" }, + "owningRelationship": null, + "owningType": { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" }, + { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" } + ], + "shortName": null, + "source": [ { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" } ], + "target": [ { "@id": "e6e13bd5-8c7d-4e66-8911-c6e063542bbb" } ], + "textualRepresentation": [], + "type": { "@id": "b952c9b3-a244-4a66-aa89-1bec8dd6cd5a" }, + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "0e1bfdc9-2a42-436b-bb2e-3ce18e42ae05", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "out", + "documentation": [], + "elementId": "0e1bfdc9-2a42-436b-bb2e-3ce18e42ae05", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "featureMembership": [ { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } ], + "featuringType": [ { "@id": "7561c960-c7f4-463c-8ea7-af205a01b545" } ], + "importedMembership": [], + "inheritedFeature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "inheritedMembership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } + ], + "membership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "multiplicity": null, + "name": "result", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "7561c960-c7f4-463c-8ea7-af205a01b545" }, + "owningFeatureMembership": { "@id": "b5f7ca7f-e537-4759-9598-c95244a783e8" }, + "owningMembership": { "@id": "b5f7ca7f-e537-4759-9598-c95244a783e8" }, + "owningNamespace": { "@id": "7561c960-c7f4-463c-8ea7-af205a01b545" }, + "owningRelationship": { "@id": "b5f7ca7f-e537-4759-9598-c95244a783e8" }, + "owningType": { "@id": "7561c960-c7f4-463c-8ea7-af205a01b545" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "a8155e03-9b89-4a0b-ba0d-7dde71f61404" } ], + "unioningType": [] + }, + { + "@type": "ResultExpressionMembership", + "@id": "0fb9bb9d-2f9d-4ef7-8519-cd522dae2fe2", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "0fb9bb9d-2f9d-4ef7-8519-cd522dae2fe2", + "feature": { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + "memberElementId": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + "ownedMemberElementId": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb", + "ownedMemberFeature": { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" } ], + "ownedRelationship": [], + "ownedResultExpression": { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + "owningRelationship": null, + "owningType": { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" } + ], + "shortName": null, + "source": [ { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" } ], + "target": [ { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" } ], + "textualRepresentation": [], + "type": { "@id": "e0ff5267-5a03-45db-bd90-20a25320c11f" }, + "visibility": "public" + }, + { + "@type": "PartDefinition", + "@id": "0fefdd0d-d126-49ff-ac20-cc6bc59d45e7", + "aliasIds": [], + "declaredName": "ManualTransmission", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "0fefdd0d-d126-49ff-ac20-cc6bc59d45e7", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [], + "membership": [], + "multiplicity": null, + "name": "ManualTransmission", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "3594c1b8-9944-4613-9668-4e4dbfabc5ae" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [ { "@id": "3594c1b8-9944-4613-9668-4e4dbfabc5ae" } ], + "ownedState": [], + "ownedSubclassification": [ { "@id": "3594c1b8-9944-4613-9668-4e4dbfabc5ae" } ], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningMembership": { "@id": "3f7a856c-9728-4095-9945-d6ef0111a5a0" }, + "owningNamespace": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningRelationship": { "@id": "3f7a856c-9728-4095-9945-d6ef0111a5a0" }, + "qualifiedName": "'7b-Variant Configurations'::VariantDefinitions::ManualTransmission", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "FeatureValue", + "@id": "10150c5d-c698-4547-b669-188794a3e706", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "10150c5d-c698-4547-b669-188794a3e706", + "featureWithValue": { "@id": "bebf23af-7a4d-4f3b-b4fa-f6e78c0e34bc" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "memberElementId": "73213e1e-0c19-431e-82ba-c5a581fa9ab9", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "bebf23af-7a4d-4f3b-b4fa-f6e78c0e34bc" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "ownedMemberElementId": "73213e1e-0c19-431e-82ba-c5a581fa9ab9", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "bebf23af-7a4d-4f3b-b4fa-f6e78c0e34bc" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "bebf23af-7a4d-4f3b-b4fa-f6e78c0e34bc" }, + { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" } + ], + "shortName": null, + "source": [ { "@id": "bebf23af-7a4d-4f3b-b4fa-f6e78c0e34bc" } ], + "target": [ { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" } ], + "textualRepresentation": [], + "value": { "@id": "73213e1e-0c19-431e-82ba-c5a581fa9ab9" }, + "visibility": "public" + }, + { + "@type": "FeatureTyping", + "@id": "101b021c-9cef-473e-bed5-4a338e435aa7", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "101b021c-9cef-473e-bed5-4a338e435aa7", + "general": { "@id": "bbc9becc-8a96-448c-8eed-a05ccb7c0eaf" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningFeature": { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" }, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" }, + "owningRelationship": null, + "owningType": { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" }, + { "@id": "bbc9becc-8a96-448c-8eed-a05ccb7c0eaf" } + ], + "shortName": null, + "source": [ { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" } ], + "specific": { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" }, + "target": [ { "@id": "bbc9becc-8a96-448c-8eed-a05ccb7c0eaf" } ], + "textualRepresentation": [], + "type": { "@id": "bbc9becc-8a96-448c-8eed-a05ccb7c0eaf" }, + "typedFeature": { "@id": "4d34c67e-1737-4bcf-b638-b36a334f6ed9" } + }, + { + "@type": "ReturnParameterMembership", + "@id": "103da5e4-34aa-4d84-89d3-a2b3d184b6db", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "103da5e4-34aa-4d84-89d3-a2b3d184b6db", + "feature": { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" }, + "memberElementId": "e47b5549-84af-4e4d-8dea-afe44afbf686", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" }, + "ownedMemberElementId": "e47b5549-84af-4e4d-8dea-afe44afbf686", + "ownedMemberFeature": { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" }, + "owningRelationship": null, + "owningType": { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" }, + { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" } + ], + "shortName": null, + "source": [ { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" } ], + "target": [ { "@id": "e47b5549-84af-4e4d-8dea-afe44afbf686" } ], + "textualRepresentation": [], + "type": { "@id": "632c8f8f-8ba9-4cb6-9c8a-b46c82fdf083" }, + "visibility": "public" + }, + { + "@type": "PortConjugation", + "@id": "10cf976f-67d6-4f0b-b7a1-dceb5860a9c2", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + "conjugatedType": { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "10cf976f-67d6-4f0b-b7a1-dceb5860a9c2", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "originalPortDefinition": { "@id": "163aadce-0532-401f-aec6-6c462a4d1f36" }, + "originalType": { "@id": "163aadce-0532-401f-aec6-6c462a4d1f36" }, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + "owningRelationship": null, + "owningType": { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + { "@id": "163aadce-0532-401f-aec6-6c462a4d1f36" } + ], + "shortName": null, + "source": [ { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" } ], + "target": [ { "@id": "163aadce-0532-401f-aec6-6c462a4d1f36" } ], + "textualRepresentation": [] + }, + { + "@type": "OwningMembership", + "@id": "11284c92-46bc-46ad-9e97-bc3ad70c0118", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "11284c92-46bc-46ad-9e97-bc3ad70c0118", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "memberElementId": "85a82129-4d0d-436f-afad-ed94b8416222", + "memberName": "vehicle", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "ownedMemberElementId": "85a82129-4d0d-436f-afad-ed94b8416222", + "ownedMemberName": "vehicle", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } + ], + "shortName": null, + "source": [ { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" } ], + "target": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "1204d29c-7e1a-436f-837f-f3096948280e", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "out", + "documentation": [], + "elementId": "1204d29c-7e1a-436f-837f-f3096948280e", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [], + "membership": [], + "multiplicity": null, + "name": "result", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "owningFeatureMembership": { "@id": "437445a5-6c09-4027-bd36-250f2ed26bee" }, + "owningMembership": { "@id": "437445a5-6c09-4027-bd36-250f2ed26bee" }, + "owningNamespace": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "owningRelationship": { "@id": "437445a5-6c09-4027-bd36-250f2ed26bee" }, + "owningType": { "@id": "f8547ecc-e215-4426-91d7-d0378bdbb6f9" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "ReturnParameterMembership", + "@id": "123a56d4-528c-4aa9-90ad-b8346d184dec", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "123a56d4-528c-4aa9-90ad-b8346d184dec", + "feature": { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" }, + "memberElementId": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" }, + "ownedMemberElementId": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28", + "ownedMemberFeature": { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "owningRelationship": null, + "owningType": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" } + ], + "shortName": null, + "source": [ { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" } ], + "target": [ { "@id": "a0c5a6da-e281-46de-8df4-ed3b50ca5c28" } ], + "textualRepresentation": [], + "type": { "@id": "bcfa53ef-fdfe-45db-afc8-b63eea2c64c6" }, + "visibility": "public" + }, + { + "@type": "ReturnParameterMembership", + "@id": "12f8c660-6a37-4051-a283-bc5e63d4793f", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "12f8c660-6a37-4051-a283-bc5e63d4793f", + "feature": { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" }, + "memberElementId": "a8c4284f-9989-48e9-abbb-984058c253d3", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" }, + "ownedMemberElementId": "a8c4284f-9989-48e9-abbb-984058c253d3", + "ownedMemberFeature": { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "owningRelationship": null, + "owningType": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" } + ], + "shortName": null, + "source": [ { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" } ], + "target": [ { "@id": "a8c4284f-9989-48e9-abbb-984058c253d3" } ], + "textualRepresentation": [], + "type": { "@id": "f1a44980-53ef-404a-baab-e96e61e747ec" }, + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "12fb9b2a-36d6-4980-b35e-051a7ffbd243", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ + { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + { "@id": "b588d26b-fd05-442c-a6e5-049e1ce0bf0f" } + ], + "direction": "out", + "documentation": [], + "elementId": "12fb9b2a-36d6-4980-b35e-051a7ffbd243", + "endFeature": [], + "endOwningType": null, + "feature": [ + { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + { "@id": "b588d26b-fd05-442c-a6e5-049e1ce0bf0f" } + ], + "featureMembership": [ + { "@id": "c18a4709-d4c5-4929-a7ce-ae936ddbcb25" }, + { "@id": "0fb9bb9d-2f9d-4ef7-8519-cd522dae2fe2" }, + { "@id": "3c901dea-1dde-41ce-be63-6735e0a9d619" } + ], + "featuringType": [ { "@id": "0292b0ea-288d-4128-b9fa-f4f19231eadf" } ], + "importedMembership": [], + "inheritedFeature": [ + { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + { "@id": "b588d26b-fd05-442c-a6e5-049e1ce0bf0f" } + ], + "inheritedMembership": [ + { "@id": "c18a4709-d4c5-4929-a7ce-ae936ddbcb25" }, + { "@id": "0fb9bb9d-2f9d-4ef7-8519-cd522dae2fe2" }, + { "@id": "3c901dea-1dde-41ce-be63-6735e0a9d619" } + ], + "input": [ { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" } ], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" }, + { "@id": "b588d26b-fd05-442c-a6e5-049e1ce0bf0f" } + ], + "membership": [ + { "@id": "c18a4709-d4c5-4929-a7ce-ae936ddbcb25" }, + { "@id": "0fb9bb9d-2f9d-4ef7-8519-cd522dae2fe2" }, + { "@id": "3c901dea-1dde-41ce-be63-6735e0a9d619" } + ], + "multiplicity": null, + "name": "result", + "output": [ { "@id": "b588d26b-fd05-442c-a6e5-049e1ce0bf0f" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "0292b0ea-288d-4128-b9fa-f4f19231eadf" }, + "owningFeatureMembership": { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" }, + "owningMembership": { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" }, + "owningNamespace": { "@id": "0292b0ea-288d-4128-b9fa-f4f19231eadf" }, + "owningRelationship": { "@id": "68fc110e-789f-4f06-b546-dff5000c4af9" }, + "owningType": { "@id": "0292b0ea-288d-4128-b9fa-f4f19231eadf" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "VariantMembership", + "@id": "133d477e-01f1-4aa3-b8e2-0141a34a3dec", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "133d477e-01f1-4aa3-b8e2-0141a34a3dec", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" }, + "memberElementId": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8", + "memberName": "manualTransmission", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" }, + "ownedMemberElementId": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8", + "ownedMemberName": "manualTransmission", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" } ], + "ownedRelationship": [], + "ownedVariantUsage": { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" }, + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" } + ], + "shortName": null, + "source": [ { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" } ], + "target": [ { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "13443ee2-f199-4ef8-850e-ec2741faca3a", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "13443ee2-f199-4ef8-850e-ec2741faca3a", + "feature": { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" }, + "memberElementId": "e1b0670b-0726-458f-b4e1-f9e7654dafd0", + "memberName": "rearAxleAssembly", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" }, + "ownedMemberElementId": "e1b0670b-0726-458f-b4e1-f9e7654dafd0", + "ownedMemberFeature": { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" }, + "ownedMemberName": "rearAxleAssembly", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningRelationship": null, + "owningType": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" } + ], + "shortName": null, + "source": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "target": [ { "@id": "e1b0670b-0726-458f-b4e1-f9e7654dafd0" } ], + "textualRepresentation": [], + "type": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "visibility": "public" + }, + { + "@type": "PortDefinition", + "@id": "135bed38-0626-4e58-9288-7e2f675467e3", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + "declaredName": "WheelToRoadPort", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "135bed38-0626-4e58-9288-7e2f675467e3", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" } ], + "membership": [ { "@id": "7ffe580c-fce1-450e-85b3-ba1971bcefe5" } ], + "multiplicity": null, + "name": "WheelToRoadPort", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" } ], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [ { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" } ], + "ownedMembership": [ { "@id": "7ffe580c-fce1-450e-85b3-ba1971bcefe5" } ], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "7ffe580c-fce1-450e-85b3-ba1971bcefe5" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningMembership": { "@id": "cddc996f-01d2-4b7f-846f-2d3bb895e91e" }, + "owningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": { "@id": "cddc996f-01d2-4b7f-846f-2d3bb895e91e" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::WheelToRoadPort", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "FeatureValue", + "@id": "13b604ac-21cc-4c45-89e2-3f7d0a7b7180", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "13b604ac-21cc-4c45-89e2-3f7d0a7b7180", + "featureWithValue": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" }, + "memberElementId": "9789bc39-0b25-49f9-a66a-82f0b80250b5", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" }, + "ownedMemberElementId": "9789bc39-0b25-49f9-a66a-82f0b80250b5", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" }, + { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" } + ], + "shortName": null, + "source": [ { "@id": "913b2dfa-eaba-46d9-8064-25385a278985" } ], + "target": [ { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" } ], + "textualRepresentation": [], + "value": { "@id": "9789bc39-0b25-49f9-a66a-82f0b80250b5" }, + "visibility": "public" + }, + { + "@type": "ReferenceUsage", + "@id": "13c2a47d-b8e0-4ed6-8e73-17422b06f474", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "w", + "declaredShortName": null, + "definition": [], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": "in", + "documentation": [], + "elementId": "13c2a47d-b8e0-4ed6-8e73-17422b06f474", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "member": [], + "membership": [], + "multiplicity": null, + "name": "w", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "af376105-80cf-42d7-88e0-510e3c923d7b" }, + "owningMembership": { "@id": "af376105-80cf-42d7-88e0-510e3c923d7b" }, + "owningNamespace": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "owningRelationship": { "@id": "af376105-80cf-42d7-88e0-510e3c923d7b" }, + "owningType": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "owningUsage": null, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "OwningMembership", + "@id": "141bb063-1f8d-4628-be25-4136554b1174", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "141bb063-1f8d-4628-be25-4136554b1174", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "b6352861-5c18-47d1-b911-3c87f0cbb874" }, + "memberElementId": "b6352861-5c18-47d1-b911-3c87f0cbb874", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "840474a6-85ff-46ce-8ab4-3f1ad3174a2f" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "b6352861-5c18-47d1-b911-3c87f0cbb874" }, + "ownedMemberElementId": "b6352861-5c18-47d1-b911-3c87f0cbb874", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "b6352861-5c18-47d1-b911-3c87f0cbb874" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "840474a6-85ff-46ce-8ab4-3f1ad3174a2f" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "840474a6-85ff-46ce-8ab4-3f1ad3174a2f" }, + { "@id": "b6352861-5c18-47d1-b911-3c87f0cbb874" } + ], + "shortName": null, + "source": [ { "@id": "840474a6-85ff-46ce-8ab4-3f1ad3174a2f" } ], + "target": [ { "@id": "b6352861-5c18-47d1-b911-3c87f0cbb874" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "14237e8d-11e1-4175-8ec6-ef50fad454f8", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "14237e8d-11e1-4175-8ec6-ef50fad454f8", + "feature": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "memberElementId": "37e66d88-b870-46eb-8535-35dc503be9fc", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "ownedMemberElementId": "37e66d88-b870-46eb-8535-35dc503be9fc", + "ownedMemberFeature": { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" }, + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "owningRelationship": null, + "owningType": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" } + ], + "shortName": null, + "source": [ { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" } ], + "target": [ { "@id": "37e66d88-b870-46eb-8535-35dc503be9fc" } ], + "textualRepresentation": [], + "type": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "visibility": "public" + }, + { + "@type": "FeatureValue", + "@id": "144a4c1c-20e0-469c-9a65-429f081061ac", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "144a4c1c-20e0-469c-9a65-429f081061ac", + "featureWithValue": { "@id": "81d6943d-79fe-4bfd-8a8f-3fb8ab6d1afa" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" }, + "memberElementId": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "81d6943d-79fe-4bfd-8a8f-3fb8ab6d1afa" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" }, + "ownedMemberElementId": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "81d6943d-79fe-4bfd-8a8f-3fb8ab6d1afa" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "81d6943d-79fe-4bfd-8a8f-3fb8ab6d1afa" }, + { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" } + ], + "shortName": null, + "source": [ { "@id": "81d6943d-79fe-4bfd-8a8f-3fb8ab6d1afa" } ], + "target": [ { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" } ], + "textualRepresentation": [], + "value": { "@id": "e4ee82bb-7eae-45b0-8f60-3c9e2ba70c19" }, + "visibility": "public" + }, + { + "@type": "OwningMembership", + "@id": "149742ca-1428-4b95-a2b3-383fafd4dbe2", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "149742ca-1428-4b95-a2b3-383fafd4dbe2", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" }, + "memberElementId": "0a99119c-3308-44be-b826-2b358c2d5996", + "memberName": "VehicleToRoadPort", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" }, + "ownedMemberElementId": "0a99119c-3308-44be-b826-2b358c2d5996", + "ownedMemberName": "VehicleToRoadPort", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" } + ], + "shortName": null, + "source": [ { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" } ], + "target": [ { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "ParameterMembership", + "@id": "1530c0ae-b352-4c68-8f2f-567549d75fa1", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1530c0ae-b352-4c68-8f2f-567549d75fa1", + "feature": { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" }, + "memberElementId": "29052048-6fc7-457d-a722-533c4f4c7582", + "memberName": "y", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" }, + "ownedMemberElementId": "29052048-6fc7-457d-a722-533c4f4c7582", + "ownedMemberFeature": { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" }, + "ownedMemberName": "y", + "ownedMemberParameter": { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" }, + "owningRelationship": null, + "owningType": { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" }, + { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" } + ], + "shortName": null, + "source": [ { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" } ], + "target": [ { "@id": "29052048-6fc7-457d-a722-533c4f4c7582" } ], + "textualRepresentation": [], + "type": { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" }, + "visibility": "private" + }, + { + "@type": "PartUsage", + "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "automaticTransmission", + "declaredShortName": null, + "definition": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "156bc827-0f67-48ce-97d5-0e1ff499cbbb", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "featureMembership": [ { "@id": "60052f2b-a1ef-4b58-9a2c-f5d3d259022b" } ], + "featuringType": [], + "importedMembership": [], + "individualDefinition": null, + "inheritedFeature": [], + "inheritedMembership": [ + { "@id": "133d477e-01f1-4aa3-b8e2-0141a34a3dec" }, + { "@id": "a2e31961-7b52-406b-9b62-db57c99df8fb" }, + { "@id": "28eb8802-f739-4124-99f2-ea61a88bc74a" } + ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "itemDefinition": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "member": [ + { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" }, + { "@id": "7b46e74d-dde7-41e1-aaf0-2321ff2280a8" }, + { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" } + ], + "membership": [ + { "@id": "60052f2b-a1ef-4b58-9a2c-f5d3d259022b" }, + { "@id": "133d477e-01f1-4aa3-b8e2-0141a34a3dec" }, + { "@id": "a2e31961-7b52-406b-9b62-db57c99df8fb" }, + { "@id": "28eb8802-f739-4124-99f2-ea61a88bc74a" } + ], + "multiplicity": null, + "name": "automaticTransmission", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "nestedMetadata": [], + "nestedOccurrence": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "nestedPart": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "occurrenceDefinition": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "60052f2b-a1ef-4b58-9a2c-f5d3d259022b" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "ownedMembership": [ { "@id": "60052f2b-a1ef-4b58-9a2c-f5d3d259022b" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "21d8c785-6838-43b9-9bce-666a42090da6" }, + { "@id": "60052f2b-a1ef-4b58-9a2c-f5d3d259022b" } + ], + "ownedSpecialization": [ { "@id": "21d8c785-6838-43b9-9bce-666a42090da6" } ], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [ { "@id": "21d8c785-6838-43b9-9bce-666a42090da6" } ], + "ownedUnioning": [], + "owner": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "owningDefinition": null, + "owningFeatureMembership": null, + "owningMembership": { "@id": "a2e31961-7b52-406b-9b62-db57c99df8fb" }, + "owningNamespace": { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + "owningRelationship": { "@id": "a2e31961-7b52-406b-9b62-db57c99df8fb" }, + "owningType": null, + "owningUsage": null, + "partDefinition": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "portionKind": null, + "qualifiedName": "'7b-Variant Configurations'::VariabilityModel::anyVehicleConfig::transmissionChoice::automaticTransmission", + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "unioningType": [], + "usage": [ { "@id": "867032b8-8198-4dbe-9f3b-e34d871527e2" } ], + "variant": [], + "variantMembership": [] + }, + { + "@type": "PortUsage", + "@id": "15b57cfe-2369-4cf6-b68a-93233f9a3138", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "clutchPort", + "declaredShortName": null, + "definition": [ { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" } ], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "15b57cfe-2369-4cf6-b68a-93233f9a3138", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" } ], + "importedMembership": [], + "individualDefinition": null, + "inheritedFeature": [], + "inheritedMembership": [ { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "member": [ + { "@id": "8ccde233-bd4d-4383-9854-572f0e792bda" }, + { "@id": "07d1840c-4b14-45a7-a8bf-5ea0f591997f" } + ], + "membership": [ + { "@id": "d8b971b1-17d7-4649-80fa-98409ee5da7d" }, + { "@id": "909f24d8-9130-4932-bcab-c3fbf045455b" } + ], + "multiplicity": { "@id": "8ccde233-bd4d-4383-9854-572f0e792bda" }, + "name": "clutchPort", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "occurrenceDefinition": [ { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" } ], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "8ccde233-bd4d-4383-9854-572f0e792bda" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "8ccde233-bd4d-4383-9854-572f0e792bda" } ], + "ownedMembership": [ { "@id": "d8b971b1-17d7-4649-80fa-98409ee5da7d" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "d136b9c6-588b-4490-a153-c47073972d4a" }, + { "@id": "d8b971b1-17d7-4649-80fa-98409ee5da7d" } + ], + "ownedSpecialization": [ { "@id": "d136b9c6-588b-4490-a153-c47073972d4a" } ], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [ { "@id": "d136b9c6-588b-4490-a153-c47073972d4a" } ], + "ownedUnioning": [], + "owner": { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "28913855-4fab-4c71-985d-335a9c220202" }, + "owningMembership": { "@id": "28913855-4fab-4c71-985d-335a9c220202" }, + "owningNamespace": { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" }, + "owningRelationship": { "@id": "28913855-4fab-4c71-985d-335a9c220202" }, + "owningType": { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" }, + "owningUsage": { "@id": "ffc5592f-df87-45d0-96a7-4f5c965428a9" }, + "portDefinition": [ { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" } ], + "portionKind": null, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::vehicle::transmission::clutch::clutchPort", + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "c61c076f-8346-4f75-8cda-91f9b94e13f5" } ], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "PortDefinition", + "@id": "163aadce-0532-401f-aec6-6c462a4d1f36", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" }, + "declaredName": "ShaftPort_b", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "163aadce-0532-401f-aec6-6c462a4d1f36", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" } ], + "membership": [ { "@id": "dc3a80c0-50b9-460d-9bca-00e4b405e397" } ], + "multiplicity": null, + "name": "ShaftPort_b", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" } ], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [ { "@id": "b9af997f-a45c-493a-b0fa-3914d8c5224b" } ], + "ownedMembership": [ { "@id": "dc3a80c0-50b9-460d-9bca-00e4b405e397" } ], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "dc3a80c0-50b9-460d-9bca-00e4b405e397" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningMembership": { "@id": "5fd84992-58e0-4183-9e1d-dc00786be621" }, + "owningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": { "@id": "5fd84992-58e0-4183-9e1d-dc00786be621" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::ShaftPort_b", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "BindingConnectorAsUsage", + "@id": "163f2a4f-890b-48fc-9e72-909db3e25a13", + "aliasIds": [], + "association": [], + "chainingFeature": [], + "connectorEnd": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "declaredName": null, + "declaredShortName": null, + "definition": [], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "163f2a4f-890b-48fc-9e72-909db3e25a13", + "endFeature": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "endOwningType": null, + "feature": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "featureMembership": [ + { "@id": "e2dc15f5-d398-4971-9076-27d4eaa8207a" }, + { "@id": "6f9afd67-d4c8-4436-b43e-4c1f47cccf24" } + ], + "featuringType": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isDirected": false, + "isEnd": false, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": false, + "member": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "membership": [ + { "@id": "e2dc15f5-d398-4971-9076-27d4eaa8207a" }, + { "@id": "6f9afd67-d4c8-4436-b43e-4c1f47cccf24" } + ], + "multiplicity": null, + "name": null, + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "ownedEndFeature": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "ownedFeature": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ + { "@id": "e2dc15f5-d398-4971-9076-27d4eaa8207a" }, + { "@id": "6f9afd67-d4c8-4436-b43e-4c1f47cccf24" } + ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "2ed39e9f-dc66-4ed4-a473-63954ec53e62" }, + { "@id": "b14ea734-8102-4ca6-b2f1-a44a10b620a9" } + ], + "ownedMembership": [ + { "@id": "e2dc15f5-d398-4971-9076-27d4eaa8207a" }, + { "@id": "6f9afd67-d4c8-4436-b43e-4c1f47cccf24" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelatedElement": [], + "ownedRelationship": [ + { "@id": "e2dc15f5-d398-4971-9076-27d4eaa8207a" }, + { "@id": "6f9afd67-d4c8-4436-b43e-4c1f47cccf24" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + "owningMembership": { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + "owningNamespace": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningRelatedElement": null, + "owningRelationship": { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + "owningType": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningUsage": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "fe153dc1-1126-401e-a5bc-b0fb09e36e9e" } + ], + "relatedFeature": [ + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "fe153dc1-1126-401e-a5bc-b0fb09e36e9e" } + ], + "shortName": null, + "source": [ { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" } ], + "sourceFeature": { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + "target": [ { "@id": "fe153dc1-1126-401e-a5bc-b0fb09e36e9e" } ], + "targetFeature": [ { "@id": "fe153dc1-1126-401e-a5bc-b0fb09e36e9e" } ], + "textualRepresentation": [], + "type": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "FeatureMembership", + "@id": "16fa7886-24a2-41e1-8a5a-87902a0f58bf", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "16fa7886-24a2-41e1-8a5a-87902a0f58bf", + "feature": { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + "memberElementId": "b51c394f-7811-42c3-8374-8fe20d92fbd7", + "memberName": "fuelCmdPort", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + "ownedMemberElementId": "b51c394f-7811-42c3-8374-8fe20d92fbd7", + "ownedMemberFeature": { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + "ownedMemberName": "fuelCmdPort", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "owningRelationship": null, + "owningType": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" } + ], + "shortName": null, + "source": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "target": [ { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" } ], + "textualRepresentation": [], + "type": { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" }, + "visibility": "public" + }, + { + "@type": "FeatureValue", + "@id": "171b02a2-8a45-4db9-9607-0f1281ce8dc5", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "171b02a2-8a45-4db9-9607-0f1281ce8dc5", + "featureWithValue": { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "memberElementId": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "ownedMemberElementId": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" }, + { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" } + ], + "shortName": null, + "source": [ { "@id": "e56167b5-dff7-4870-91a1-2ab04cb85ef1" } ], + "target": [ { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" } ], + "textualRepresentation": [], + "value": { "@id": "085f4620-3a4f-4d1c-8b4f-f8701b38a0be" }, + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "1764dbae-3a84-408b-8d24-347589cec4f0", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1764dbae-3a84-408b-8d24-347589cec4f0", + "feature": { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" }, + "memberElementId": "569a2b35-4283-4cec-ab0c-3990c8889b27", + "memberName": "shaftPort_c", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" }, + "ownedMemberElementId": "569a2b35-4283-4cec-ab0c-3990c8889b27", + "ownedMemberFeature": { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" }, + "ownedMemberName": "shaftPort_c", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + "owningRelationship": null, + "owningType": { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" } + ], + "shortName": null, + "source": [ { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" } ], + "target": [ { "@id": "569a2b35-4283-4cec-ab0c-3990c8889b27" } ], + "textualRepresentation": [], + "type": { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + "visibility": "public" + }, + { + "@type": "OwningMembership", + "@id": "18157f27-b145-4ced-96f3-faa3f071cd07", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "18157f27-b145-4ced-96f3-faa3f071cd07", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" }, + "memberElementId": "dd79728d-7a4b-4eee-a348-f9bb07a7992c", + "memberName": "~VehicleToRoadPort", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" }, + "ownedMemberElementId": "dd79728d-7a4b-4eee-a348-f9bb07a7992c", + "ownedMemberName": "~VehicleToRoadPort", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" }, + { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } + ], + "shortName": null, + "source": [ { "@id": "0a99119c-3308-44be-b826-2b358c2d5996" } ], + "target": [ { "@id": "dd79728d-7a4b-4eee-a348-f9bb07a7992c" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "LiteralInteger", + "@id": "18c1fccd-9d76-4b37-97f0-a78a895cb16e", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "direction": null, + "documentation": [], + "elementId": "18c1fccd-9d76-4b37-97f0-a78a895cb16e", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "featureMembership": [ { "@id": "526a75e5-800c-4cff-b4d3-e493c517a3a9" } ], + "featuringType": [ { "@id": "85a82129-4d0d-436f-afad-ed94b8416222" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": true, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "membership": [ { "@id": "526a75e5-800c-4cff-b4d3-e493c517a3a9" } ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "526a75e5-800c-4cff-b4d3-e493c517a3a9" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "ownedMembership": [ { "@id": "526a75e5-800c-4cff-b4d3-e493c517a3a9" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "526a75e5-800c-4cff-b4d3-e493c517a3a9" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "3d367c4f-bf5b-429b-9c5d-e1b66b47792e" }, + "owningNamespace": { "@id": "68365e30-1f76-4979-b794-29b4cccc10b6" }, + "owningRelationship": { "@id": "3d367c4f-bf5b-429b-9c5d-e1b66b47792e" }, + "owningType": null, + "parameter": [ { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" } ], + "qualifiedName": null, + "result": { "@id": "46f05d72-fc7e-4809-b86c-fbfec63b19c6" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [], + "value": 1 + }, + { + "@type": "PartUsage", + "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "engineChoice", + "declaredShortName": null, + "definition": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "featureMembership": [ { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } ], + "featuringType": [ { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" } ], + "importedMembership": [], + "individualDefinition": null, + "inheritedFeature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "inheritedMembership": [ + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "input": [], + "intersectingType": [], + "isAbstract": true, + "isComposite": true, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": false, + "isSufficient": false, + "isUnique": true, + "isVariation": true, + "itemDefinition": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "member": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } + ], + "membership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "multiplicity": null, + "name": "engineChoice", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "occurrenceDefinition": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" } + ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" } + ], + "ownedMembership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" } + ], + "ownedRedefinition": [ { "@id": "aee407cd-5ef9-433f-b7d8-f5ab21bd218f" } ], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "aee407cd-5ef9-433f-b7d8-f5ab21bd218f" }, + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" } + ], + "ownedSpecialization": [ { "@id": "aee407cd-5ef9-433f-b7d8-f5ab21bd218f" } ], + "ownedSubsetting": [ { "@id": "aee407cd-5ef9-433f-b7d8-f5ab21bd218f" } ], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningDefinition": null, + "owningFeatureMembership": { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + "owningMembership": { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + "owningNamespace": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningRelationship": { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + "owningType": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningUsage": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "partDefinition": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "portionKind": null, + "qualifiedName": "'7b-Variant Configurations'::VariabilityModel::anyVehicleConfig::engineChoice", + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "unioningType": [], + "usage": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "variant": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" } + ], + "variantMembership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" } + ] + }, + { + "@type": "PortConjugation", + "@id": "19678513-42af-42f4-a0f7-435ebf238ef6", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" }, + "conjugatedType": { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" }, + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "19678513-42af-42f4-a0f7-435ebf238ef6", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "originalPortDefinition": { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" }, + "originalType": { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" }, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" }, + "owningRelationship": null, + "owningType": { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" }, + { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" } + ], + "shortName": null, + "source": [ { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" } ], + "target": [ { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" } ], + "textualRepresentation": [] + }, + { + "@type": "FeatureMembership", + "@id": "19f9e942-151e-4487-a63f-1446b8672869", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "19f9e942-151e-4487-a63f-1446b8672869", + "feature": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "memberElementId": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "337861db-7656-4984-b1e0-13d8a501270e" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "ownedMemberElementId": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b", + "ownedMemberFeature": { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" }, + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "337861db-7656-4984-b1e0-13d8a501270e" }, + "owningRelationship": null, + "owningType": { "@id": "337861db-7656-4984-b1e0-13d8a501270e" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "337861db-7656-4984-b1e0-13d8a501270e" }, + { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" } + ], + "shortName": null, + "source": [ { "@id": "337861db-7656-4984-b1e0-13d8a501270e" } ], + "target": [ { "@id": "c8b3deab-4cce-4e87-b8cd-2c2fe1fe7b6b" } ], + "textualRepresentation": [], + "type": { "@id": "337861db-7656-4984-b1e0-13d8a501270e" }, + "visibility": "public" + }, + { + "@type": "ReturnParameterMembership", + "@id": "1a57010c-c76a-443d-908e-7233094477da", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1a57010c-c76a-443d-908e-7233094477da", + "feature": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "memberElementId": "1c63948a-aaf5-41b1-9d76-55bb8062b78b", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "ownedMemberElementId": "1c63948a-aaf5-41b1-9d76-55bb8062b78b", + "ownedMemberFeature": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "owningRelationship": null, + "owningType": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } + ], + "shortName": null, + "source": [ { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" } ], + "target": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "textualRepresentation": [], + "type": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "visibility": "public" + }, + { + "@type": "PartDefinition", + "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00", + "aliasIds": [], + "declaredName": "Engine", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "1ab514bf-6636-4b56-b938-0a77239f9a00", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [], + "membership": [], + "multiplicity": null, + "name": "Engine", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningMembership": { "@id": "a0195ea0-d1b0-455f-a170-d939ee0ad94d" }, + "owningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": { "@id": "a0195ea0-d1b0-455f-a170-d939ee0ad94d" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::Engine", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "PortConjugation", + "@id": "1acfe316-a33e-4e5c-abff-ba905428236f", + "aliasIds": [], + "conjugatedPortDefinition": { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + "conjugatedType": { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1acfe316-a33e-4e5c-abff-ba905428236f", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "originalPortDefinition": { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" }, + "originalType": { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" }, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + "owningRelationship": null, + "owningType": { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" }, + { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" } + ], + "shortName": null, + "source": [ { "@id": "77f61321-18f5-4d07-bf7a-7933df9d06b0" } ], + "target": [ { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" } ], + "textualRepresentation": [] + }, + { + "@type": "FeatureValue", + "@id": "1b202670-dae4-4df9-82c1-4c2505ec33c8", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1b202670-dae4-4df9-82c1-4c2505ec33c8", + "featureWithValue": { "@id": "5778b73b-a71f-4ea7-b0aa-009559237bf4" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" }, + "memberElementId": "331f3ee3-c867-4442-b545-0fb012d25165", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "5778b73b-a71f-4ea7-b0aa-009559237bf4" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" }, + "ownedMemberElementId": "331f3ee3-c867-4442-b545-0fb012d25165", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "5778b73b-a71f-4ea7-b0aa-009559237bf4" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "5778b73b-a71f-4ea7-b0aa-009559237bf4" }, + { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" } + ], + "shortName": null, + "source": [ { "@id": "5778b73b-a71f-4ea7-b0aa-009559237bf4" } ], + "target": [ { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" } ], + "textualRepresentation": [], + "value": { "@id": "331f3ee3-c867-4442-b545-0fb012d25165" }, + "visibility": "public" + }, + { + "@type": "OwningMembership", + "@id": "1c3a113f-b65e-4dd5-8d29-adf487288b93", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1c3a113f-b65e-4dd5-8d29-adf487288b93", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "823bbba7-c535-4dd5-8e51-c070d41a12b4" }, + "memberElementId": "823bbba7-c535-4dd5-8e51-c070d41a12b4", + "memberName": "Clutch", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "823bbba7-c535-4dd5-8e51-c070d41a12b4" }, + "ownedMemberElementId": "823bbba7-c535-4dd5-8e51-c070d41a12b4", + "ownedMemberName": "Clutch", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "823bbba7-c535-4dd5-8e51-c070d41a12b4" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" }, + { "@id": "823bbba7-c535-4dd5-8e51-c070d41a12b4" } + ], + "shortName": null, + "source": [ { "@id": "eaaa36a1-127f-4d5b-93f9-aa70604c2138" } ], + "target": [ { "@id": "823bbba7-c535-4dd5-8e51-c070d41a12b4" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "out", + "documentation": [], + "elementId": "1c63948a-aaf5-41b1-9d76-55bb8062b78b", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [], + "membership": [], + "multiplicity": null, + "name": "result", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "owningFeatureMembership": { "@id": "1a57010c-c76a-443d-908e-7233094477da" }, + "owningMembership": { "@id": "1a57010c-c76a-443d-908e-7233094477da" }, + "owningNamespace": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "owningRelationship": { "@id": "1a57010c-c76a-443d-908e-7233094477da" }, + "owningType": { "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "FeatureMembership", + "@id": "1c70e46e-7a9e-4864-bb67-695939ee6181", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1c70e46e-7a9e-4864-bb67-695939ee6181", + "feature": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "memberElementId": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "ownedMemberElementId": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396", + "ownedMemberFeature": { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" }, + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" }, + "owningRelationship": null, + "owningType": { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" }, + { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" } + ], + "shortName": null, + "source": [ { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" } ], + "target": [ { "@id": "c7fbfa83-88d8-430c-ab4e-3737f5fb9396" } ], + "textualRepresentation": [], + "type": { "@id": "f83324f8-7343-4201-8867-9389d5f7e0b6" }, + "visibility": "public" + }, + { + "@type": "PartUsage", + "@id": "1c885b34-3d93-4dd8-9955-882823a0f0d4", + "aliasIds": [], + "chainingFeature": [], + "declaredName": "vehicleChoice", + "declaredShortName": null, + "definition": [ { "@id": "f7c5db07-d0bd-4a46-aa40-d1fe50e50839" } ], + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "direction": null, + "documentation": [], + "elementId": "1c885b34-3d93-4dd8-9955-882823a0f0d4", + "endFeature": [], + "endOwningType": null, + "feature": [ + { "@id": "ac8572c7-1fae-4b63-a30b-8e4f8a6a8935" }, + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + { "@id": "ea24225e-a0d6-4f69-b93f-35aa78ed80af" }, + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + { "@id": "738d66a1-024c-45d5-81fb-2b2f0bb8e8fe" }, + { "@id": "985357d0-0ef9-4acc-939f-f64e7e620e3a" }, + { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "163f2a4f-890b-48fc-9e72-909db3e25a13" }, + { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } + ], + "featureMembership": [ + { "@id": "be2222c1-d8cb-466d-a059-f8c7d73bd5fc" }, + { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + { "@id": "26afeef5-89b9-4d0e-990e-2b1efee4ebbd" }, + { "@id": "4501edc4-9be4-41ef-9e97-10e1c7120226" }, + { "@id": "0d646347-2a41-4fdc-8b71-316eef0ad608" }, + { "@id": "9bbbbae3-df00-4918-8a9c-bd64933c2d40" }, + { "@id": "f6d55fa8-0908-40a6-acd0-3ea403e22a44" }, + { "@id": "213afa5d-9c03-4d0e-a990-cd79479a16b4" }, + { "@id": "16fa7886-24a2-41e1-8a5a-87902a0f58bf" }, + { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + { "@id": "f74fcc37-6633-4be0-a597-a58634666afa" }, + { "@id": "84de2927-8f8f-47aa-8a62-ad3102e9b364" } + ], + "featuringType": [], + "importedMembership": [], + "individualDefinition": null, + "inheritedFeature": [ + { "@id": "ac8572c7-1fae-4b63-a30b-8e4f8a6a8935" }, + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + { "@id": "ea24225e-a0d6-4f69-b93f-35aa78ed80af" }, + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + { "@id": "738d66a1-024c-45d5-81fb-2b2f0bb8e8fe" }, + { "@id": "985357d0-0ef9-4acc-939f-f64e7e620e3a" }, + { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "163f2a4f-890b-48fc-9e72-909db3e25a13" }, + { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } + ], + "inheritedMembership": [ + { "@id": "be2222c1-d8cb-466d-a059-f8c7d73bd5fc" }, + { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + { "@id": "26afeef5-89b9-4d0e-990e-2b1efee4ebbd" }, + { "@id": "4501edc4-9be4-41ef-9e97-10e1c7120226" }, + { "@id": "0d646347-2a41-4fdc-8b71-316eef0ad608" }, + { "@id": "9bbbbae3-df00-4918-8a9c-bd64933c2d40" }, + { "@id": "f6d55fa8-0908-40a6-acd0-3ea403e22a44" }, + { "@id": "213afa5d-9c03-4d0e-a990-cd79479a16b4" }, + { "@id": "16fa7886-24a2-41e1-8a5a-87902a0f58bf" }, + { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + { "@id": "f74fcc37-6633-4be0-a597-a58634666afa" }, + { "@id": "84de2927-8f8f-47aa-8a62-ad3102e9b364" } + ], + "input": [], + "intersectingType": [], + "isAbstract": true, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isReference": true, + "isSufficient": false, + "isUnique": true, + "isVariation": true, + "itemDefinition": [ { "@id": "f7c5db07-d0bd-4a46-aa40-d1fe50e50839" } ], + "member": [ + { "@id": "ce6ef8de-4c59-45b6-b6b5-0791bce147d6" }, + { "@id": "981f8559-068d-4bae-bdf3-eb2d07dd38fe" }, + { "@id": "ac8572c7-1fae-4b63-a30b-8e4f8a6a8935" }, + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + { "@id": "ea24225e-a0d6-4f69-b93f-35aa78ed80af" }, + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + { "@id": "738d66a1-024c-45d5-81fb-2b2f0bb8e8fe" }, + { "@id": "985357d0-0ef9-4acc-939f-f64e7e620e3a" }, + { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "163f2a4f-890b-48fc-9e72-909db3e25a13" }, + { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } + ], + "membership": [ + { "@id": "66b3b091-1a4f-4358-aaff-babb7e8e17eb" }, + { "@id": "c91de873-59b6-41e3-b6fd-42961363a486" }, + { "@id": "be2222c1-d8cb-466d-a059-f8c7d73bd5fc" }, + { "@id": "a331697b-aea1-4e31-a53c-dfa8cb8a4f0d" }, + { "@id": "26afeef5-89b9-4d0e-990e-2b1efee4ebbd" }, + { "@id": "4501edc4-9be4-41ef-9e97-10e1c7120226" }, + { "@id": "0d646347-2a41-4fdc-8b71-316eef0ad608" }, + { "@id": "9bbbbae3-df00-4918-8a9c-bd64933c2d40" }, + { "@id": "f6d55fa8-0908-40a6-acd0-3ea403e22a44" }, + { "@id": "213afa5d-9c03-4d0e-a990-cd79479a16b4" }, + { "@id": "16fa7886-24a2-41e1-8a5a-87902a0f58bf" }, + { "@id": "c3f97325-1bb6-4247-8bb7-a1904f92118a" }, + { "@id": "f74fcc37-6633-4be0-a597-a58634666afa" }, + { "@id": "84de2927-8f8f-47aa-8a62-ad3102e9b364" } + ], + "multiplicity": null, + "name": "vehicleChoice", + "nestedAction": [], + "nestedAllocation": [], + "nestedAnalysisCase": [], + "nestedAttribute": [], + "nestedCalculation": [], + "nestedCase": [], + "nestedConcern": [], + "nestedConnection": [], + "nestedConstraint": [], + "nestedEnumeration": [], + "nestedFlow": [], + "nestedInterface": [], + "nestedItem": [], + "nestedMetadata": [], + "nestedOccurrence": [], + "nestedPart": [], + "nestedPort": [], + "nestedReference": [], + "nestedRendering": [], + "nestedRequirement": [], + "nestedState": [], + "nestedTransition": [], + "nestedUsage": [], + "nestedUseCase": [], + "nestedVerificationCase": [], + "nestedView": [], + "nestedViewpoint": [], + "occurrenceDefinition": [ { "@id": "f7c5db07-d0bd-4a46-aa40-d1fe50e50839" } ], + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "ce6ef8de-4c59-45b6-b6b5-0791bce147d6" }, + { "@id": "981f8559-068d-4bae-bdf3-eb2d07dd38fe" } + ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "ce6ef8de-4c59-45b6-b6b5-0791bce147d6" }, + { "@id": "981f8559-068d-4bae-bdf3-eb2d07dd38fe" } + ], + "ownedMembership": [ + { "@id": "66b3b091-1a4f-4358-aaff-babb7e8e17eb" }, + { "@id": "c91de873-59b6-41e3-b6fd-42961363a486" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "863e916d-7de9-457b-94b4-f3a891f5a375" }, + { "@id": "66b3b091-1a4f-4358-aaff-babb7e8e17eb" }, + { "@id": "c91de873-59b6-41e3-b6fd-42961363a486" } + ], + "ownedSpecialization": [ { "@id": "863e916d-7de9-457b-94b4-f3a891f5a375" } ], + "ownedSubsetting": [ { "@id": "863e916d-7de9-457b-94b4-f3a891f5a375" } ], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "b22079fc-1569-4c20-ae7f-43cd330bc202" }, + "owningDefinition": null, + "owningFeatureMembership": null, + "owningMembership": { "@id": "3551fb55-3e49-4259-b1c5-d3d77431aaa8" }, + "owningNamespace": { "@id": "b22079fc-1569-4c20-ae7f-43cd330bc202" }, + "owningRelationship": { "@id": "3551fb55-3e49-4259-b1c5-d3d77431aaa8" }, + "owningType": null, + "owningUsage": null, + "partDefinition": [ { "@id": "f7c5db07-d0bd-4a46-aa40-d1fe50e50839" } ], + "portionKind": null, + "qualifiedName": "'7b-Variant Configurations'::VariabilityModel::vehicleChoice", + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "f7c5db07-d0bd-4a46-aa40-d1fe50e50839" } ], + "unioningType": [], + "usage": [ + { "@id": "ac8572c7-1fae-4b63-a30b-8e4f8a6a8935" }, + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + { "@id": "ea24225e-a0d6-4f69-b93f-35aa78ed80af" }, + { "@id": "f8bd9751-c20c-4fd8-89b4-c24f29279733" }, + { "@id": "738d66a1-024c-45d5-81fb-2b2f0bb8e8fe" }, + { "@id": "985357d0-0ef9-4acc-939f-f64e7e620e3a" }, + { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + { "@id": "b51c394f-7811-42c3-8374-8fe20d92fbd7" }, + { "@id": "163f2a4f-890b-48fc-9e72-909db3e25a13" }, + { "@id": "aaf4f552-bfb4-413a-b251-863860a9cce4" }, + { "@id": "7ec32894-dd5e-47a9-8b53-2eea9f983ba9" } + ], + "variant": [ + { "@id": "ce6ef8de-4c59-45b6-b6b5-0791bce147d6" }, + { "@id": "981f8559-068d-4bae-bdf3-eb2d07dd38fe" } + ], + "variantMembership": [ + { "@id": "66b3b091-1a4f-4358-aaff-babb7e8e17eb" }, + { "@id": "c91de873-59b6-41e3-b6fd-42961363a486" } + ] + }, + { + "@type": "FeatureReferenceExpression", + "@id": "1d77eabd-bade-4c7d-bc80-969dab424e6b", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "direction": null, + "documentation": [], + "elementId": "1d77eabd-bade-4c7d-bc80-969dab424e6b", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "featureMembership": [ { "@id": "b60296f1-c10d-4d17-9fd2-10aba36bf239" } ], + "featuringType": [ { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } + ], + "membership": [ + { "@id": "82f5c353-a4ac-4cd6-bb51-2049346cc459" }, + { "@id": "b60296f1-c10d-4d17-9fd2-10aba36bf239" } + ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "b60296f1-c10d-4d17-9fd2-10aba36bf239" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "ownedMembership": [ + { "@id": "82f5c353-a4ac-4cd6-bb51-2049346cc459" }, + { "@id": "b60296f1-c10d-4d17-9fd2-10aba36bf239" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "82f5c353-a4ac-4cd6-bb51-2049346cc459" }, + { "@id": "b60296f1-c10d-4d17-9fd2-10aba36bf239" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "d6c882a3-c15f-4d4e-aa49-660477dcfef4" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "e77a631d-2885-4a14-8ac2-dbd6e713ed5d" }, + "owningNamespace": { "@id": "d6c882a3-c15f-4d4e-aa49-660477dcfef4" }, + "owningRelationship": { "@id": "e77a631d-2885-4a14-8ac2-dbd6e713ed5d" }, + "owningType": null, + "parameter": [ { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" } ], + "qualifiedName": null, + "referent": { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + "result": { "@id": "520de100-6dd6-4c85-be6a-accf4f2cdc92" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "ReturnParameterMembership", + "@id": "1dd137a0-7ed8-410e-851c-e3fb60b05866", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1dd137a0-7ed8-410e-851c-e3fb60b05866", + "feature": { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" }, + "memberElementId": "e668e0c5-16e6-4f72-b9e4-33f647b52f76", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" }, + "ownedMemberElementId": "e668e0c5-16e6-4f72-b9e4-33f647b52f76", + "ownedMemberFeature": { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "owningRelationship": null, + "owningType": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" } + ], + "shortName": null, + "source": [ { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" } ], + "target": [ { "@id": "e668e0c5-16e6-4f72-b9e4-33f647b52f76" } ], + "textualRepresentation": [], + "type": { "@id": "965f2ecc-ae6d-409f-90b3-2352fd654ba1" }, + "visibility": "public" + }, + { + "@type": "FeatureReferenceExpression", + "@id": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707", + "aliasIds": [], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "direction": null, + "documentation": [], + "elementId": "1eb9aa7e-b8e2-4ef0-b269-cbbe7c582707", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "featureMembership": [ { "@id": "1a57010c-c76a-443d-908e-7233094477da" } ], + "featuringType": [ { "@id": "ee4fd16f-9ee7-49a4-91ac-f8352bc8cafb" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } + ], + "membership": [ + { "@id": "6e032dfd-4908-40e7-951c-f9c4536dc399" }, + { "@id": "1a57010c-c76a-443d-908e-7233094477da" } + ], + "multiplicity": null, + "name": null, + "output": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "ownedEndFeature": [], + "ownedFeature": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ { "@id": "1a57010c-c76a-443d-908e-7233094477da" } ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "ownedMembership": [ + { "@id": "6e032dfd-4908-40e7-951c-f9c4536dc399" }, + { "@id": "1a57010c-c76a-443d-908e-7233094477da" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "6e032dfd-4908-40e7-951c-f9c4536dc399" }, + { "@id": "1a57010c-c76a-443d-908e-7233094477da" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "b1644aeb-88ef-4126-bf7b-28dd20da174a" }, + "owningFeatureMembership": null, + "owningMembership": { "@id": "d537c0a2-e613-4adc-b50b-0d3d115629aa" }, + "owningNamespace": { "@id": "b1644aeb-88ef-4126-bf7b-28dd20da174a" }, + "owningRelationship": { "@id": "d537c0a2-e613-4adc-b50b-0d3d115629aa" }, + "owningType": null, + "parameter": [ { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" } ], + "qualifiedName": null, + "referent": { "@id": "f872619e-2d9e-40a1-a8ee-69896d595123" }, + "result": { "@id": "1c63948a-aaf5-41b1-9d76-55bb8062b78b" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "FeatureTyping", + "@id": "1ec96d78-4bd1-45c1-bedf-1afd45fa0fcc", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1ec96d78-4bd1-45c1-bedf-1afd45fa0fcc", + "general": { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningFeature": { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" }, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" }, + "owningRelationship": null, + "owningType": { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" }, + { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" } + ], + "shortName": null, + "source": [ { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" } ], + "specific": { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" }, + "target": [ { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" } ], + "textualRepresentation": [], + "type": { "@id": "0257f14b-7b82-4e97-9195-d4768c30c1cd" }, + "typedFeature": { "@id": "5f09a8c0-f6d2-4154-a95a-5ea3a5a2eb14" } + }, + { + "@type": "PartDefinition", + "@id": "1f1fd756-a770-4663-b787-21298e3a0919", + "aliasIds": [], + "declaredName": "AutomaticTransmission", + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "1f1fd756-a770-4663-b787-21298e3a0919", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": false, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [], + "membership": [], + "multiplicity": null, + "name": "AutomaticTransmission", + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": null, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedReference": [], + "ownedRelationship": [ { "@id": "99530132-6cb7-40ed-b4c6-4c4a388ad2b0" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [ { "@id": "99530132-6cb7-40ed-b4c6-4c4a388ad2b0" } ], + "ownedState": [], + "ownedSubclassification": [ { "@id": "99530132-6cb7-40ed-b4c6-4c4a388ad2b0" } ], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningMembership": { "@id": "b141ce9a-8680-44a7-8b0a-dfd67d9d2581" }, + "owningNamespace": { "@id": "e680518b-b026-41f8-a2a2-20ab42ca21cb" }, + "owningRelationship": { "@id": "b141ce9a-8680-44a7-8b0a-dfd67d9d2581" }, + "qualifiedName": "'7b-Variant Configurations'::VariantDefinitions::AutomaticTransmission", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "ParameterMembership", + "@id": "1f575bc7-1381-4eb0-98f2-ddb5c0215ed7", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "1f575bc7-1381-4eb0-98f2-ddb5c0215ed7", + "feature": { "@id": "41632d87-ca55-430d-950d-986fa66a8668" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "41632d87-ca55-430d-950d-986fa66a8668" }, + "memberElementId": "41632d87-ca55-430d-950d-986fa66a8668", + "memberName": "y", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "41632d87-ca55-430d-950d-986fa66a8668" }, + "ownedMemberElementId": "41632d87-ca55-430d-950d-986fa66a8668", + "ownedMemberFeature": { "@id": "41632d87-ca55-430d-950d-986fa66a8668" }, + "ownedMemberName": "y", + "ownedMemberParameter": { "@id": "41632d87-ca55-430d-950d-986fa66a8668" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "41632d87-ca55-430d-950d-986fa66a8668" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" }, + "owningRelationship": null, + "owningType": { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" }, + { "@id": "41632d87-ca55-430d-950d-986fa66a8668" } + ], + "shortName": null, + "source": [ { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" } ], + "target": [ { "@id": "41632d87-ca55-430d-950d-986fa66a8668" } ], + "textualRepresentation": [], + "type": { "@id": "70a9275d-91ab-41d7-847a-2b1492430636" }, + "visibility": "private" + }, + { + "@type": "OperatorExpression", + "@id": "1fae3810-fdee-41dc-9687-7c08b5eeb56c", + "aliasIds": [], + "argument": [ + { "@id": "8871aa5c-1715-4875-b2b0-091a572609e7" }, + { "@id": "a9566b7f-9211-4ae1-a846-989a25883588" } + ], + "behavior": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "direction": null, + "documentation": [], + "elementId": "1fae3810-fdee-41dc-9687-7c08b5eeb56c", + "endFeature": [], + "endOwningType": null, + "feature": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "featureMembership": [ + { "@id": "70329761-5c1c-4bc8-ba9d-bf3d91914ca2" }, + { "@id": "d6fa3209-31bb-4bd9-9119-b8765ab1d752" }, + { "@id": "e297ec9b-62b2-49c4-a9bc-059599340d6f" } + ], + "featuringType": [ { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" } ], + "function": null, + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" } + ], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isModelLevelEvaluable": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "membership": [ + { "@id": "70329761-5c1c-4bc8-ba9d-bf3d91914ca2" }, + { "@id": "d6fa3209-31bb-4bd9-9119-b8765ab1d752" }, + { "@id": "e297ec9b-62b2-49c4-a9bc-059599340d6f" } + ], + "multiplicity": null, + "name": null, + "operator": "==", + "output": [ { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } ], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "ownedEndFeature": [], + "ownedFeature": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [ + { "@id": "70329761-5c1c-4bc8-ba9d-bf3d91914ca2" }, + { "@id": "d6fa3209-31bb-4bd9-9119-b8765ab1d752" }, + { "@id": "e297ec9b-62b2-49c4-a9bc-059599340d6f" } + ], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "ownedMembership": [ + { "@id": "70329761-5c1c-4bc8-ba9d-bf3d91914ca2" }, + { "@id": "d6fa3209-31bb-4bd9-9119-b8765ab1d752" }, + { "@id": "e297ec9b-62b2-49c4-a9bc-059599340d6f" } + ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ + { "@id": "70329761-5c1c-4bc8-ba9d-bf3d91914ca2" }, + { "@id": "d6fa3209-31bb-4bd9-9119-b8765ab1d752" }, + { "@id": "e297ec9b-62b2-49c4-a9bc-059599340d6f" } + ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "owningFeatureMembership": { "@id": "9a568792-6d93-478e-9b66-8c2e3342ef91" }, + "owningMembership": { "@id": "9a568792-6d93-478e-9b66-8c2e3342ef91" }, + "owningNamespace": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "owningRelationship": { "@id": "9a568792-6d93-478e-9b66-8c2e3342ef91" }, + "owningType": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "parameter": [ + { "@id": "fee14c95-e14c-4e81-a8a8-50c290ecfe28" }, + { "@id": "582f6192-db02-4685-b22e-4043815a9729" }, + { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" } + ], + "qualifiedName": null, + "result": { "@id": "ac1447fb-d269-4b09-9710-5323ce61c4a5" }, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "ReturnParameterMembership", + "@id": "20d877e5-99d2-4f76-82ff-1111fe634479", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "20d877e5-99d2-4f76-82ff-1111fe634479", + "feature": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "memberElementId": "fc668a27-4c8d-4974-ae71-c0e14e881921", + "memberName": "result", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "ownedMemberElementId": "fc668a27-4c8d-4974-ae71-c0e14e881921", + "ownedMemberFeature": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "ownedMemberName": "result", + "ownedMemberParameter": { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" }, + "owningRelationship": null, + "owningType": { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" }, + { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } + ], + "shortName": null, + "source": [ { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" } ], + "target": [ { "@id": "fc668a27-4c8d-4974-ae71-c0e14e881921" } ], + "textualRepresentation": [], + "type": { "@id": "054127a9-d60e-428d-89cb-8c2684fe7a76" }, + "visibility": "public" + }, + { + "@type": "FeatureMembership", + "@id": "213afa5d-9c03-4d0e-a990-cd79479a16b4", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "213afa5d-9c03-4d0e-a990-cd79479a16b4", + "feature": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "memberElementId": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff", + "memberName": "engine-wheel selection constraint", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "ownedMemberElementId": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff", + "ownedMemberFeature": { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" }, + "ownedMemberName": "engine-wheel selection constraint", + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningRelationship": null, + "owningType": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" } + ], + "shortName": null, + "source": [ { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" } ], + "target": [ { "@id": "c7f945b6-4d91-4db7-b93f-12bcbb71bfff" } ], + "textualRepresentation": [], + "type": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "visibility": "public" + }, + { + "@type": "Feature", + "@id": "21bfdd68-99df-4393-8173-0f8a80a88c49", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "in", + "documentation": [], + "elementId": "21bfdd68-99df-4393-8173-0f8a80a88c49", + "endFeature": [], + "endOwningType": null, + "feature": [], + "featureMembership": [], + "featuringType": [ { "@id": "e746eeca-9b23-4dda-abd3-554b3c376353" } ], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" } ], + "membership": [ { "@id": "a2f4baff-3006-4093-9dab-9a63fd36856d" } ], + "multiplicity": null, + "name": "firstValue", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [ { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" } ], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [ { "@id": "9d9d0dc8-2fd8-47d7-b63c-acb4635505ff" } ], + "ownedMembership": [ { "@id": "a2f4baff-3006-4093-9dab-9a63fd36856d" } ], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [ { "@id": "a2f4baff-3006-4093-9dab-9a63fd36856d" } ], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "e746eeca-9b23-4dda-abd3-554b3c376353" }, + "owningFeatureMembership": { "@id": "ce5aa43a-7964-4d44-84bc-71fec6feafc4" }, + "owningMembership": { "@id": "ce5aa43a-7964-4d44-84bc-71fec6feafc4" }, + "owningNamespace": { "@id": "e746eeca-9b23-4dda-abd3-554b3c376353" }, + "owningRelationship": { "@id": "ce5aa43a-7964-4d44-84bc-71fec6feafc4" }, + "owningType": { "@id": "e746eeca-9b23-4dda-abd3-554b3c376353" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [], + "unioningType": [] + }, + { + "@type": "FeatureTyping", + "@id": "21d8c785-6838-43b9-9bce-666a42090da6", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "21d8c785-6838-43b9-9bce-666a42090da6", + "general": { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningFeature": { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + "owningRelationship": null, + "owningType": { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } + ], + "shortName": null, + "source": [ { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" } ], + "specific": { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" }, + "target": [ { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" } ], + "textualRepresentation": [], + "type": { "@id": "1f1fd756-a770-4663-b787-21298e3a0919" }, + "typedFeature": { "@id": "156bc827-0f67-48ce-97d5-0e1ff499cbbb" } + }, + { + "@type": "Membership", + "@id": "22ab0883-fc8d-4bab-8ba0-476cc17d213d", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "22ab0883-fc8d-4bab-8ba0-476cc17d213d", + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" }, + "memberElementId": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" }, + { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" } + ], + "shortName": null, + "source": [ { "@id": "ce799e80-d744-458e-b8de-9aacae37eb99" } ], + "target": [ { "@id": "18ca7906-b1fc-4d56-9b5e-c4fc89fd13a6" } ], + "textualRepresentation": [], + "visibility": "public" + }, + { + "@type": "FeatureValue", + "@id": "22e37433-090f-47cb-a83f-e8e02fccc01c", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "22e37433-090f-47cb-a83f-e8e02fccc01c", + "featureWithValue": { "@id": "6e105aa1-7dd3-4701-9fad-736a560333ce" }, + "isDefault": false, + "isImplied": false, + "isImpliedIncluded": false, + "isInitial": false, + "isLibraryElement": false, + "memberElement": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "memberElementId": "5a098843-e30b-4d9e-8f2e-8dcda7965977", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "6e105aa1-7dd3-4701-9fad-736a560333ce" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "ownedMemberElementId": "5a098843-e30b-4d9e-8f2e-8dcda7965977", + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "6e105aa1-7dd3-4701-9fad-736a560333ce" }, + "owningRelationship": null, + "qualifiedName": null, + "relatedElement": [ + { "@id": "6e105aa1-7dd3-4701-9fad-736a560333ce" }, + { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" } + ], + "shortName": null, + "source": [ { "@id": "6e105aa1-7dd3-4701-9fad-736a560333ce" } ], + "target": [ { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" } ], + "textualRepresentation": [], + "value": { "@id": "5a098843-e30b-4d9e-8f2e-8dcda7965977" }, + "visibility": "public" + }, + { + "@type": "ParameterMembership", + "@id": "234a3891-5093-426d-9ee5-d0584f17519b", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "234a3891-5093-426d-9ee5-d0584f17519b", + "feature": { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" }, + "memberElementId": "bf933ccb-3e14-4676-b166-9bebcba2841d", + "memberName": "firstValue", + "memberShortName": null, + "membershipOwningNamespace": { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" }, + "ownedMemberElementId": "bf933ccb-3e14-4676-b166-9bebcba2841d", + "ownedMemberFeature": { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" }, + "ownedMemberName": "firstValue", + "ownedMemberParameter": { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" }, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" }, + "owningRelationship": null, + "owningType": { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" }, + { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" } + ], + "shortName": null, + "source": [ { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" } ], + "target": [ { "@id": "bf933ccb-3e14-4676-b166-9bebcba2841d" } ], + "textualRepresentation": [], + "type": { "@id": "dd2af203-27fd-4c53-9e65-625956c04bb4" }, + "visibility": "private" + }, + { + "@type": "Feature", + "@id": "23cb4e7d-f773-4bb4-a1b0-1a3c093646d7", + "aliasIds": [], + "chainingFeature": [], + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "direction": "out", + "documentation": [], + "elementId": "23cb4e7d-f773-4bb4-a1b0-1a3c093646d7", + "endFeature": [], + "endOwningType": null, + "feature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "featureMembership": [ { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } ], + "featuringType": [ { "@id": "a82d54c8-dcc3-4aa5-bb5f-f90f02e523ca" } ], + "importedMembership": [], + "inheritedFeature": [ { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } ], + "inheritedMembership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isComposite": false, + "isConjugated": false, + "isDerived": false, + "isEnd": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "isOrdered": false, + "isPortion": false, + "isReadOnly": false, + "isSufficient": false, + "isUnique": true, + "member": [ + { "@id": "4fd86c18-d6a3-45d5-888b-ca37e53d5a73" }, + { "@id": "e66354ca-2b6d-4902-adb5-73fe8849a2a0" }, + { "@id": "db125875-81a0-45c4-aa7a-e85bdcb8a722" }, + { "@id": "b7efa6e4-4b72-4cc6-b494-fd194aae9fee" } + ], + "membership": [ + { "@id": "527d55fb-6fec-4705-919c-3ff97d652078" }, + { "@id": "73dccd60-fc47-41dd-9d7f-21e92030e3f3" }, + { "@id": "2f393275-965f-41f0-932f-b92d11276c2f" }, + { "@id": "d69a5cd3-9d69-4c5d-8265-4cca37a68b3c" } + ], + "multiplicity": null, + "name": "result", + "output": [], + "ownedAnnotation": [], + "ownedConjugator": null, + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedFeature": [], + "ownedFeatureChaining": [], + "ownedFeatureInverting": [], + "ownedFeatureMembership": [], + "ownedImport": [], + "ownedIntersecting": [], + "ownedMember": [], + "ownedMembership": [], + "ownedRedefinition": [], + "ownedReferenceSubsetting": null, + "ownedRelationship": [], + "ownedSpecialization": [], + "ownedSubsetting": [], + "ownedTypeFeaturing": [], + "ownedTyping": [], + "ownedUnioning": [], + "owner": { "@id": "a82d54c8-dcc3-4aa5-bb5f-f90f02e523ca" }, + "owningFeatureMembership": { "@id": "5882aa83-c4c9-4bee-bd85-3ba4748058c1" }, + "owningMembership": { "@id": "5882aa83-c4c9-4bee-bd85-3ba4748058c1" }, + "owningNamespace": { "@id": "a82d54c8-dcc3-4aa5-bb5f-f90f02e523ca" }, + "owningRelationship": { "@id": "5882aa83-c4c9-4bee-bd85-3ba4748058c1" }, + "owningType": { "@id": "a82d54c8-dcc3-4aa5-bb5f-f90f02e523ca" }, + "qualifiedName": null, + "shortName": null, + "textualRepresentation": [], + "type": [ { "@id": "1ab514bf-6636-4b56-b938-0a77239f9a00" } ], + "unioningType": [] + }, + { + "@type": "ConjugatedPortDefinition", + "@id": "254410db-d1c3-4443-bd47-b9c7a747473b", + "aliasIds": [], + "conjugatedPortDefinition": null, + "declaredName": null, + "declaredShortName": null, + "differencingType": [], + "directedFeature": [], + "directedUsage": [], + "documentation": [], + "elementId": "254410db-d1c3-4443-bd47-b9c7a747473b", + "endFeature": [], + "feature": [], + "featureMembership": [], + "importedMembership": [], + "inheritedFeature": [], + "inheritedMembership": [ { "@id": "3194c623-257f-474b-bc04-8b0e83f3a022" } ], + "input": [], + "intersectingType": [], + "isAbstract": false, + "isConjugated": true, + "isImpliedIncluded": false, + "isIndividual": false, + "isLibraryElement": false, + "isSufficient": false, + "isVariation": false, + "lifeClass": null, + "member": [ { "@id": "254410db-d1c3-4443-bd47-b9c7a747473b" } ], + "membership": [ { "@id": "3194c623-257f-474b-bc04-8b0e83f3a022" } ], + "multiplicity": null, + "name": "~ShaftPort_d", + "originalPortDefinition": { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" }, + "output": [], + "ownedAction": [], + "ownedAllocation": [], + "ownedAnalysisCase": [], + "ownedAnnotation": [], + "ownedAttribute": [], + "ownedCalculation": [], + "ownedCase": [], + "ownedConcern": [], + "ownedConjugator": { "@id": "19678513-42af-42f4-a0f7-435ebf238ef6" }, + "ownedConnection": [], + "ownedConstraint": [], + "ownedDifferencing": [], + "ownedDisjoining": [], + "ownedElement": [], + "ownedEndFeature": [], + "ownedEnumeration": [], + "ownedFeature": [], + "ownedFeatureMembership": [], + "ownedFlow": [], + "ownedImport": [], + "ownedInterface": [], + "ownedIntersecting": [], + "ownedItem": [], + "ownedMember": [], + "ownedMembership": [], + "ownedMetadata": [], + "ownedOccurrence": [], + "ownedPart": [], + "ownedPort": [], + "ownedPortConjugator": { "@id": "19678513-42af-42f4-a0f7-435ebf238ef6" }, + "ownedReference": [], + "ownedRelationship": [ { "@id": "19678513-42af-42f4-a0f7-435ebf238ef6" } ], + "ownedRendering": [], + "ownedRequirement": [], + "ownedSpecialization": [], + "ownedState": [], + "ownedSubclassification": [], + "ownedTransition": [], + "ownedUnioning": [], + "ownedUsage": [], + "ownedUseCase": [], + "ownedVerificationCase": [], + "ownedView": [], + "ownedViewpoint": [], + "owner": { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" }, + "owningMembership": { "@id": "3194c623-257f-474b-bc04-8b0e83f3a022" }, + "owningNamespace": { "@id": "b056dd34-3b43-41d8-9810-c0fa68949575" }, + "owningRelationship": { "@id": "3194c623-257f-474b-bc04-8b0e83f3a022" }, + "qualifiedName": "'7b-Variant Configurations'::DesignModel::ShaftPort_d::'~ShaftPort_d'", + "shortName": null, + "textualRepresentation": [], + "unioningType": [], + "usage": [], + "variant": [], + "variantMembership": [] + }, + { + "@type": "FeatureTyping", + "@id": "2695181e-b267-4ecf-850b-917a0b403edd", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "2695181e-b267-4ecf-850b-917a0b403edd", + "general": { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedRelatedElement": [], + "ownedRelationship": [], + "owner": null, + "owningFeature": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "owningRelationship": null, + "owningType": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" } + ], + "shortName": null, + "source": [ { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" } ], + "specific": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" }, + "target": [ { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" } ], + "textualRepresentation": [], + "type": { "@id": "135bed38-0626-4e58-9288-7e2f675467e3" }, + "typedFeature": { "@id": "d951fcca-ca8f-44b6-b89e-6c90d1ed59f3" } + }, + { + "@type": "FeatureMembership", + "@id": "26afeef5-89b9-4d0e-990e-2b1efee4ebbd", + "aliasIds": [], + "declaredName": null, + "declaredShortName": null, + "documentation": [], + "elementId": "26afeef5-89b9-4d0e-990e-2b1efee4ebbd", + "feature": { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + "isImplied": false, + "isImpliedIncluded": false, + "isLibraryElement": false, + "memberElement": { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + "memberElementId": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14", + "memberName": null, + "memberShortName": null, + "membershipOwningNamespace": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "name": null, + "ownedAnnotation": [], + "ownedElement": [], + "ownedMemberElement": { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + "ownedMemberElementId": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14", + "ownedMemberFeature": { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" }, + "ownedMemberName": null, + "ownedMemberShortName": null, + "ownedRelatedElement": [ { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" } ], + "ownedRelationship": [], + "owner": null, + "owningMembership": null, + "owningNamespace": null, + "owningRelatedElement": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "owningRelationship": null, + "owningType": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "qualifiedName": null, + "relatedElement": [ + { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" } + ], + "shortName": null, + "source": [ { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" } ], + "target": [ { "@id": "f88d76ac-d03f-4a80-bc9d-8a208daa0f14" } ], + "textualRepresentation": [], + "type": { "@id": "9836f7a0-1772-475b-93ae-b8c523e2c848" }, + "visibility": "public" + } +] \ No newline at end of file diff --git a/SysML2.NET.Serializer.MessagePack.Tests/MessagePackFormatter/AnnotatingElementMessagePackFormatterTestFixture.cs b/SysML2.NET.Serializer.MessagePack.Tests/MessagePackFormatter/AnnotatingElementMessagePackFormatterTestFixture.cs new file mode 100644 index 00000000..3c63dbc4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack.Tests/MessagePackFormatter/AnnotatingElementMessagePackFormatterTestFixture.cs @@ -0,0 +1,116 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Tests.MessagePackFormatter +{ + using System; + + using global::MessagePack; + using global::MessagePack.Resolvers; + + using NUnit.Framework; + + using SysML2.NET.Core.DTO.Root.Annotations; + + [TestFixture] + public class AnnotatingElementMessagePackFormatterTestFixture + { + private MessagePackSerializerOptions options; + + [SetUp] + public void SetUp() + { + // Configure MessagePack to use the formatter under test for AnnotatingElement. + // This avoids relying on attribute-based formatters/resolvers. + var resolver = CompositeResolver.Create( + [ + new SysML2.NET.Serializer.MessagePack.Core.AnnotatingElementMessagePackFormatter() + ], + [ + StandardResolver.Instance // Fallback for primitive types, strings, arrays, etc. + ]); + + this.options = MessagePackSerializerOptions.Standard.WithResolver(resolver); + } + + [Test] + public void Verify_that_AnnotatingElement_can_be_serialized_and_deserialized() + { + var original = CreateAnnotatingElement(); + + var bytes = MessagePackSerializer.Serialize(original, this.options); + var roundTripped = MessagePackSerializer.Deserialize(bytes, this.options); + + AssertThatAnnotatingElementEquivalent(original, roundTripped); + } + + [Test] + public void Verify_that_OwningRelationship_null_round_trips_as_null() + { + var original = CreateAnnotatingElement(); + original.OwningRelationship = null; + + var bytes = MessagePackSerializer.Serialize(original, this.options); + var roundTripped = MessagePackSerializer.Deserialize(bytes, this.options); + + Assert.That(roundTripped, Is.Not.Null); + Assert.That(roundTripped.OwningRelationship, Is.Null); + Assert.That(roundTripped.Id, Is.EqualTo(original.Id)); + } + + private static AnnotatingElement CreateAnnotatingElement() + { + return new AnnotatingElement + { + Id = Guid.Parse("11111111-2222-3333-4444-555555555555"), + AliasIds = ["ALIAS-1", "ALIAS-2"], + DeclaredName = "My Annotating Element", + DeclaredShortName = "MyAE", + ElementId = "ELEMENT-ID-123", + IsImpliedIncluded = true, + + OwnedRelationship = + [ + Guid.Parse("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"), + Guid.Parse("bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"), + Guid.Parse("00000000-0000-0000-0000-000000000010") + ], + + OwningRelationship = Guid.Parse("99999999-8888-7777-6666-555555555555"), + }; + } + + private static void AssertThatAnnotatingElementEquivalent(AnnotatingElement expected, AnnotatingElement actual) + { + Assert.That(actual, Is.Not.Null); + + Assert.That(actual.Id, Is.EqualTo(expected.Id)); + Assert.That(actual.DeclaredName, Is.EqualTo(expected.DeclaredName)); + Assert.That(actual.DeclaredShortName, Is.EqualTo(expected.DeclaredShortName)); + Assert.That(actual.ElementId, Is.EqualTo(expected.ElementId)); + Assert.That(actual.IsImpliedIncluded, Is.EqualTo(expected.IsImpliedIncluded)); + Assert.That(actual.OwningRelationship, Is.EqualTo(expected.OwningRelationship)); + + Assert.That(actual.AliasIds, Is.EqualTo(expected.AliasIds)); + + Assert.That(actual.OwnedRelationship, Is.EquivalentTo(expected.OwnedRelationship)); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack.Tests/SerializerTestFixture.cs b/SysML2.NET.Serializer.MessagePack.Tests/SerializerTestFixture.cs new file mode 100644 index 00000000..9fcd1643 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack.Tests/SerializerTestFixture.cs @@ -0,0 +1,86 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Tests +{ + using System; + using System.IO; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + + using NUnit.Framework; + + using SysML2.NET.PIM.DTO; + + using SysML2.NET.Core; + using SysML2.NET.Core.DTO; + using SysML2.NET.Serializer.Json; + using SysML2.NET.Serializer.MessagePack; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.DTO.Core.Features; + using SerializationTargetKind = MessagePack.SerializationTargetKind; + + + [TestFixture] + public class SerializerTestFixture + { + private Json.DeSerializer jsonDeSerializer; + + private MessagePack.DeSerializer messagePackDeSerializer; + + private MessagePack.Serializer messagePackSerializer; + + [SetUp] + public void SetUp() + { + this.jsonDeSerializer = new Json.DeSerializer(); + this.messagePackDeSerializer = new MessagePack.DeSerializer(); + this.messagePackSerializer = new MessagePack.Serializer(); + } + + [Test] + public void Verify_that_iData_from_sysml2_core_json_can_be_deserialized() + { + var fileName = Path.Combine(TestContext.CurrentContext.WorkDirectory, "Data", "projects.000e9890-6935-43e6-a5d7-5d7cac601f4c.commits.6d7ad9fd-6520-4ff2-885b-8c5c129e6c27.elements.json"); + using var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read); + + var jsonData = this.jsonDeSerializer.DeSerialize(stream, SerializationModeKind.JSON, Json.SerializationTargetKind.CORE,false); + + using (Assert.EnterMultipleScope()) + { + Assert.That(jsonData.Count(), Is.EqualTo(100)); + } + + var messagePackStream = new MemoryStream(); + + this.messagePackSerializer.Serialize(jsonData, messagePackStream); + + messagePackStream.Position = 0; + + var messagePackData= this.messagePackDeSerializer.DeSerialize(messagePackStream, SerializationTargetKind.CORE); + + var jsonBasedDictionary = jsonData.ToDictionary(x => x.Id); + var messagePackBasedDictionary = messagePackData.ToDictionary(x => x.Id); + + Assert.That(jsonBasedDictionary.Keys, Is.EquivalentTo(messagePackBasedDictionary.Keys)); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj b/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj new file mode 100644 index 00000000..dfb4adb4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj @@ -0,0 +1,52 @@ + + + + net9.0 + 12.0 + Starion Group S.A. + Sam Gerene + Nunit test suite for the SysML2.NET.Serializer.MessagePack Library + Copyright © Starion Group S.A. + Apache-2.0 + https://github.com/STARIONGROUP/SysML2.NET.git + Git + false + disable + false + true + en-US + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + Always + + + + diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenDataResolverGetFormatterHelper/DataResolverGetFormatterHelper.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenDataResolverGetFormatterHelper/DataResolverGetFormatterHelper.cs new file mode 100644 index 00000000..a2265e83 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenDataResolverGetFormatterHelper/DataResolverGetFormatterHelper.cs @@ -0,0 +1,234 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using global::MessagePack.Formatters; + + /// + /// Helper class that resolves a based on a + /// + internal static class DataResolverGetFormatterHelper + { + private static readonly Dictionary FormatterMap = new() + { + { typeof(Payload), new PayloadMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage), new AcceptActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition), new ActionDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionUsage), new ActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership), new ActorMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition), new AllocationDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage), new AllocationUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition), new AnalysisCaseDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage), new AnalysisCaseUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement), new AnnotatingElementMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Annotations.Annotation), new AnnotationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage), new AssertConstraintUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage), new AssignmentActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Associations.Association), new AssociationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure), new AssociationStructureMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition), new AttributeDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage), new AttributeUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior), new BehaviorMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector), new BindingConnectorMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage), new BindingConnectorAsUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression), new BooleanExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition), new CalculationDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage), new CalculationUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition), new CaseDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseUsage), new CaseUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Classes.Class), new ClassMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Classifiers.Classifier), new ClassifierMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression), new CollectExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Annotations.Comment), new CommentMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition), new ConcernDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage), new ConcernUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition), new ConjugatedPortDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping), new ConjugatedPortTypingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Conjugation), new ConjugationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition), new ConnectionDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage), new ConnectionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Connectors.Connector), new ConnectorMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition), new ConstraintDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage), new ConstraintUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression), new ConstructorExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.CrossSubsetting), new CrossSubsettingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.DataTypes.DataType), new DataTypeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.DecisionNode), new DecisionNodeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition), new DefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Dependencies.Dependency), new DependencyMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Differencing), new DifferencingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Disjoining), new DisjoiningMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Annotations.Documentation), new DocumentationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership), new ElementFilterMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership), new EndFeatureMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition), new EnumerationDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage), new EnumerationUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage), new EventOccurrenceUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage), new ExhibitStateUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Expression), new ExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.Feature), new FeatureMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression), new FeatureChainExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureChaining), new FeatureChainingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureInverting), new FeatureInvertingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.FeatureMembership), new FeatureMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression), new FeatureReferenceExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureTyping), new FeatureTypingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue), new FeatureValueMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Flow), new FlowMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition), new FlowDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd), new FlowEndMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowUsage), new FlowUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.ForkNode), new ForkNodeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage), new ForLoopActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership), new FramedConcernMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Function), new FunctionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage), new IfActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage), new IncludeUseCaseUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression), new IndexExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Interaction), new InteractionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition), new InterfaceDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage), new InterfaceUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Intersecting), new IntersectingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Invariant), new InvariantMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression), new InvocationExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Items.ItemDefinition), new ItemDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Items.ItemUsage), new ItemUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.JoinNode), new JoinNodeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage), new LibraryPackageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean), new LiteralBooleanMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression), new LiteralExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity), new LiteralInfinityMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger), new LiteralIntegerMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational), new LiteralRationalMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString), new LiteralStringMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Namespaces.Membership), new MembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.MembershipExpose), new MembershipExposeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport), new MembershipImportMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.MergeNode), new MergeNodeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass), new MetaclassMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression), new MetadataAccessExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition), new MetadataDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature), new MetadataFeatureMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage), new MetadataUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Multiplicity), new MultiplicityMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange), new MultiplicityRangeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Namespaces.Namespace), new NamespaceMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose), new NamespaceExposeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport), new NamespaceImportMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression), new NullExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership), new ObjectiveMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition), new OccurrenceDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage), new OccurrenceUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression), new OperatorExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership), new OwningMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Packages.Package), new PackageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership), new ParameterMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Parts.PartDefinition), new PartDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Parts.PartUsage), new PartUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature), new PayloadFeatureMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage), new PerformActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortConjugation), new PortConjugationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortDefinition), new PortDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortUsage), new PortUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Predicate), new PredicateMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.Redefinition), new RedefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting), new ReferenceSubsettingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage), new ReferenceUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition), new RenderingDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.RenderingUsage), new RenderingUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership), new RequirementConstraintMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition), new RequirementDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage), new RequirementUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership), new RequirementVerificationMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership), new ResultExpressionMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership), new ReturnParameterMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage), new SatisfyRequirementUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression), new SelectExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage), new SendActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Specialization), new SpecializationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership), new StakeholderMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.StateDefinition), new StateDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership), new StateSubactionMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.StateUsage), new StateUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.Step), new StepMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Structures.Structure), new StructureMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Classifiers.Subclassification), new SubclassificationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership), new SubjectMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.Subsetting), new SubsettingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Connectors.Succession), new SuccessionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage), new SuccessionAsUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow), new SuccessionFlowMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage), new SuccessionFlowUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage), new TerminateActionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation), new TextualRepresentationMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership), new TransitionFeatureMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.States.TransitionUsage), new TransitionUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression), new TriggerInvocationExpressionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Type), new TypeMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Features.TypeFeaturing), new TypeFeaturingMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Core.Types.Unioning), new UnioningMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage), new UsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition), new UseCaseDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage), new UseCaseUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership), new VariantMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition), new VerificationCaseDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage), new VerificationCaseUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.ViewDefinition), new ViewDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition), new ViewpointDefinitionMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage), new ViewpointUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership), new ViewRenderingMembershipMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Views.ViewUsage), new ViewUsageMessagePackFormatter() }, + { typeof(SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage), new WhileLoopActionUsageMessagePackFormatter() }, + }; + + /// + /// Gets a for the specific + /// + /// + /// The subject + /// + /// + /// an instance of + /// + internal static object GetFormatter(Type t) + { + object formatter; + if (FormatterMap.TryGetValue(t, out formatter)) + { + return formatter; + } + + // If type can not get, must return null for fallback mechanism. + return null; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AcceptActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AcceptActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..27234323 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AcceptActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AcceptActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AcceptActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..5737837d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ActionDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ActionDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..d46040a8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.ActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.ActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.ActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActorMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActorMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..0b790543 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ActorMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ActorMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ActorMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..27b08faa --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationDefinitionMessagePackFormatter.cs @@ -0,0 +1,243 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AllocationDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AllocationDefinition may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 9: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 10: + dto.IsVariation = reader.ReadBoolean(); + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 14: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationUsageMessagePackFormatter.cs new file mode 100644 index 00000000..19fa4b21 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AllocationUsageMessagePackFormatter.cs @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AllocationUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AllocationUsage may not be null"); + } + + writer.WriteArrayHeader(24); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 22: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 23: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..e94d95a5 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AnalysisCaseDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AnalysisCaseDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseUsageMessagePackFormatter.cs new file mode 100644 index 00000000..6a4437a5 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnalysisCaseUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AnalysisCaseUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AnalysisCaseUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs new file mode 100644 index 00000000..5f081103 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotatingElementMessagePackFormatter.cs @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AnnotatingElementMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AnnotatingElement may not be null"); + } + + writer.WriteArrayHeader(8); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 7: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotationMessagePackFormatter.cs new file mode 100644 index 00000000..9f73da27 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AnnotationMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AnnotationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.Annotation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Annotation may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.AnnotatedElement); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.Annotation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.Annotation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.AnnotatedElement = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssertConstraintUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssertConstraintUsageMessagePackFormatter.cs new file mode 100644 index 00000000..ecb15023 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssertConstraintUsageMessagePackFormatter.cs @@ -0,0 +1,286 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AssertConstraintUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AssertConstraintUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsNegated); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsNegated = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 21: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssignmentActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssignmentActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..43815d52 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssignmentActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AssignmentActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AssignmentActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs new file mode 100644 index 00000000..2ba1fe74 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AssociationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Associations.Association dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Association may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Associations.Association Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Associations.Association(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationStructureMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationStructureMessagePackFormatter.cs new file mode 100644 index 00000000..17ac888d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AssociationStructureMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AssociationStructureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AssociationStructure may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..74d7bd04 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeDefinitionMessagePackFormatter.cs @@ -0,0 +1,199 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AttributeDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AttributeDefinition may not be null"); + } + + writer.WriteArrayHeader(11); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeUsageMessagePackFormatter.cs new file mode 100644 index 00000000..56e65de2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/AttributeUsageMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class AttributeUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The AttributeUsage may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BehaviorMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BehaviorMessagePackFormatter.cs new file mode 100644 index 00000000..c3c35914 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BehaviorMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class BehaviorMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Behavior may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorAsUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorAsUsageMessagePackFormatter.cs new file mode 100644 index 00000000..63fc6c75 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorAsUsageMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class BindingConnectorAsUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The BindingConnectorAsUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorMessagePackFormatter.cs new file mode 100644 index 00000000..d6ef4203 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BindingConnectorMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class BindingConnectorMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The BindingConnector may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BooleanExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BooleanExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..c5e08fbc --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/BooleanExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class BooleanExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The BooleanExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..24659cbe --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CalculationDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CalculationDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationUsageMessagePackFormatter.cs new file mode 100644 index 00000000..9cd34ce9 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CalculationUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CalculationUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CalculationUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..00fd008a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CaseDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CaseDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseUsageMessagePackFormatter.cs new file mode 100644 index 00000000..180b1bfd --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CaseUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CaseUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Cases.CaseUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CaseUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Cases.CaseUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Cases.CaseUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassMessagePackFormatter.cs new file mode 100644 index 00000000..0dbe3eb1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ClassMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Classes.Class dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Class may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Classes.Class Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Classes.Class(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassifierMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassifierMessagePackFormatter.cs new file mode 100644 index 00000000..df7e4a57 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ClassifierMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ClassifierMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Classifiers.Classifier dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Classifier may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Classifiers.Classifier Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Classifiers.Classifier(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CollectExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CollectExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..2d66eea7 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CollectExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CollectExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CollectExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CommentMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CommentMessagePackFormatter.cs new file mode 100644 index 00000000..118fb5ef --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CommentMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CommentMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.Comment dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Comment may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.Body); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.Locale); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.Comment Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.Comment(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.Body = reader.ReadString(); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.Locale = reader.ReadString(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..cd57ced8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConcernDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConcernDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.ElementId = reader.ReadString(); + break; + case 4: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernUsageMessagePackFormatter.cs new file mode 100644 index 00000000..2c1bd4c2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConcernUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConcernUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConcernUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsComposite = reader.ReadBoolean(); + break; + case 7: + dto.IsConstant = reader.ReadBoolean(); + break; + case 8: + dto.IsDerived = reader.ReadBoolean(); + break; + case 9: + dto.IsEnd = reader.ReadBoolean(); + break; + case 10: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 11: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + case 20: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..3194d960 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConjugatedPortDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConjugatedPortDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortTypingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortTypingMessagePackFormatter.cs new file mode 100644 index 00000000..36f65d67 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugatedPortTypingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConjugatedPortTypingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConjugatedPortTyping may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.ConjugatedPortDefinition); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.TypedFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.ConjugatedPortDefinition = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + dto.TypedFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugationMessagePackFormatter.cs new file mode 100644 index 00000000..b99ba07c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConjugationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConjugationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Conjugation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Conjugation may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.ConjugatedType); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + WriteGuidBin16(ref writer, dto.OriginalType); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Conjugation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Conjugation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.ConjugatedType = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.OriginalType = ReadGuidBin16(ref reader); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..5936a5f6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionDefinitionMessagePackFormatter.cs @@ -0,0 +1,243 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConnectionDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConnectionDefinition may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 9: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 10: + dto.IsVariation = reader.ReadBoolean(); + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 14: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..803d6ef3 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectionUsageMessagePackFormatter.cs @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConnectionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConnectionUsage may not be null"); + } + + writer.WriteArrayHeader(24); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 22: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 23: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectorMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectorMessagePackFormatter.cs new file mode 100644 index 00000000..d6c9063f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConnectorMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConnectorMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Connectors.Connector dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Connector may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Connectors.Connector Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Connectors.Connector(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..784f35b5 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConstraintDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConstraintDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintUsageMessagePackFormatter.cs new file mode 100644 index 00000000..e39cfdc8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstraintUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConstraintUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConstraintUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstructorExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstructorExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..a7413034 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ConstructorExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ConstructorExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ConstructorExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CrossSubsettingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CrossSubsettingMessagePackFormatter.cs new file mode 100644 index 00000000..9b0dfc07 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/CrossSubsettingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class CrossSubsettingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.CrossSubsetting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The CrossSubsetting may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.CrossedFeature); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.CrossSubsetting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.CrossSubsetting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.CrossedFeature = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DataTypeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DataTypeMessagePackFormatter.cs new file mode 100644 index 00000000..584d0c82 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DataTypeMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DataTypeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.DataTypes.DataType dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The DataType may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.DataTypes.DataType Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.DataTypes.DataType(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DecisionNodeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DecisionNodeMessagePackFormatter.cs new file mode 100644 index 00000000..f3a5e2d5 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DecisionNodeMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DecisionNodeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.DecisionNode dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The DecisionNode may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.DecisionNode Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.DecisionNode(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..7536d4c2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DefinitionMessagePackFormatter.cs @@ -0,0 +1,199 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Definition may not be null"); + } + + writer.WriteArrayHeader(11); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs new file mode 100644 index 00000000..d48c0eb7 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DependencyMessagePackFormatter.cs @@ -0,0 +1,253 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DependencyMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Dependencies.Dependency dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Dependency may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + var client = dto.Client; + writer.WriteArrayHeader(client.Count); + for (var i = 0; i < client.Count; i++) + { + WriteGuidBin16(ref writer, client[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var supplier = dto.Supplier; + writer.WriteArrayHeader(supplier.Count); + for (var i = 0; i < supplier.Count; i++) + { + WriteGuidBin16(ref writer, supplier[i]); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Dependencies.Dependency Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Dependencies.Dependency(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + valueLength = reader.ReadArrayHeader(); + dto.Client.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.Client.Add(ReadGuidBin16(ref reader)); + } + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.Supplier.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.Supplier.Add(ReadGuidBin16(ref reader)); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DifferencingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DifferencingMessagePackFormatter.cs new file mode 100644 index 00000000..544f0dfc --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DifferencingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DifferencingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Differencing dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Differencing may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + WriteGuidBin16(ref writer, dto.DifferencingType); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Differencing Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Differencing(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.DifferencingType = ReadGuidBin16(ref reader); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DisjoiningMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DisjoiningMessagePackFormatter.cs new file mode 100644 index 00000000..18ffc873 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DisjoiningMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DisjoiningMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Disjoining dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Disjoining may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + WriteGuidBin16(ref writer, dto.DisjoiningType); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.TypeDisjoined); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Disjoining Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Disjoining(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.DisjoiningType = ReadGuidBin16(ref reader); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + dto.TypeDisjoined = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DocumentationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DocumentationMessagePackFormatter.cs new file mode 100644 index 00000000..a515bf6d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/DocumentationMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class DocumentationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.Documentation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Documentation may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.Body); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.Locale); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.Documentation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.Documentation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.Body = reader.ReadString(); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.Locale = reader.ReadString(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ElementFilterMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ElementFilterMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..65affc56 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ElementFilterMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ElementFilterMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ElementFilterMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EndFeatureMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EndFeatureMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..2d71bce1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EndFeatureMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class EndFeatureMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The EndFeatureMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..13e5fad0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationDefinitionMessagePackFormatter.cs @@ -0,0 +1,199 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class EnumerationDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The EnumerationDefinition may not be null"); + } + + writer.WriteArrayHeader(11); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationUsageMessagePackFormatter.cs new file mode 100644 index 00000000..e7d2175e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EnumerationUsageMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class EnumerationUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The EnumerationUsage may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EventOccurrenceUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EventOccurrenceUsageMessagePackFormatter.cs new file mode 100644 index 00000000..84b9378a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/EventOccurrenceUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class EventOccurrenceUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The EventOccurrenceUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExhibitStateUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExhibitStateUsageMessagePackFormatter.cs new file mode 100644 index 00000000..b61c66bd --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExhibitStateUsageMessagePackFormatter.cs @@ -0,0 +1,286 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ExhibitStateUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ExhibitStateUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsParallel); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsParallel = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 21: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..1daa0e1c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.Expression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Expression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.Expression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.Expression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..6ebbc166 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureChainExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureChainExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainingMessagePackFormatter.cs new file mode 100644 index 00000000..b2947945 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureChainingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureChainingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.FeatureChaining dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureChaining may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.ChainingFeature); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.FeatureChaining Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.FeatureChaining(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.ChainingFeature = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureInvertingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureInvertingMessagePackFormatter.cs new file mode 100644 index 00000000..8eba42b6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureInvertingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureInvertingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.FeatureInverting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureInverting may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.FeatureInverted); + + WriteGuidBin16(ref writer, dto.InvertingFeature); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.FeatureInverting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.FeatureInverting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.FeatureInverted = ReadGuidBin16(ref reader); + break; + case 6: + dto.InvertingFeature = ReadGuidBin16(ref reader); + break; + case 7: + dto.IsImplied = reader.ReadBoolean(); + break; + case 8: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..c8a9a1af --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.FeatureMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.FeatureMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.FeatureMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs new file mode 100644 index 00000000..655ad4a0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.Feature dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Feature may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.Feature Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.Feature(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureReferenceExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureReferenceExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..97d592ee --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureReferenceExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureReferenceExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureReferenceExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs new file mode 100644 index 00000000..7e2fa974 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureTypingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureTypingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.FeatureTyping dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureTyping may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.Type); + + WriteGuidBin16(ref writer, dto.TypedFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.FeatureTyping Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.FeatureTyping(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.Type = ReadGuidBin16(ref reader); + break; + case 12: + dto.TypedFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureValueMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureValueMessagePackFormatter.cs new file mode 100644 index 00000000..41dce16a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FeatureValueMessagePackFormatter.cs @@ -0,0 +1,240 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FeatureValueMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FeatureValue may not be null"); + } + + writer.WriteArrayHeader(14); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsDefault); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsInitial); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsDefault = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsInitial = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 13: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..6a114325 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowDefinitionMessagePackFormatter.cs @@ -0,0 +1,243 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FlowDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FlowDefinition may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 9: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 10: + dto.IsVariation = reader.ReadBoolean(); + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 14: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowEndMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowEndMessagePackFormatter.cs new file mode 100644 index 00000000..15298b40 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowEndMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FlowEndMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FlowEnd may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs new file mode 100644 index 00000000..c7eedd7d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FlowMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.Flow dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Flow may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.Flow Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.Flow(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowUsageMessagePackFormatter.cs new file mode 100644 index 00000000..d25cecfc --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FlowUsageMessagePackFormatter.cs @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FlowUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Flows.FlowUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FlowUsage may not be null"); + } + + writer.WriteArrayHeader(24); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Flows.FlowUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Flows.FlowUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 22: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 23: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForLoopActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForLoopActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..c20c9d16 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForLoopActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ForLoopActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ForLoopActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForkNodeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForkNodeMessagePackFormatter.cs new file mode 100644 index 00000000..f2879881 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ForkNodeMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ForkNodeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.ForkNode dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ForkNode may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.ForkNode Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.ForkNode(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..f04e8e1d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FramedConcernMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FramedConcernMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The FramedConcernMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = RequirementConstraintKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = RequirementConstraintKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FunctionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FunctionMessagePackFormatter.cs new file mode 100644 index 00000000..2ebef53e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/FunctionMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class FunctionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.Function dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Function may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.Function Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.Function(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IfActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IfActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..2bd66e35 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IfActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class IfActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The IfActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IncludeUseCaseUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IncludeUseCaseUsageMessagePackFormatter.cs new file mode 100644 index 00000000..05f8496e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IncludeUseCaseUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class IncludeUseCaseUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The IncludeUseCaseUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IndexExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IndexExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..4dcb53d6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IndexExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class IndexExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The IndexExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InteractionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InteractionMessagePackFormatter.cs new file mode 100644 index 00000000..5c6cac87 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InteractionMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class InteractionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.Interaction dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Interaction may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.Interaction Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.Interaction(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..720ef4c7 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceDefinitionMessagePackFormatter.cs @@ -0,0 +1,243 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class InterfaceDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The InterfaceDefinition may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 9: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 10: + dto.IsVariation = reader.ReadBoolean(); + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 14: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceUsageMessagePackFormatter.cs new file mode 100644 index 00000000..a8900ec2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InterfaceUsageMessagePackFormatter.cs @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class InterfaceUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The InterfaceUsage may not be null"); + } + + writer.WriteArrayHeader(24); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 22: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 23: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IntersectingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IntersectingMessagePackFormatter.cs new file mode 100644 index 00000000..d558ebb0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/IntersectingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class IntersectingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Intersecting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Intersecting may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.IntersectingType); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Intersecting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Intersecting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IntersectingType = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvariantMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvariantMessagePackFormatter.cs new file mode 100644 index 00000000..7c6afb62 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvariantMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class InvariantMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.Invariant dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Invariant may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsNegated); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.Invariant Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.Invariant(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsNegated = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvocationExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvocationExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..2c6d5b4f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/InvocationExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class InvocationExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The InvocationExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..573fea3f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ItemDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Items.ItemDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ItemDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Items.ItemDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Items.ItemDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemUsageMessagePackFormatter.cs new file mode 100644 index 00000000..0539c392 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ItemUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ItemUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Items.ItemUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ItemUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Items.ItemUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Items.ItemUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/JoinNodeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/JoinNodeMessagePackFormatter.cs new file mode 100644 index 00000000..057dbe90 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/JoinNodeMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class JoinNodeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.JoinNode dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The JoinNode may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.JoinNode Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.JoinNode(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LibraryPackageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LibraryPackageMessagePackFormatter.cs new file mode 100644 index 00000000..98c3728d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LibraryPackageMessagePackFormatter.cs @@ -0,0 +1,189 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LibraryPackageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LibraryPackage may not be null"); + } + + writer.WriteArrayHeader(9); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsStandard); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + dto.IsStandard = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralBooleanMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralBooleanMessagePackFormatter.cs new file mode 100644 index 00000000..e69a2fbe --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralBooleanMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralBooleanMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralBoolean may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadBoolean(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..840a345c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralInfinityMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralInfinityMessagePackFormatter.cs new file mode 100644 index 00000000..511bb0c0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralInfinityMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralInfinityMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralInfinity may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs new file mode 100644 index 00000000..fe4d871e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralIntegerMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralIntegerMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralInteger may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadInt32(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs new file mode 100644 index 00000000..63b70571 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralRationalMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralRationalMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralRational may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadInt32(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralStringMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralStringMessagePackFormatter.cs new file mode 100644 index 00000000..f4af1ec2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/LiteralStringMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class LiteralStringMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The LiteralString may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.Value); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + dto.Value = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipExposeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipExposeMessagePackFormatter.cs new file mode 100644 index 00000000..28d3b74b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipExposeMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MembershipExposeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.MembershipExpose dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MembershipExpose may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.ImportedMembership); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsImportAll); + + writer.Write(dto.IsRecursive); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.MembershipExpose Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.MembershipExpose(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.ImportedMembership = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsImportAll = reader.ReadBoolean(); + break; + case 9: + dto.IsRecursive = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipImportMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipImportMessagePackFormatter.cs new file mode 100644 index 00000000..cd767aa6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipImportMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MembershipImportMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MembershipImport may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.ImportedMembership); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsImportAll); + + writer.Write(dto.IsRecursive); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.ImportedMembership = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsImportAll = reader.ReadBoolean(); + break; + case 9: + dto.IsRecursive = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs new file mode 100644 index 00000000..b1c5a856 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MembershipMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.Membership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Membership may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + WriteGuidBin16(ref writer, dto.MemberElement); + + writer.Write(dto.MemberName); + + writer.Write(dto.MemberShortName); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.Membership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.Membership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.MemberElement = ReadGuidBin16(ref reader); + break; + case 8: + dto.MemberName = reader.ReadString(); + break; + case 9: + dto.MemberShortName = reader.ReadString(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MergeNodeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MergeNodeMessagePackFormatter.cs new file mode 100644 index 00000000..1073fa4e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MergeNodeMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MergeNodeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.MergeNode dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MergeNode may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.MergeNode Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.MergeNode(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetaclassMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetaclassMessagePackFormatter.cs new file mode 100644 index 00000000..b09ba264 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetaclassMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MetaclassMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Metaclass may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataAccessExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataAccessExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..4cc20474 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataAccessExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MetadataAccessExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MetadataAccessExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..c1c08dcc --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MetadataDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MetadataDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataFeatureMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataFeatureMessagePackFormatter.cs new file mode 100644 index 00000000..815cebe1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataFeatureMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MetadataFeatureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MetadataFeature may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataUsageMessagePackFormatter.cs new file mode 100644 index 00000000..a937d270 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MetadataUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MetadataUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MetadataUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityMessagePackFormatter.cs new file mode 100644 index 00000000..da88ee7b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MultiplicityMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Multiplicity dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Multiplicity may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Multiplicity Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Multiplicity(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs new file mode 100644 index 00000000..2108283d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/MultiplicityRangeMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class MultiplicityRangeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The MultiplicityRange may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceExposeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceExposeMessagePackFormatter.cs new file mode 100644 index 00000000..cb268ac9 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceExposeMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class NamespaceExposeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The NamespaceExpose may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.ImportedNamespace); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsImportAll); + + writer.Write(dto.IsRecursive); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.ImportedNamespace = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsImportAll = reader.ReadBoolean(); + break; + case 9: + dto.IsRecursive = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceImportMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceImportMessagePackFormatter.cs new file mode 100644 index 00000000..4e4b9d84 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceImportMessagePackFormatter.cs @@ -0,0 +1,245 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class NamespaceImportMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The NamespaceImport may not be null"); + } + + writer.WriteArrayHeader(15); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.ImportedNamespace); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsImportAll); + + writer.Write(dto.IsRecursive); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.ImportedNamespace = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.IsImportAll = reader.ReadBoolean(); + break; + case 9: + dto.IsRecursive = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 13: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 14: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceMessagePackFormatter.cs new file mode 100644 index 00000000..34701e35 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NamespaceMessagePackFormatter.cs @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class NamespaceMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.Namespace dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Namespace may not be null"); + } + + writer.WriteArrayHeader(8); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.Namespace Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.Namespace(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 7: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NullExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NullExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..a6ecba78 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/NullExpressionMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class NullExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The NullExpression may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ObjectiveMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ObjectiveMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..28baaec0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ObjectiveMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ObjectiveMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ObjectiveMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..e902974a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class OccurrenceDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The OccurrenceDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceUsageMessagePackFormatter.cs new file mode 100644 index 00000000..226efc30 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OccurrenceUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class OccurrenceUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The OccurrenceUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OperatorExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OperatorExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..f77badd4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OperatorExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class OperatorExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The OperatorExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..fc78c742 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/OwningMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class OwningMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The OwningMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PackageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PackageMessagePackFormatter.cs new file mode 100644 index 00000000..675d6a70 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PackageMessagePackFormatter.cs @@ -0,0 +1,184 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PackageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Packages.Package dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Package may not be null"); + } + + writer.WriteArrayHeader(8); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Packages.Package Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Packages.Package(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 7: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ParameterMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ParameterMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..914d423f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ParameterMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ParameterMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ParameterMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..0b918cd6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PartDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Parts.PartDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PartDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Parts.PartDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Parts.PartDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartUsageMessagePackFormatter.cs new file mode 100644 index 00000000..34f8ba3b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PartUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PartUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Parts.PartUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PartUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Parts.PartUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Parts.PartUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PayloadFeatureMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PayloadFeatureMessagePackFormatter.cs new file mode 100644 index 00000000..7f8258c3 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PayloadFeatureMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PayloadFeatureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PayloadFeature may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PerformActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PerformActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..83d9e45a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PerformActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PerformActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PerformActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortConjugationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortConjugationMessagePackFormatter.cs new file mode 100644 index 00000000..37537903 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortConjugationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PortConjugationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Ports.PortConjugation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PortConjugation may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + WriteGuidBin16(ref writer, dto.ConjugatedType); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + WriteGuidBin16(ref writer, dto.OriginalPortDefinition); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Ports.PortConjugation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Ports.PortConjugation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.ConjugatedType = ReadGuidBin16(ref reader); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + dto.OriginalPortDefinition = ReadGuidBin16(ref reader); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..c37a137b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PortDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Ports.PortDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PortDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Ports.PortDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Ports.PortDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortUsageMessagePackFormatter.cs new file mode 100644 index 00000000..68f5db7c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PortUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PortUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Ports.PortUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The PortUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Ports.PortUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Ports.PortUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PredicateMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PredicateMessagePackFormatter.cs new file mode 100644 index 00000000..db6fd339 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/PredicateMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class PredicateMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.Predicate dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Predicate may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.Predicate Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.Predicate(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RedefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RedefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..d2fb45d1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RedefinitionMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RedefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.Redefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Redefinition may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.RedefinedFeature); + + WriteGuidBin16(ref writer, dto.RedefiningFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.Redefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.Redefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.RedefinedFeature = ReadGuidBin16(ref reader); + break; + case 12: + dto.RedefiningFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs new file mode 100644 index 00000000..1097b305 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceSubsettingMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ReferenceSubsettingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ReferenceSubsetting may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.ReferencedFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.ReferencedFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceUsageMessagePackFormatter.cs new file mode 100644 index 00000000..e392ee2c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReferenceUsageMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ReferenceUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ReferenceUsage may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..908ee54b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RenderingDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RenderingDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingUsageMessagePackFormatter.cs new file mode 100644 index 00000000..646e8d3b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RenderingUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RenderingUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.RenderingUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RenderingUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.RenderingUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.RenderingUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementConstraintMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementConstraintMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..89b7730d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementConstraintMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RequirementConstraintMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RequirementConstraintMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = RequirementConstraintKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = RequirementConstraintKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..c9487a94 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RequirementDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RequirementDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.ElementId = reader.ReadString(); + break; + case 4: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs new file mode 100644 index 00000000..8ee9166b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RequirementUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RequirementUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsComposite = reader.ReadBoolean(); + break; + case 7: + dto.IsConstant = reader.ReadBoolean(); + break; + case 8: + dto.IsDerived = reader.ReadBoolean(); + break; + case 9: + dto.IsEnd = reader.ReadBoolean(); + break; + case 10: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 11: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + case 20: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementVerificationMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementVerificationMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..03f131eb --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/RequirementVerificationMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class RequirementVerificationMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The RequirementVerificationMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = RequirementConstraintKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = RequirementConstraintKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ResultExpressionMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ResultExpressionMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..a67b34b6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ResultExpressionMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ResultExpressionMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ResultExpressionMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReturnParameterMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReturnParameterMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..7e495f69 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ReturnParameterMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ReturnParameterMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ReturnParameterMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SatisfyRequirementUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SatisfyRequirementUsageMessagePackFormatter.cs new file mode 100644 index 00000000..89ce8711 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SatisfyRequirementUsageMessagePackFormatter.cs @@ -0,0 +1,286 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SatisfyRequirementUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SatisfyRequirementUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsNegated); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsComposite = reader.ReadBoolean(); + break; + case 7: + dto.IsConstant = reader.ReadBoolean(); + break; + case 8: + dto.IsDerived = reader.ReadBoolean(); + break; + case 9: + dto.IsEnd = reader.ReadBoolean(); + break; + case 10: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 11: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 12: + dto.IsNegated = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + case 21: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..80cdf561 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SelectExpressionMessagePackFormatter.cs @@ -0,0 +1,260 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SelectExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SelectExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + writer.Write(dto.Operator); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + dto.Operator = reader.ReadString(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SendActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SendActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..0f56a4f8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SendActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SendActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SendActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SpecializationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SpecializationMessagePackFormatter.cs new file mode 100644 index 00000000..b8198fb0 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SpecializationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SpecializationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Specialization dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Specialization may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.General); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.Specific); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Specialization Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Specialization(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.General = ReadGuidBin16(ref reader); + break; + case 6: + dto.IsImplied = reader.ReadBoolean(); + break; + case 7: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + dto.Specific = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StakeholderMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StakeholderMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..18f97ee8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StakeholderMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StakeholderMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The StakeholderMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..7752427c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateDefinitionMessagePackFormatter.cs @@ -0,0 +1,209 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StateDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.StateDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The StateDefinition may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsParallel); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.StateDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.StateDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsParallel = reader.ReadBoolean(); + break; + case 9: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 10: + dto.IsVariation = reader.ReadBoolean(); + break; + case 11: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateSubactionMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateSubactionMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..6449b0c4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateSubactionMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StateSubactionMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The StateSubactionMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = StateSubactionKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = StateSubactionKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateUsageMessagePackFormatter.cs new file mode 100644 index 00000000..6d4f4faf --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StateUsageMessagePackFormatter.cs @@ -0,0 +1,286 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StateUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.StateUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The StateUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsParallel); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.StateUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.StateUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsParallel = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 21: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StepMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StepMessagePackFormatter.cs new file mode 100644 index 00000000..9b6087a7 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StepMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StepMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Behaviors.Step dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Step may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Behaviors.Step Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Behaviors.Step(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StructureMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StructureMessagePackFormatter.cs new file mode 100644 index 00000000..f5a66e3b --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/StructureMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class StructureMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Structures.Structure dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Structure may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Structures.Structure Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Structures.Structure(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs new file mode 100644 index 00000000..0fe97aad --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubclassificationMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SubclassificationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Classifiers.Subclassification dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Subclassification may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.Subclassifier); + + WriteGuidBin16(ref writer, dto.Superclassifier); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Classifiers.Subclassification Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Classifiers.Subclassification(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.Subclassifier = ReadGuidBin16(ref reader); + break; + case 12: + dto.Superclassifier = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubjectMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubjectMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..e7522e4d --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubjectMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SubjectMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SubjectMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubsettingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubsettingMessagePackFormatter.cs new file mode 100644 index 00000000..94f5f77a --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SubsettingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SubsettingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.Subsetting dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Subsetting may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.SubsettedFeature); + + WriteGuidBin16(ref writer, dto.SubsettingFeature); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.Subsetting Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.Subsetting(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.SubsettedFeature = ReadGuidBin16(ref reader); + break; + case 12: + dto.SubsettingFeature = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionAsUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionAsUsageMessagePackFormatter.cs new file mode 100644 index 00000000..ee8e4fd1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionAsUsageMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SuccessionAsUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SuccessionAsUsage may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowMessagePackFormatter.cs new file mode 100644 index 00000000..fc69b18e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SuccessionFlowMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SuccessionFlow may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowUsageMessagePackFormatter.cs new file mode 100644 index 00000000..298b4a32 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionFlowUsageMessagePackFormatter.cs @@ -0,0 +1,320 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SuccessionFlowUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The SuccessionFlowUsage may not be null"); + } + + writer.WriteArrayHeader(24); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 14: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 15: + dto.IsPortion = reader.ReadBoolean(); + break; + case 16: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 17: + dto.IsUnique = reader.ReadBoolean(); + break; + case 18: + dto.IsVariation = reader.ReadBoolean(); + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 22: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 23: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionMessagePackFormatter.cs new file mode 100644 index 00000000..6f0ef325 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/SuccessionMessagePackFormatter.cs @@ -0,0 +1,294 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class SuccessionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Kernel.Connectors.Succession dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Succession may not be null"); + } + + writer.WriteArrayHeader(22); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Kernel.Connectors.Succession Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Kernel.Connectors.Succession(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImplied = reader.ReadBoolean(); + break; + case 12: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariable = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 20: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 21: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TerminateActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TerminateActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..f20fab3c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TerminateActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TerminateActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TerminateActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs new file mode 100644 index 00000000..6d2cd47c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TextualRepresentationMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TextualRepresentationMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TextualRepresentation may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.Body); + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.Language); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.Body = reader.ReadString(); + break; + case 3: + dto.DeclaredName = reader.ReadString(); + break; + case 4: + dto.DeclaredShortName = reader.ReadString(); + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.Language = reader.ReadString(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionFeatureMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionFeatureMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..16182fef --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionFeatureMembershipMessagePackFormatter.cs @@ -0,0 +1,237 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TransitionFeatureMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TransitionFeatureMembership may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var kindBytes = TransitionFeatureKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = TransitionFeatureKindProvider.Parse(kindSequence.Value); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 12: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..98f39a95 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TransitionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TransitionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.States.TransitionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TransitionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.States.TransitionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.States.TransitionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TriggerInvocationExpressionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TriggerInvocationExpressionMessagePackFormatter.cs new file mode 100644 index 00000000..b2fc739f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TriggerInvocationExpressionMessagePackFormatter.cs @@ -0,0 +1,262 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TriggerInvocationExpressionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TriggerInvocationExpression may not be null"); + } + + writer.WriteArrayHeader(20); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariable); + + var kindBytes = TriggerKindProvider.ToUtf8LowerBytes(dto.Kind); + writer.WriteString(kindBytes); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariable = reader.ReadBoolean(); + break; + case 17: + var kindSequence = reader.ReadStringSequence(); + dto.Kind = TriggerKindProvider.Parse(kindSequence.Value); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeFeaturingMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeFeaturingMessagePackFormatter.cs new file mode 100644 index 00000000..8e0647a4 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeFeaturingMessagePackFormatter.cs @@ -0,0 +1,233 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TypeFeaturingMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Features.TypeFeaturing dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The TypeFeaturing may not be null"); + } + + writer.WriteArrayHeader(13); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + WriteGuidBin16(ref writer, dto.FeatureOfType); + + WriteGuidBin16(ref writer, dto.FeaturingType); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Features.TypeFeaturing Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Features.TypeFeaturing(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.FeatureOfType = ReadGuidBin16(ref reader); + break; + case 6: + dto.FeaturingType = ReadGuidBin16(ref reader); + break; + case 7: + dto.IsImplied = reader.ReadBoolean(); + break; + case 8: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 12: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeMessagePackFormatter.cs new file mode 100644 index 00000000..84f80c85 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/TypeMessagePackFormatter.cs @@ -0,0 +1,194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class TypeMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Type dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Type may not be null"); + } + + writer.WriteArrayHeader(10); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsSufficient); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Type Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Type(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UnioningMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UnioningMessagePackFormatter.cs new file mode 100644 index 00000000..b4192709 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UnioningMessagePackFormatter.cs @@ -0,0 +1,228 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class UnioningMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Core.Types.Unioning dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Unioning may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + WriteGuidBin16(ref writer, dto.UnioningType); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Core.Types.Unioning Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Core.Types.Unioning(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.UnioningType = ReadGuidBin16(ref reader); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs new file mode 100644 index 00000000..eb3f1caa --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UsageMessagePackFormatter.cs @@ -0,0 +1,255 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class UsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The Usage may not be null"); + } + + writer.WriteArrayHeader(19); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..3c388a11 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class UseCaseDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The UseCaseDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseUsageMessagePackFormatter.cs new file mode 100644 index 00000000..d2dc1563 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/UseCaseUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class UseCaseUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The UseCaseUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VariantMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VariantMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..05d288cb --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VariantMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class VariantMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The VariantMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..294d0d03 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class VerificationCaseDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The VerificationCaseDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseUsageMessagePackFormatter.cs new file mode 100644 index 00000000..430b8f13 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/VerificationCaseUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class VerificationCaseUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The VerificationCaseUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..905ffbaf --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ViewDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.ViewDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ViewDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.ViewDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.ViewDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 8: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 9: + dto.IsVariation = reader.ReadBoolean(); + break; + case 10: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 11: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewRenderingMembershipMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewRenderingMembershipMessagePackFormatter.cs new file mode 100644 index 00000000..8f11b1b1 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewRenderingMembershipMessagePackFormatter.cs @@ -0,0 +1,230 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ViewRenderingMembershipMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ViewRenderingMembership may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsImplied); + + writer.Write(dto.IsImpliedIncluded); + + var ownedRelatedElement = dto.OwnedRelatedElement; + writer.WriteArrayHeader(ownedRelatedElement.Count); + for (var i = 0; i < ownedRelatedElement.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelatedElement[i]); + } + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelatedElement.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelatedElement.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + var visibilityBytes = VisibilityKindProvider.ToUtf8LowerBytes(dto.Visibility); + writer.WriteString(visibilityBytes); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsImplied = reader.ReadBoolean(); + break; + case 6: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 7: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelatedElement.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelatedElement.Add(ReadGuidBin16(ref reader)); + } + break; + case 8: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 9: + if (reader.TryReadNil()) + { + dto.OwningRelatedElement = null; + } + else + { + dto.OwningRelatedElement = ReadGuidBin16(ref reader); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + var visibilitySequence = reader.ReadStringSequence(); + dto.Visibility = VisibilityKindProvider.Parse(visibilitySequence.Value); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewUsageMessagePackFormatter.cs new file mode 100644 index 00000000..a4cfa9d8 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ViewUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.ViewUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ViewUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.ViewUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.ViewUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointDefinitionMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointDefinitionMessagePackFormatter.cs new file mode 100644 index 00000000..f964bb53 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointDefinitionMessagePackFormatter.cs @@ -0,0 +1,204 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ViewpointDefinitionMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ViewpointDefinition may not be null"); + } + + writer.WriteArrayHeader(12); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.ElementId = reader.ReadString(); + break; + case 4: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 5: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 6: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 7: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 8: + dto.IsVariation = reader.ReadBoolean(); + break; + case 9: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 10: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 11: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointUsageMessagePackFormatter.cs new file mode 100644 index 00000000..f2cdadb2 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/ViewpointUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class ViewpointUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The ViewpointUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ReqId); + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 4: + dto.ElementId = reader.ReadString(); + break; + case 5: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 6: + dto.IsComposite = reader.ReadBoolean(); + break; + case 7: + dto.IsConstant = reader.ReadBoolean(); + break; + case 8: + dto.IsDerived = reader.ReadBoolean(); + break; + case 9: + dto.IsEnd = reader.ReadBoolean(); + break; + case 10: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 11: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 12: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 13: + dto.IsPortion = reader.ReadBoolean(); + break; + case 14: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 15: + dto.IsUnique = reader.ReadBoolean(); + break; + case 16: + dto.IsVariation = reader.ReadBoolean(); + break; + case 17: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 18: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 19: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + case 20: + dto.ReqId = reader.ReadString(); + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/WhileLoopActionUsageMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/WhileLoopActionUsageMessagePackFormatter.cs new file mode 100644 index 00000000..92011ce6 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackFormatter/WhileLoopActionUsageMessagePackFormatter.cs @@ -0,0 +1,281 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using SysML2.NET.Extensions.Core; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for MessagePack (de)serialization of the type + /// + public class WhileLoopActionUsageMessagePackFormatter : MessagePackFormatterBase, IMessagePackFormatter + { + /// + /// Serializes an DTO. + /// + /// + /// The to use when serializing the value. + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage dto, MessagePackSerializerOptions options) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), "The WhileLoopActionUsage may not be null"); + } + + writer.WriteArrayHeader(21); + + WriteGuidBin16(ref writer, dto.Id); + + writer.WriteArrayHeader(dto.AliasIds.Count); + for (var i = 0; i < dto.AliasIds.Count; i++) + { + writer.Write(dto.AliasIds[i]); + } + + writer.Write(dto.DeclaredName); + + writer.Write(dto.DeclaredShortName); + + if (dto.Direction.HasValue) + { + var directionBytes = FeatureDirectionKindProvider.ToUtf8LowerBytes(dto.Direction.Value); + writer.WriteString(directionBytes); + } + else + { + writer.WriteNil(); + } + + writer.Write(dto.ElementId); + + writer.Write(dto.IsAbstract); + + writer.Write(dto.IsComposite); + + writer.Write(dto.IsConstant); + + writer.Write(dto.IsDerived); + + writer.Write(dto.IsEnd); + + writer.Write(dto.IsImpliedIncluded); + + writer.Write(dto.IsIndividual); + + writer.Write(dto.IsOrdered); + + writer.Write(dto.IsPortion); + + writer.Write(dto.IsSufficient); + + writer.Write(dto.IsUnique); + + writer.Write(dto.IsVariation); + + var ownedRelationship = dto.OwnedRelationship; + writer.WriteArrayHeader(ownedRelationship.Count); + for (var i = 0; i < ownedRelationship.Count; i++) + { + WriteGuidBin16(ref writer, ownedRelationship[i]); + } + + if (dto.OwningRelationship.HasValue) + { + WriteGuidBin16(ref writer, dto.OwningRelationship.Value); + } + else + { + writer.WriteNil(); + } + + if (dto.PortionKind.HasValue) + { + var portionKindBytes = PortionKindProvider.ToUtf8LowerBytes(dto.PortionKind.Value); + writer.WriteString(portionKindBytes); + } + else + { + writer.WriteNil(); + } + + writer.Flush(); + } + + /// + /// Deserializes an DTO + /// + /// + /// The to deserialize the from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized . + /// + public SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + options.Security.DepthStep(ref reader); + + var dto = new SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + dto.Id = ReadGuidBin16(ref reader); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + dto.AliasIds.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.AliasIds.Add(reader.ReadString()); + } + break; + case 2: + dto.DeclaredName = reader.ReadString(); + break; + case 3: + dto.DeclaredShortName = reader.ReadString(); + break; + case 4: + var directionSequence = reader.ReadStringSequence(); + if (!directionSequence.HasValue) + { + dto.Direction = null; + } + else + { + dto.Direction = FeatureDirectionKindProvider.Parse(directionSequence.Value); + } + break; + case 5: + dto.ElementId = reader.ReadString(); + break; + case 6: + dto.IsAbstract = reader.ReadBoolean(); + break; + case 7: + dto.IsComposite = reader.ReadBoolean(); + break; + case 8: + dto.IsConstant = reader.ReadBoolean(); + break; + case 9: + dto.IsDerived = reader.ReadBoolean(); + break; + case 10: + dto.IsEnd = reader.ReadBoolean(); + break; + case 11: + dto.IsImpliedIncluded = reader.ReadBoolean(); + break; + case 12: + dto.IsIndividual = reader.ReadBoolean(); + break; + case 13: + dto.IsOrdered = reader.ReadBoolean(); + break; + case 14: + dto.IsPortion = reader.ReadBoolean(); + break; + case 15: + dto.IsSufficient = reader.ReadBoolean(); + break; + case 16: + dto.IsUnique = reader.ReadBoolean(); + break; + case 17: + dto.IsVariation = reader.ReadBoolean(); + break; + case 18: + valueLength = reader.ReadArrayHeader(); + dto.OwnedRelationship.Capacity = valueLength; + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + dto.OwnedRelationship.Add(ReadGuidBin16(ref reader)); + } + break; + case 19: + if (reader.TryReadNil()) + { + dto.OwningRelationship = null; + } + else + { + dto.OwningRelationship = ReadGuidBin16(ref reader); + } + break; + case 20: + var portionKindSequence = reader.ReadStringSequence(); + if (!portionKindSequence.HasValue) + { + dto.PortionKind = null; + } + else + { + dto.PortionKind = PortionKindProvider.Parse(portionKindSequence.Value); + } + break; + default: + reader.Skip(); + break; + } + } + + reader.Depth--; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/Payload.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/Payload.cs new file mode 100644 index 00000000..ff742559 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/Payload.cs @@ -0,0 +1,1223 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +/* -------------------------------------------------------------------------- | + | index | property name | + | -------------------------------------------------------------------------- | + | -------------------------------------------------------------------------- | + | 0 | Created | + | -------------------------------------------------------------------------- | + | 1 | Systems.Actions.AcceptActionUsage + | -------------------------------------------------------------------------- | + | 2 | Systems.Actions.ActionDefinition + | -------------------------------------------------------------------------- | + | 3 | Systems.Actions.ActionUsage + | -------------------------------------------------------------------------- | + | 4 | Systems.Requirements.ActorMembership + | -------------------------------------------------------------------------- | + | 5 | Systems.Allocations.AllocationDefinition + | -------------------------------------------------------------------------- | + | 6 | Systems.Allocations.AllocationUsage + | -------------------------------------------------------------------------- | + | 7 | Systems.AnalysisCases.AnalysisCaseDefinition + | -------------------------------------------------------------------------- | + | 8 | Systems.AnalysisCases.AnalysisCaseUsage + | -------------------------------------------------------------------------- | + | 9 | Root.Annotations.AnnotatingElement + | -------------------------------------------------------------------------- | + | 10 | Root.Annotations.Annotation + | -------------------------------------------------------------------------- | + | 11 | Systems.Constraints.AssertConstraintUsage + | -------------------------------------------------------------------------- | + | 12 | Systems.Actions.AssignmentActionUsage + | -------------------------------------------------------------------------- | + | 13 | Kernel.Associations.Association + | -------------------------------------------------------------------------- | + | 14 | Kernel.Associations.AssociationStructure + | -------------------------------------------------------------------------- | + | 15 | Systems.Attributes.AttributeDefinition + | -------------------------------------------------------------------------- | + | 16 | Systems.Attributes.AttributeUsage + | -------------------------------------------------------------------------- | + | 17 | Kernel.Behaviors.Behavior + | -------------------------------------------------------------------------- | + | 18 | Kernel.Connectors.BindingConnector + | -------------------------------------------------------------------------- | + | 19 | Systems.Connections.BindingConnectorAsUsage + | -------------------------------------------------------------------------- | + | 20 | Kernel.Functions.BooleanExpression + | -------------------------------------------------------------------------- | + | 21 | Systems.Calculations.CalculationDefinition + | -------------------------------------------------------------------------- | + | 22 | Systems.Calculations.CalculationUsage + | -------------------------------------------------------------------------- | + | 23 | Systems.Cases.CaseDefinition + | -------------------------------------------------------------------------- | + | 24 | Systems.Cases.CaseUsage + | -------------------------------------------------------------------------- | + | 25 | Kernel.Classes.Class + | -------------------------------------------------------------------------- | + | 26 | Core.Classifiers.Classifier + | -------------------------------------------------------------------------- | + | 27 | Kernel.Expressions.CollectExpression + | -------------------------------------------------------------------------- | + | 28 | Root.Annotations.Comment + | -------------------------------------------------------------------------- | + | 29 | Systems.Requirements.ConcernDefinition + | -------------------------------------------------------------------------- | + | 30 | Systems.Requirements.ConcernUsage + | -------------------------------------------------------------------------- | + | 31 | Systems.Ports.ConjugatedPortDefinition + | -------------------------------------------------------------------------- | + | 32 | Systems.Ports.ConjugatedPortTyping + | -------------------------------------------------------------------------- | + | 33 | Core.Types.Conjugation + | -------------------------------------------------------------------------- | + | 34 | Systems.Connections.ConnectionDefinition + | -------------------------------------------------------------------------- | + | 35 | Systems.Connections.ConnectionUsage + | -------------------------------------------------------------------------- | + | 36 | Kernel.Connectors.Connector + | -------------------------------------------------------------------------- | + | 37 | Systems.Constraints.ConstraintDefinition + | -------------------------------------------------------------------------- | + | 38 | Systems.Constraints.ConstraintUsage + | -------------------------------------------------------------------------- | + | 39 | Kernel.Expressions.ConstructorExpression + | -------------------------------------------------------------------------- | + | 40 | Core.Features.CrossSubsetting + | -------------------------------------------------------------------------- | + | 41 | Kernel.DataTypes.DataType + | -------------------------------------------------------------------------- | + | 42 | Systems.Actions.DecisionNode + | -------------------------------------------------------------------------- | + | 43 | Systems.DefinitionAndUsage.Definition + | -------------------------------------------------------------------------- | + | 44 | Root.Dependencies.Dependency + | -------------------------------------------------------------------------- | + | 45 | Core.Types.Differencing + | -------------------------------------------------------------------------- | + | 46 | Core.Types.Disjoining + | -------------------------------------------------------------------------- | + | 47 | Root.Annotations.Documentation + | -------------------------------------------------------------------------- | + | 48 | Kernel.Packages.ElementFilterMembership + | -------------------------------------------------------------------------- | + | 49 | Core.Features.EndFeatureMembership + | -------------------------------------------------------------------------- | + | 50 | Systems.Enumerations.EnumerationDefinition + | -------------------------------------------------------------------------- | + | 51 | Systems.Enumerations.EnumerationUsage + | -------------------------------------------------------------------------- | + | 52 | Systems.Occurrences.EventOccurrenceUsage + | -------------------------------------------------------------------------- | + | 53 | Systems.States.ExhibitStateUsage + | -------------------------------------------------------------------------- | + | 54 | Kernel.Functions.Expression + | -------------------------------------------------------------------------- | + | 55 | Core.Features.Feature + | -------------------------------------------------------------------------- | + | 56 | Kernel.Expressions.FeatureChainExpression + | -------------------------------------------------------------------------- | + | 57 | Core.Features.FeatureChaining + | -------------------------------------------------------------------------- | + | 58 | Core.Features.FeatureInverting + | -------------------------------------------------------------------------- | + | 59 | Core.Types.FeatureMembership + | -------------------------------------------------------------------------- | + | 60 | Kernel.Expressions.FeatureReferenceExpression + | -------------------------------------------------------------------------- | + | 61 | Core.Features.FeatureTyping + | -------------------------------------------------------------------------- | + | 62 | Kernel.FeatureValues.FeatureValue + | -------------------------------------------------------------------------- | + | 63 | Kernel.Interactions.Flow + | -------------------------------------------------------------------------- | + | 64 | Systems.Flows.FlowDefinition + | -------------------------------------------------------------------------- | + | 65 | Kernel.Interactions.FlowEnd + | -------------------------------------------------------------------------- | + | 66 | Systems.Flows.FlowUsage + | -------------------------------------------------------------------------- | + | 67 | Systems.Actions.ForkNode + | -------------------------------------------------------------------------- | + | 68 | Systems.Actions.ForLoopActionUsage + | -------------------------------------------------------------------------- | + | 69 | Systems.Requirements.FramedConcernMembership + | -------------------------------------------------------------------------- | + | 70 | Kernel.Functions.Function + | -------------------------------------------------------------------------- | + | 71 | Systems.Actions.IfActionUsage + | -------------------------------------------------------------------------- | + | 72 | Systems.UseCases.IncludeUseCaseUsage + | -------------------------------------------------------------------------- | + | 73 | Kernel.Expressions.IndexExpression + | -------------------------------------------------------------------------- | + | 74 | Kernel.Interactions.Interaction + | -------------------------------------------------------------------------- | + | 75 | Systems.Interfaces.InterfaceDefinition + | -------------------------------------------------------------------------- | + | 76 | Systems.Interfaces.InterfaceUsage + | -------------------------------------------------------------------------- | + | 77 | Core.Types.Intersecting + | -------------------------------------------------------------------------- | + | 78 | Kernel.Functions.Invariant + | -------------------------------------------------------------------------- | + | 79 | Kernel.Expressions.InvocationExpression + | -------------------------------------------------------------------------- | + | 80 | Systems.Items.ItemDefinition + | -------------------------------------------------------------------------- | + | 81 | Systems.Items.ItemUsage + | -------------------------------------------------------------------------- | + | 82 | Systems.Actions.JoinNode + | -------------------------------------------------------------------------- | + | 83 | Kernel.Packages.LibraryPackage + | -------------------------------------------------------------------------- | + | 84 | Kernel.Expressions.LiteralBoolean + | -------------------------------------------------------------------------- | + | 85 | Kernel.Expressions.LiteralExpression + | -------------------------------------------------------------------------- | + | 86 | Kernel.Expressions.LiteralInfinity + | -------------------------------------------------------------------------- | + | 87 | Kernel.Expressions.LiteralInteger + | -------------------------------------------------------------------------- | + | 88 | Kernel.Expressions.LiteralRational + | -------------------------------------------------------------------------- | + | 89 | Kernel.Expressions.LiteralString + | -------------------------------------------------------------------------- | + | 90 | Root.Namespaces.Membership + | -------------------------------------------------------------------------- | + | 91 | Systems.Views.MembershipExpose + | -------------------------------------------------------------------------- | + | 92 | Root.Namespaces.MembershipImport + | -------------------------------------------------------------------------- | + | 93 | Systems.Actions.MergeNode + | -------------------------------------------------------------------------- | + | 94 | Kernel.Metadata.Metaclass + | -------------------------------------------------------------------------- | + | 95 | Kernel.Expressions.MetadataAccessExpression + | -------------------------------------------------------------------------- | + | 96 | Systems.Metadata.MetadataDefinition + | -------------------------------------------------------------------------- | + | 97 | Kernel.Metadata.MetadataFeature + | -------------------------------------------------------------------------- | + | 98 | Systems.Metadata.MetadataUsage + | -------------------------------------------------------------------------- | + | 99 | Core.Types.Multiplicity + | -------------------------------------------------------------------------- | + | 100 | Kernel.Multiplicities.MultiplicityRange + | -------------------------------------------------------------------------- | + | 101 | Root.Namespaces.Namespace + | -------------------------------------------------------------------------- | + | 102 | Systems.Views.NamespaceExpose + | -------------------------------------------------------------------------- | + | 103 | Root.Namespaces.NamespaceImport + | -------------------------------------------------------------------------- | + | 104 | Kernel.Expressions.NullExpression + | -------------------------------------------------------------------------- | + | 105 | Systems.Cases.ObjectiveMembership + | -------------------------------------------------------------------------- | + | 106 | Systems.Occurrences.OccurrenceDefinition + | -------------------------------------------------------------------------- | + | 107 | Systems.Occurrences.OccurrenceUsage + | -------------------------------------------------------------------------- | + | 108 | Kernel.Expressions.OperatorExpression + | -------------------------------------------------------------------------- | + | 109 | Root.Namespaces.OwningMembership + | -------------------------------------------------------------------------- | + | 110 | Kernel.Packages.Package + | -------------------------------------------------------------------------- | + | 111 | Kernel.Behaviors.ParameterMembership + | -------------------------------------------------------------------------- | + | 112 | Systems.Parts.PartDefinition + | -------------------------------------------------------------------------- | + | 113 | Systems.Parts.PartUsage + | -------------------------------------------------------------------------- | + | 114 | Kernel.Interactions.PayloadFeature + | -------------------------------------------------------------------------- | + | 115 | Systems.Actions.PerformActionUsage + | -------------------------------------------------------------------------- | + | 116 | Systems.Ports.PortConjugation + | -------------------------------------------------------------------------- | + | 117 | Systems.Ports.PortDefinition + | -------------------------------------------------------------------------- | + | 118 | Systems.Ports.PortUsage + | -------------------------------------------------------------------------- | + | 119 | Kernel.Functions.Predicate + | -------------------------------------------------------------------------- | + | 120 | Core.Features.Redefinition + | -------------------------------------------------------------------------- | + | 121 | Core.Features.ReferenceSubsetting + | -------------------------------------------------------------------------- | + | 122 | Systems.DefinitionAndUsage.ReferenceUsage + | -------------------------------------------------------------------------- | + | 123 | Systems.Views.RenderingDefinition + | -------------------------------------------------------------------------- | + | 124 | Systems.Views.RenderingUsage + | -------------------------------------------------------------------------- | + | 125 | Systems.Requirements.RequirementConstraintMembership + | -------------------------------------------------------------------------- | + | 126 | Systems.Requirements.RequirementDefinition + | -------------------------------------------------------------------------- | + | 127 | Systems.Requirements.RequirementUsage + | -------------------------------------------------------------------------- | + | 128 | Systems.VerificationCases.RequirementVerificationMembership + | -------------------------------------------------------------------------- | + | 129 | Kernel.Functions.ResultExpressionMembership + | -------------------------------------------------------------------------- | + | 130 | Kernel.Functions.ReturnParameterMembership + | -------------------------------------------------------------------------- | + | 131 | Systems.Requirements.SatisfyRequirementUsage + | -------------------------------------------------------------------------- | + | 132 | Kernel.Expressions.SelectExpression + | -------------------------------------------------------------------------- | + | 133 | Systems.Actions.SendActionUsage + | -------------------------------------------------------------------------- | + | 134 | Core.Types.Specialization + | -------------------------------------------------------------------------- | + | 135 | Systems.Requirements.StakeholderMembership + | -------------------------------------------------------------------------- | + | 136 | Systems.States.StateDefinition + | -------------------------------------------------------------------------- | + | 137 | Systems.States.StateSubactionMembership + | -------------------------------------------------------------------------- | + | 138 | Systems.States.StateUsage + | -------------------------------------------------------------------------- | + | 139 | Kernel.Behaviors.Step + | -------------------------------------------------------------------------- | + | 140 | Kernel.Structures.Structure + | -------------------------------------------------------------------------- | + | 141 | Core.Classifiers.Subclassification + | -------------------------------------------------------------------------- | + | 142 | Systems.Requirements.SubjectMembership + | -------------------------------------------------------------------------- | + | 143 | Core.Features.Subsetting + | -------------------------------------------------------------------------- | + | 144 | Kernel.Connectors.Succession + | -------------------------------------------------------------------------- | + | 145 | Systems.Connections.SuccessionAsUsage + | -------------------------------------------------------------------------- | + | 146 | Kernel.Interactions.SuccessionFlow + | -------------------------------------------------------------------------- | + | 147 | Systems.Flows.SuccessionFlowUsage + | -------------------------------------------------------------------------- | + | 148 | Systems.Actions.TerminateActionUsage + | -------------------------------------------------------------------------- | + | 149 | Root.Annotations.TextualRepresentation + | -------------------------------------------------------------------------- | + | 150 | Systems.States.TransitionFeatureMembership + | -------------------------------------------------------------------------- | + | 151 | Systems.States.TransitionUsage + | -------------------------------------------------------------------------- | + | 152 | Systems.Actions.TriggerInvocationExpression + | -------------------------------------------------------------------------- | + | 153 | Core.Types.Type + | -------------------------------------------------------------------------- | + | 154 | Core.Features.TypeFeaturing + | -------------------------------------------------------------------------- | + | 155 | Core.Types.Unioning + | -------------------------------------------------------------------------- | + | 156 | Systems.DefinitionAndUsage.Usage + | -------------------------------------------------------------------------- | + | 157 | Systems.UseCases.UseCaseDefinition + | -------------------------------------------------------------------------- | + | 158 | Systems.UseCases.UseCaseUsage + | -------------------------------------------------------------------------- | + | 159 | Systems.DefinitionAndUsage.VariantMembership + | -------------------------------------------------------------------------- | + | 160 | Systems.VerificationCases.VerificationCaseDefinition + | -------------------------------------------------------------------------- | + | 161 | Systems.VerificationCases.VerificationCaseUsage + | -------------------------------------------------------------------------- | + | 162 | Systems.Views.ViewDefinition + | -------------------------------------------------------------------------- | + | 163 | Systems.Views.ViewpointDefinition + | -------------------------------------------------------------------------- | + | 164 | Systems.Views.ViewpointUsage + | -------------------------------------------------------------------------- | + | 165 | Systems.Views.ViewRenderingMembership + | -------------------------------------------------------------------------- | + | 166 | Systems.Views.ViewUsage + | -------------------------------------------------------------------------- | + | 167 | Systems.Actions.WhileLoopActionUsage + | -------------------------------------------------------------------------- | + * -------------------------------------------------------------------------- | */ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + /// + /// The acts as envelope around the Core DTO classes and is used as + /// construct to transport the objects using MessagePack + /// + internal class Payload + { + /// + /// Gets or sets the at which the was created + /// + internal DateTime Created { get; set; } = DateTime.UtcNow; + + /// + /// Gets or sets the list of . + /// + internal List AcceptActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ActionDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ActorMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AllocationDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AllocationUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AnalysisCaseDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AnalysisCaseUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AnnotatingElement { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Annotation { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AssertConstraintUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AssignmentActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Association { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AssociationStructure { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AttributeDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List AttributeUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Behavior { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List BindingConnector { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List BindingConnectorAsUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List BooleanExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CalculationDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CalculationUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CaseDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CaseUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Class { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Classifier { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CollectExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Comment { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConcernDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConcernUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConjugatedPortDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConjugatedPortTyping { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Conjugation { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConnectionDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConnectionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Connector { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConstraintDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConstraintUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ConstructorExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List CrossSubsetting { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List DataType { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List DecisionNode { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Definition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Dependency { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Differencing { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Disjoining { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Documentation { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ElementFilterMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List EndFeatureMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List EnumerationDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List EnumerationUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List EventOccurrenceUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ExhibitStateUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Expression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Feature { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureChainExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureChaining { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureInverting { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureReferenceExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureTyping { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FeatureValue { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Flow { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FlowDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FlowEnd { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FlowUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ForkNode { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ForLoopActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List FramedConcernMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Function { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List IfActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List IncludeUseCaseUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List IndexExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Interaction { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List InterfaceDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List InterfaceUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Intersecting { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Invariant { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List InvocationExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ItemDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ItemUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List JoinNode { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LibraryPackage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralBoolean { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralInfinity { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralInteger { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralRational { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List LiteralString { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Membership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MembershipExpose { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MembershipImport { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MergeNode { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Metaclass { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MetadataAccessExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MetadataDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MetadataFeature { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MetadataUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Multiplicity { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List MultiplicityRange { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Namespace { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List NamespaceExpose { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List NamespaceImport { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List NullExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ObjectiveMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List OccurrenceDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List OccurrenceUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List OperatorExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List OwningMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Package { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ParameterMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PartDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PartUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PayloadFeature { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PerformActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PortConjugation { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PortDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List PortUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Predicate { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Redefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ReferenceSubsetting { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ReferenceUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RenderingDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RenderingUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RequirementConstraintMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RequirementDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RequirementUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List RequirementVerificationMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ResultExpressionMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ReturnParameterMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SatisfyRequirementUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SelectExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SendActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Specialization { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List StakeholderMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List StateDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List StateSubactionMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List StateUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Step { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Structure { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Subclassification { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SubjectMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Subsetting { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Succession { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SuccessionAsUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SuccessionFlow { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List SuccessionFlowUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TerminateActionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TextualRepresentation { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TransitionFeatureMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TransitionUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TriggerInvocationExpression { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Type { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List TypeFeaturing { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Unioning { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List Usage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List UseCaseDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List UseCaseUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List VariantMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List VerificationCaseDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List VerificationCaseUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ViewDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ViewpointDefinition { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ViewpointUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ViewRenderingMembership { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List ViewUsage { get; set; } = []; + + /// + /// Gets or sets the list of . + /// + internal List WhileLoopActionUsage { get; set; } = []; + + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadFactory.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadFactory.cs new file mode 100644 index 00000000..f9cdbe45 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadFactory.cs @@ -0,0 +1,1194 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Common; + + using SysML2.NET.Core.DTO.Root.Annotations; + + /// + /// The purpose of the class is to create an + /// instance of + /// + internal static class PayloadFactory + { + /// + /// Creates an instance of from the provided + /// + /// + /// The on the bases of which the will + /// be created + /// + /// + /// An instance of + /// + internal static Payload ToPayload(this IEnumerable dataItems) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + var payload = new Payload + { + Created = DateTime.UtcNow, + }; + + // compute the capacity of each DTO type to optimize the size of the Payload properties + var capacity = new Dictionary(capacity: 167); + + foreach (var item in dataItems) + { + var type = item.GetType(); + capacity.TryGetValue(type, out var current); + capacity[type] = current + 1; + } + + // based on the computed capacity, set the size of each Payload property + SetCapacity(payload.AcceptActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage)); + SetCapacity(payload.ActionDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition)); + SetCapacity(payload.ActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionUsage)); + SetCapacity(payload.ActorMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership)); + SetCapacity(payload.AllocationDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition)); + SetCapacity(payload.AllocationUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage)); + SetCapacity(payload.AnalysisCaseDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition)); + SetCapacity(payload.AnalysisCaseUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage)); + SetCapacity(payload.AnnotatingElement, capacity, typeof(SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement)); + SetCapacity(payload.Annotation, capacity, typeof(SysML2.NET.Core.DTO.Root.Annotations.Annotation)); + SetCapacity(payload.AssertConstraintUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage)); + SetCapacity(payload.AssignmentActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage)); + SetCapacity(payload.Association, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Associations.Association)); + SetCapacity(payload.AssociationStructure, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure)); + SetCapacity(payload.AttributeDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition)); + SetCapacity(payload.AttributeUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage)); + SetCapacity(payload.Behavior, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior)); + SetCapacity(payload.BindingConnector, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector)); + SetCapacity(payload.BindingConnectorAsUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage)); + SetCapacity(payload.BooleanExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression)); + SetCapacity(payload.CalculationDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition)); + SetCapacity(payload.CalculationUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage)); + SetCapacity(payload.CaseDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition)); + SetCapacity(payload.CaseUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseUsage)); + SetCapacity(payload.Class, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Classes.Class)); + SetCapacity(payload.Classifier, capacity, typeof(SysML2.NET.Core.DTO.Core.Classifiers.Classifier)); + SetCapacity(payload.CollectExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression)); + SetCapacity(payload.Comment, capacity, typeof(SysML2.NET.Core.DTO.Root.Annotations.Comment)); + SetCapacity(payload.ConcernDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition)); + SetCapacity(payload.ConcernUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage)); + SetCapacity(payload.ConjugatedPortDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition)); + SetCapacity(payload.ConjugatedPortTyping, capacity, typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping)); + SetCapacity(payload.Conjugation, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Conjugation)); + SetCapacity(payload.ConnectionDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition)); + SetCapacity(payload.ConnectionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage)); + SetCapacity(payload.Connector, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Connectors.Connector)); + SetCapacity(payload.ConstraintDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition)); + SetCapacity(payload.ConstraintUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage)); + SetCapacity(payload.ConstructorExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression)); + SetCapacity(payload.CrossSubsetting, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.CrossSubsetting)); + SetCapacity(payload.DataType, capacity, typeof(SysML2.NET.Core.DTO.Kernel.DataTypes.DataType)); + SetCapacity(payload.DecisionNode, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.DecisionNode)); + SetCapacity(payload.Definition, capacity, typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition)); + SetCapacity(payload.Dependency, capacity, typeof(SysML2.NET.Core.DTO.Root.Dependencies.Dependency)); + SetCapacity(payload.Differencing, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Differencing)); + SetCapacity(payload.Disjoining, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Disjoining)); + SetCapacity(payload.Documentation, capacity, typeof(SysML2.NET.Core.DTO.Root.Annotations.Documentation)); + SetCapacity(payload.ElementFilterMembership, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership)); + SetCapacity(payload.EndFeatureMembership, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership)); + SetCapacity(payload.EnumerationDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition)); + SetCapacity(payload.EnumerationUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage)); + SetCapacity(payload.EventOccurrenceUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage)); + SetCapacity(payload.ExhibitStateUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage)); + SetCapacity(payload.Expression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.Expression)); + SetCapacity(payload.Feature, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.Feature)); + SetCapacity(payload.FeatureChainExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression)); + SetCapacity(payload.FeatureChaining, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.FeatureChaining)); + SetCapacity(payload.FeatureInverting, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.FeatureInverting)); + SetCapacity(payload.FeatureMembership, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.FeatureMembership)); + SetCapacity(payload.FeatureReferenceExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression)); + SetCapacity(payload.FeatureTyping, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.FeatureTyping)); + SetCapacity(payload.FeatureValue, capacity, typeof(SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue)); + SetCapacity(payload.Flow, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Flow)); + SetCapacity(payload.FlowDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition)); + SetCapacity(payload.FlowEnd, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd)); + SetCapacity(payload.FlowUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowUsage)); + SetCapacity(payload.ForkNode, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.ForkNode)); + SetCapacity(payload.ForLoopActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage)); + SetCapacity(payload.FramedConcernMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership)); + SetCapacity(payload.Function, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.Function)); + SetCapacity(payload.IfActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage)); + SetCapacity(payload.IncludeUseCaseUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage)); + SetCapacity(payload.IndexExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression)); + SetCapacity(payload.Interaction, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Interaction)); + SetCapacity(payload.InterfaceDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition)); + SetCapacity(payload.InterfaceUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage)); + SetCapacity(payload.Intersecting, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Intersecting)); + SetCapacity(payload.Invariant, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.Invariant)); + SetCapacity(payload.InvocationExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression)); + SetCapacity(payload.ItemDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Items.ItemDefinition)); + SetCapacity(payload.ItemUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Items.ItemUsage)); + SetCapacity(payload.JoinNode, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.JoinNode)); + SetCapacity(payload.LibraryPackage, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage)); + SetCapacity(payload.LiteralBoolean, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean)); + SetCapacity(payload.LiteralExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression)); + SetCapacity(payload.LiteralInfinity, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity)); + SetCapacity(payload.LiteralInteger, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger)); + SetCapacity(payload.LiteralRational, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational)); + SetCapacity(payload.LiteralString, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString)); + SetCapacity(payload.Membership, capacity, typeof(SysML2.NET.Core.DTO.Root.Namespaces.Membership)); + SetCapacity(payload.MembershipExpose, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.MembershipExpose)); + SetCapacity(payload.MembershipImport, capacity, typeof(SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport)); + SetCapacity(payload.MergeNode, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.MergeNode)); + SetCapacity(payload.Metaclass, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass)); + SetCapacity(payload.MetadataAccessExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression)); + SetCapacity(payload.MetadataDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition)); + SetCapacity(payload.MetadataFeature, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature)); + SetCapacity(payload.MetadataUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage)); + SetCapacity(payload.Multiplicity, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Multiplicity)); + SetCapacity(payload.MultiplicityRange, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange)); + SetCapacity(payload.Namespace, capacity, typeof(SysML2.NET.Core.DTO.Root.Namespaces.Namespace)); + SetCapacity(payload.NamespaceExpose, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose)); + SetCapacity(payload.NamespaceImport, capacity, typeof(SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport)); + SetCapacity(payload.NullExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression)); + SetCapacity(payload.ObjectiveMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership)); + SetCapacity(payload.OccurrenceDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition)); + SetCapacity(payload.OccurrenceUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage)); + SetCapacity(payload.OperatorExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression)); + SetCapacity(payload.OwningMembership, capacity, typeof(SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership)); + SetCapacity(payload.Package, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Packages.Package)); + SetCapacity(payload.ParameterMembership, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership)); + SetCapacity(payload.PartDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Parts.PartDefinition)); + SetCapacity(payload.PartUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Parts.PartUsage)); + SetCapacity(payload.PayloadFeature, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature)); + SetCapacity(payload.PerformActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage)); + SetCapacity(payload.PortConjugation, capacity, typeof(SysML2.NET.Core.DTO.Systems.Ports.PortConjugation)); + SetCapacity(payload.PortDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Ports.PortDefinition)); + SetCapacity(payload.PortUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Ports.PortUsage)); + SetCapacity(payload.Predicate, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.Predicate)); + SetCapacity(payload.Redefinition, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.Redefinition)); + SetCapacity(payload.ReferenceSubsetting, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting)); + SetCapacity(payload.ReferenceUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage)); + SetCapacity(payload.RenderingDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition)); + SetCapacity(payload.RenderingUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.RenderingUsage)); + SetCapacity(payload.RequirementConstraintMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership)); + SetCapacity(payload.RequirementDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition)); + SetCapacity(payload.RequirementUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage)); + SetCapacity(payload.RequirementVerificationMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership)); + SetCapacity(payload.ResultExpressionMembership, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership)); + SetCapacity(payload.ReturnParameterMembership, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership)); + SetCapacity(payload.SatisfyRequirementUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage)); + SetCapacity(payload.SelectExpression, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression)); + SetCapacity(payload.SendActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage)); + SetCapacity(payload.Specialization, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Specialization)); + SetCapacity(payload.StakeholderMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership)); + SetCapacity(payload.StateDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.StateDefinition)); + SetCapacity(payload.StateSubactionMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership)); + SetCapacity(payload.StateUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.StateUsage)); + SetCapacity(payload.Step, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.Step)); + SetCapacity(payload.Structure, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Structures.Structure)); + SetCapacity(payload.Subclassification, capacity, typeof(SysML2.NET.Core.DTO.Core.Classifiers.Subclassification)); + SetCapacity(payload.SubjectMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership)); + SetCapacity(payload.Subsetting, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.Subsetting)); + SetCapacity(payload.Succession, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Connectors.Succession)); + SetCapacity(payload.SuccessionAsUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage)); + SetCapacity(payload.SuccessionFlow, capacity, typeof(SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow)); + SetCapacity(payload.SuccessionFlowUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage)); + SetCapacity(payload.TerminateActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage)); + SetCapacity(payload.TextualRepresentation, capacity, typeof(SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation)); + SetCapacity(payload.TransitionFeatureMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership)); + SetCapacity(payload.TransitionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.States.TransitionUsage)); + SetCapacity(payload.TriggerInvocationExpression, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression)); + SetCapacity(payload.Type, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Type)); + SetCapacity(payload.TypeFeaturing, capacity, typeof(SysML2.NET.Core.DTO.Core.Features.TypeFeaturing)); + SetCapacity(payload.Unioning, capacity, typeof(SysML2.NET.Core.DTO.Core.Types.Unioning)); + SetCapacity(payload.Usage, capacity, typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage)); + SetCapacity(payload.UseCaseDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition)); + SetCapacity(payload.UseCaseUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage)); + SetCapacity(payload.VariantMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership)); + SetCapacity(payload.VerificationCaseDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition)); + SetCapacity(payload.VerificationCaseUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage)); + SetCapacity(payload.ViewDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.ViewDefinition)); + SetCapacity(payload.ViewpointDefinition, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition)); + SetCapacity(payload.ViewpointUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage)); + SetCapacity(payload.ViewRenderingMembership, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership)); + SetCapacity(payload.ViewUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Views.ViewUsage)); + SetCapacity(payload.WhileLoopActionUsage, capacity, typeof(SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage)); + + // iterate through the dataItems and allocate to the appropriate Payload property + foreach (var dataItem in dataItems) + { + switch (dataItem) + { + case SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage acceptActionUsageDto: + payload.AcceptActionUsage.Add(acceptActionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition actionDefinitionDto: + payload.ActionDefinition.Add(actionDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.ActionUsage actionUsageDto: + payload.ActionUsage.Add(actionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership actorMembershipDto: + payload.ActorMembership.Add(actorMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition allocationDefinitionDto: + payload.AllocationDefinition.Add(allocationDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage allocationUsageDto: + payload.AllocationUsage.Add(allocationUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition analysisCaseDefinitionDto: + payload.AnalysisCaseDefinition.Add(analysisCaseDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage analysisCaseUsageDto: + payload.AnalysisCaseUsage.Add(analysisCaseUsageDto); + break; + case SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement annotatingElementDto: + payload.AnnotatingElement.Add(annotatingElementDto); + break; + case SysML2.NET.Core.DTO.Root.Annotations.Annotation annotationDto: + payload.Annotation.Add(annotationDto); + break; + case SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage assertConstraintUsageDto: + payload.AssertConstraintUsage.Add(assertConstraintUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage assignmentActionUsageDto: + payload.AssignmentActionUsage.Add(assignmentActionUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Associations.Association associationDto: + payload.Association.Add(associationDto); + break; + case SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure associationStructureDto: + payload.AssociationStructure.Add(associationStructureDto); + break; + case SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition attributeDefinitionDto: + payload.AttributeDefinition.Add(attributeDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage attributeUsageDto: + payload.AttributeUsage.Add(attributeUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior behaviorDto: + payload.Behavior.Add(behaviorDto); + break; + case SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector bindingConnectorDto: + payload.BindingConnector.Add(bindingConnectorDto); + break; + case SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage bindingConnectorAsUsageDto: + payload.BindingConnectorAsUsage.Add(bindingConnectorAsUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression booleanExpressionDto: + payload.BooleanExpression.Add(booleanExpressionDto); + break; + case SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition calculationDefinitionDto: + payload.CalculationDefinition.Add(calculationDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage calculationUsageDto: + payload.CalculationUsage.Add(calculationUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition caseDefinitionDto: + payload.CaseDefinition.Add(caseDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Cases.CaseUsage caseUsageDto: + payload.CaseUsage.Add(caseUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Classes.Class classDto: + payload.Class.Add(classDto); + break; + case SysML2.NET.Core.DTO.Core.Classifiers.Classifier classifierDto: + payload.Classifier.Add(classifierDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression collectExpressionDto: + payload.CollectExpression.Add(collectExpressionDto); + break; + case SysML2.NET.Core.DTO.Root.Annotations.Comment commentDto: + payload.Comment.Add(commentDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition concernDefinitionDto: + payload.ConcernDefinition.Add(concernDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage concernUsageDto: + payload.ConcernUsage.Add(concernUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition conjugatedPortDefinitionDto: + payload.ConjugatedPortDefinition.Add(conjugatedPortDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping conjugatedPortTypingDto: + payload.ConjugatedPortTyping.Add(conjugatedPortTypingDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Conjugation conjugationDto: + payload.Conjugation.Add(conjugationDto); + break; + case SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition connectionDefinitionDto: + payload.ConnectionDefinition.Add(connectionDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage connectionUsageDto: + payload.ConnectionUsage.Add(connectionUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Connectors.Connector connectorDto: + payload.Connector.Add(connectorDto); + break; + case SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition constraintDefinitionDto: + payload.ConstraintDefinition.Add(constraintDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage constraintUsageDto: + payload.ConstraintUsage.Add(constraintUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression constructorExpressionDto: + payload.ConstructorExpression.Add(constructorExpressionDto); + break; + case SysML2.NET.Core.DTO.Core.Features.CrossSubsetting crossSubsettingDto: + payload.CrossSubsetting.Add(crossSubsettingDto); + break; + case SysML2.NET.Core.DTO.Kernel.DataTypes.DataType dataTypeDto: + payload.DataType.Add(dataTypeDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.DecisionNode decisionNodeDto: + payload.DecisionNode.Add(decisionNodeDto); + break; + case SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition definitionDto: + payload.Definition.Add(definitionDto); + break; + case SysML2.NET.Core.DTO.Root.Dependencies.Dependency dependencyDto: + payload.Dependency.Add(dependencyDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Differencing differencingDto: + payload.Differencing.Add(differencingDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Disjoining disjoiningDto: + payload.Disjoining.Add(disjoiningDto); + break; + case SysML2.NET.Core.DTO.Root.Annotations.Documentation documentationDto: + payload.Documentation.Add(documentationDto); + break; + case SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership elementFilterMembershipDto: + payload.ElementFilterMembership.Add(elementFilterMembershipDto); + break; + case SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership endFeatureMembershipDto: + payload.EndFeatureMembership.Add(endFeatureMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition enumerationDefinitionDto: + payload.EnumerationDefinition.Add(enumerationDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage enumerationUsageDto: + payload.EnumerationUsage.Add(enumerationUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage eventOccurrenceUsageDto: + payload.EventOccurrenceUsage.Add(eventOccurrenceUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage exhibitStateUsageDto: + payload.ExhibitStateUsage.Add(exhibitStateUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.Expression expressionDto: + payload.Expression.Add(expressionDto); + break; + case SysML2.NET.Core.DTO.Core.Features.Feature featureDto: + payload.Feature.Add(featureDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression featureChainExpressionDto: + payload.FeatureChainExpression.Add(featureChainExpressionDto); + break; + case SysML2.NET.Core.DTO.Core.Features.FeatureChaining featureChainingDto: + payload.FeatureChaining.Add(featureChainingDto); + break; + case SysML2.NET.Core.DTO.Core.Features.FeatureInverting featureInvertingDto: + payload.FeatureInverting.Add(featureInvertingDto); + break; + case SysML2.NET.Core.DTO.Core.Types.FeatureMembership featureMembershipDto: + payload.FeatureMembership.Add(featureMembershipDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression featureReferenceExpressionDto: + payload.FeatureReferenceExpression.Add(featureReferenceExpressionDto); + break; + case SysML2.NET.Core.DTO.Core.Features.FeatureTyping featureTypingDto: + payload.FeatureTyping.Add(featureTypingDto); + break; + case SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue featureValueDto: + payload.FeatureValue.Add(featureValueDto); + break; + case SysML2.NET.Core.DTO.Kernel.Interactions.Flow flowDto: + payload.Flow.Add(flowDto); + break; + case SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition flowDefinitionDto: + payload.FlowDefinition.Add(flowDefinitionDto); + break; + case SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd flowEndDto: + payload.FlowEnd.Add(flowEndDto); + break; + case SysML2.NET.Core.DTO.Systems.Flows.FlowUsage flowUsageDto: + payload.FlowUsage.Add(flowUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.ForkNode forkNodeDto: + payload.ForkNode.Add(forkNodeDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage forLoopActionUsageDto: + payload.ForLoopActionUsage.Add(forLoopActionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership framedConcernMembershipDto: + payload.FramedConcernMembership.Add(framedConcernMembershipDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.Function functionDto: + payload.Function.Add(functionDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage ifActionUsageDto: + payload.IfActionUsage.Add(ifActionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage includeUseCaseUsageDto: + payload.IncludeUseCaseUsage.Add(includeUseCaseUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression indexExpressionDto: + payload.IndexExpression.Add(indexExpressionDto); + break; + case SysML2.NET.Core.DTO.Kernel.Interactions.Interaction interactionDto: + payload.Interaction.Add(interactionDto); + break; + case SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition interfaceDefinitionDto: + payload.InterfaceDefinition.Add(interfaceDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage interfaceUsageDto: + payload.InterfaceUsage.Add(interfaceUsageDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Intersecting intersectingDto: + payload.Intersecting.Add(intersectingDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.Invariant invariantDto: + payload.Invariant.Add(invariantDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression invocationExpressionDto: + payload.InvocationExpression.Add(invocationExpressionDto); + break; + case SysML2.NET.Core.DTO.Systems.Items.ItemDefinition itemDefinitionDto: + payload.ItemDefinition.Add(itemDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Items.ItemUsage itemUsageDto: + payload.ItemUsage.Add(itemUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.JoinNode joinNodeDto: + payload.JoinNode.Add(joinNodeDto); + break; + case SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage libraryPackageDto: + payload.LibraryPackage.Add(libraryPackageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean literalBooleanDto: + payload.LiteralBoolean.Add(literalBooleanDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression literalExpressionDto: + payload.LiteralExpression.Add(literalExpressionDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity literalInfinityDto: + payload.LiteralInfinity.Add(literalInfinityDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger literalIntegerDto: + payload.LiteralInteger.Add(literalIntegerDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational literalRationalDto: + payload.LiteralRational.Add(literalRationalDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString literalStringDto: + payload.LiteralString.Add(literalStringDto); + break; + case SysML2.NET.Core.DTO.Root.Namespaces.Membership membershipDto: + payload.Membership.Add(membershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.MembershipExpose membershipExposeDto: + payload.MembershipExpose.Add(membershipExposeDto); + break; + case SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport membershipImportDto: + payload.MembershipImport.Add(membershipImportDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.MergeNode mergeNodeDto: + payload.MergeNode.Add(mergeNodeDto); + break; + case SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass metaclassDto: + payload.Metaclass.Add(metaclassDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression metadataAccessExpressionDto: + payload.MetadataAccessExpression.Add(metadataAccessExpressionDto); + break; + case SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition metadataDefinitionDto: + payload.MetadataDefinition.Add(metadataDefinitionDto); + break; + case SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature metadataFeatureDto: + payload.MetadataFeature.Add(metadataFeatureDto); + break; + case SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage metadataUsageDto: + payload.MetadataUsage.Add(metadataUsageDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Multiplicity multiplicityDto: + payload.Multiplicity.Add(multiplicityDto); + break; + case SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange multiplicityRangeDto: + payload.MultiplicityRange.Add(multiplicityRangeDto); + break; + case SysML2.NET.Core.DTO.Root.Namespaces.Namespace namespaceDto: + payload.Namespace.Add(namespaceDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose namespaceExposeDto: + payload.NamespaceExpose.Add(namespaceExposeDto); + break; + case SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport namespaceImportDto: + payload.NamespaceImport.Add(namespaceImportDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression nullExpressionDto: + payload.NullExpression.Add(nullExpressionDto); + break; + case SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership objectiveMembershipDto: + payload.ObjectiveMembership.Add(objectiveMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition occurrenceDefinitionDto: + payload.OccurrenceDefinition.Add(occurrenceDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage occurrenceUsageDto: + payload.OccurrenceUsage.Add(occurrenceUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression operatorExpressionDto: + payload.OperatorExpression.Add(operatorExpressionDto); + break; + case SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership owningMembershipDto: + payload.OwningMembership.Add(owningMembershipDto); + break; + case SysML2.NET.Core.DTO.Kernel.Packages.Package packageDto: + payload.Package.Add(packageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership parameterMembershipDto: + payload.ParameterMembership.Add(parameterMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Parts.PartDefinition partDefinitionDto: + payload.PartDefinition.Add(partDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Parts.PartUsage partUsageDto: + payload.PartUsage.Add(partUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature payloadFeatureDto: + payload.PayloadFeature.Add(payloadFeatureDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage performActionUsageDto: + payload.PerformActionUsage.Add(performActionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Ports.PortConjugation portConjugationDto: + payload.PortConjugation.Add(portConjugationDto); + break; + case SysML2.NET.Core.DTO.Systems.Ports.PortDefinition portDefinitionDto: + payload.PortDefinition.Add(portDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Ports.PortUsage portUsageDto: + payload.PortUsage.Add(portUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.Predicate predicateDto: + payload.Predicate.Add(predicateDto); + break; + case SysML2.NET.Core.DTO.Core.Features.Redefinition redefinitionDto: + payload.Redefinition.Add(redefinitionDto); + break; + case SysML2.NET.Core.DTO.Core.Features.ReferenceSubsetting referenceSubsettingDto: + payload.ReferenceSubsetting.Add(referenceSubsettingDto); + break; + case SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.ReferenceUsage referenceUsageDto: + payload.ReferenceUsage.Add(referenceUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.RenderingDefinition renderingDefinitionDto: + payload.RenderingDefinition.Add(renderingDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.RenderingUsage renderingUsageDto: + payload.RenderingUsage.Add(renderingUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.RequirementConstraintMembership requirementConstraintMembershipDto: + payload.RequirementConstraintMembership.Add(requirementConstraintMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.RequirementDefinition requirementDefinitionDto: + payload.RequirementDefinition.Add(requirementDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.RequirementUsage requirementUsageDto: + payload.RequirementUsage.Add(requirementUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.VerificationCases.RequirementVerificationMembership requirementVerificationMembershipDto: + payload.RequirementVerificationMembership.Add(requirementVerificationMembershipDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.ResultExpressionMembership resultExpressionMembershipDto: + payload.ResultExpressionMembership.Add(resultExpressionMembershipDto); + break; + case SysML2.NET.Core.DTO.Kernel.Functions.ReturnParameterMembership returnParameterMembershipDto: + payload.ReturnParameterMembership.Add(returnParameterMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.SatisfyRequirementUsage satisfyRequirementUsageDto: + payload.SatisfyRequirementUsage.Add(satisfyRequirementUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Expressions.SelectExpression selectExpressionDto: + payload.SelectExpression.Add(selectExpressionDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.SendActionUsage sendActionUsageDto: + payload.SendActionUsage.Add(sendActionUsageDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Specialization specializationDto: + payload.Specialization.Add(specializationDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.StakeholderMembership stakeholderMembershipDto: + payload.StakeholderMembership.Add(stakeholderMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.States.StateDefinition stateDefinitionDto: + payload.StateDefinition.Add(stateDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.States.StateSubactionMembership stateSubactionMembershipDto: + payload.StateSubactionMembership.Add(stateSubactionMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.States.StateUsage stateUsageDto: + payload.StateUsage.Add(stateUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Behaviors.Step stepDto: + payload.Step.Add(stepDto); + break; + case SysML2.NET.Core.DTO.Kernel.Structures.Structure structureDto: + payload.Structure.Add(structureDto); + break; + case SysML2.NET.Core.DTO.Core.Classifiers.Subclassification subclassificationDto: + payload.Subclassification.Add(subclassificationDto); + break; + case SysML2.NET.Core.DTO.Systems.Requirements.SubjectMembership subjectMembershipDto: + payload.SubjectMembership.Add(subjectMembershipDto); + break; + case SysML2.NET.Core.DTO.Core.Features.Subsetting subsettingDto: + payload.Subsetting.Add(subsettingDto); + break; + case SysML2.NET.Core.DTO.Kernel.Connectors.Succession successionDto: + payload.Succession.Add(successionDto); + break; + case SysML2.NET.Core.DTO.Systems.Connections.SuccessionAsUsage successionAsUsageDto: + payload.SuccessionAsUsage.Add(successionAsUsageDto); + break; + case SysML2.NET.Core.DTO.Kernel.Interactions.SuccessionFlow successionFlowDto: + payload.SuccessionFlow.Add(successionFlowDto); + break; + case SysML2.NET.Core.DTO.Systems.Flows.SuccessionFlowUsage successionFlowUsageDto: + payload.SuccessionFlowUsage.Add(successionFlowUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.TerminateActionUsage terminateActionUsageDto: + payload.TerminateActionUsage.Add(terminateActionUsageDto); + break; + case SysML2.NET.Core.DTO.Root.Annotations.TextualRepresentation textualRepresentationDto: + payload.TextualRepresentation.Add(textualRepresentationDto); + break; + case SysML2.NET.Core.DTO.Systems.States.TransitionFeatureMembership transitionFeatureMembershipDto: + payload.TransitionFeatureMembership.Add(transitionFeatureMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.States.TransitionUsage transitionUsageDto: + payload.TransitionUsage.Add(transitionUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.TriggerInvocationExpression triggerInvocationExpressionDto: + payload.TriggerInvocationExpression.Add(triggerInvocationExpressionDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Type typeDto: + payload.Type.Add(typeDto); + break; + case SysML2.NET.Core.DTO.Core.Features.TypeFeaturing typeFeaturingDto: + payload.TypeFeaturing.Add(typeFeaturingDto); + break; + case SysML2.NET.Core.DTO.Core.Types.Unioning unioningDto: + payload.Unioning.Add(unioningDto); + break; + case SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Usage usageDto: + payload.Usage.Add(usageDto); + break; + case SysML2.NET.Core.DTO.Systems.UseCases.UseCaseDefinition useCaseDefinitionDto: + payload.UseCaseDefinition.Add(useCaseDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.UseCases.UseCaseUsage useCaseUsageDto: + payload.UseCaseUsage.Add(useCaseUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.VariantMembership variantMembershipDto: + payload.VariantMembership.Add(variantMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseDefinition verificationCaseDefinitionDto: + payload.VerificationCaseDefinition.Add(verificationCaseDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.VerificationCases.VerificationCaseUsage verificationCaseUsageDto: + payload.VerificationCaseUsage.Add(verificationCaseUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.ViewDefinition viewDefinitionDto: + payload.ViewDefinition.Add(viewDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.ViewpointDefinition viewpointDefinitionDto: + payload.ViewpointDefinition.Add(viewpointDefinitionDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.ViewpointUsage viewpointUsageDto: + payload.ViewpointUsage.Add(viewpointUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.ViewRenderingMembership viewRenderingMembershipDto: + payload.ViewRenderingMembership.Add(viewRenderingMembershipDto); + break; + case SysML2.NET.Core.DTO.Systems.Views.ViewUsage viewUsageDto: + payload.ViewUsage.Add(viewUsageDto); + break; + case SysML2.NET.Core.DTO.Systems.Actions.WhileLoopActionUsage whileLoopActionUsageDto: + payload.WhileLoopActionUsage.Add(whileLoopActionUsageDto); + break; + } + } + + return payload; + } + + /// + /// Creates an from the provided . + /// + /// + /// The that carries the s. + /// + /// + /// an . + /// + internal static IEnumerable ToDataItems(this Payload payload) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload)); + } + + var capacity = 0 + + payload.AcceptActionUsage.Count + + payload.ActionDefinition.Count + + payload.ActionUsage.Count + + payload.ActorMembership.Count + + payload.AllocationDefinition.Count + + payload.AllocationUsage.Count + + payload.AnalysisCaseDefinition.Count + + payload.AnalysisCaseUsage.Count + + payload.AnnotatingElement.Count + + payload.Annotation.Count + + payload.AssertConstraintUsage.Count + + payload.AssignmentActionUsage.Count + + payload.Association.Count + + payload.AssociationStructure.Count + + payload.AttributeDefinition.Count + + payload.AttributeUsage.Count + + payload.Behavior.Count + + payload.BindingConnector.Count + + payload.BindingConnectorAsUsage.Count + + payload.BooleanExpression.Count + + payload.CalculationDefinition.Count + + payload.CalculationUsage.Count + + payload.CaseDefinition.Count + + payload.CaseUsage.Count + + payload.Class.Count + + payload.Classifier.Count + + payload.CollectExpression.Count + + payload.Comment.Count + + payload.ConcernDefinition.Count + + payload.ConcernUsage.Count + + payload.ConjugatedPortDefinition.Count + + payload.ConjugatedPortTyping.Count + + payload.Conjugation.Count + + payload.ConnectionDefinition.Count + + payload.ConnectionUsage.Count + + payload.Connector.Count + + payload.ConstraintDefinition.Count + + payload.ConstraintUsage.Count + + payload.ConstructorExpression.Count + + payload.CrossSubsetting.Count + + payload.DataType.Count + + payload.DecisionNode.Count + + payload.Definition.Count + + payload.Dependency.Count + + payload.Differencing.Count + + payload.Disjoining.Count + + payload.Documentation.Count + + payload.ElementFilterMembership.Count + + payload.EndFeatureMembership.Count + + payload.EnumerationDefinition.Count + + payload.EnumerationUsage.Count + + payload.EventOccurrenceUsage.Count + + payload.ExhibitStateUsage.Count + + payload.Expression.Count + + payload.Feature.Count + + payload.FeatureChainExpression.Count + + payload.FeatureChaining.Count + + payload.FeatureInverting.Count + + payload.FeatureMembership.Count + + payload.FeatureReferenceExpression.Count + + payload.FeatureTyping.Count + + payload.FeatureValue.Count + + payload.Flow.Count + + payload.FlowDefinition.Count + + payload.FlowEnd.Count + + payload.FlowUsage.Count + + payload.ForkNode.Count + + payload.ForLoopActionUsage.Count + + payload.FramedConcernMembership.Count + + payload.Function.Count + + payload.IfActionUsage.Count + + payload.IncludeUseCaseUsage.Count + + payload.IndexExpression.Count + + payload.Interaction.Count + + payload.InterfaceDefinition.Count + + payload.InterfaceUsage.Count + + payload.Intersecting.Count + + payload.Invariant.Count + + payload.InvocationExpression.Count + + payload.ItemDefinition.Count + + payload.ItemUsage.Count + + payload.JoinNode.Count + + payload.LibraryPackage.Count + + payload.LiteralBoolean.Count + + payload.LiteralExpression.Count + + payload.LiteralInfinity.Count + + payload.LiteralInteger.Count + + payload.LiteralRational.Count + + payload.LiteralString.Count + + payload.Membership.Count + + payload.MembershipExpose.Count + + payload.MembershipImport.Count + + payload.MergeNode.Count + + payload.Metaclass.Count + + payload.MetadataAccessExpression.Count + + payload.MetadataDefinition.Count + + payload.MetadataFeature.Count + + payload.MetadataUsage.Count + + payload.Multiplicity.Count + + payload.MultiplicityRange.Count + + payload.Namespace.Count + + payload.NamespaceExpose.Count + + payload.NamespaceImport.Count + + payload.NullExpression.Count + + payload.ObjectiveMembership.Count + + payload.OccurrenceDefinition.Count + + payload.OccurrenceUsage.Count + + payload.OperatorExpression.Count + + payload.OwningMembership.Count + + payload.Package.Count + + payload.ParameterMembership.Count + + payload.PartDefinition.Count + + payload.PartUsage.Count + + payload.PayloadFeature.Count + + payload.PerformActionUsage.Count + + payload.PortConjugation.Count + + payload.PortDefinition.Count + + payload.PortUsage.Count + + payload.Predicate.Count + + payload.Redefinition.Count + + payload.ReferenceSubsetting.Count + + payload.ReferenceUsage.Count + + payload.RenderingDefinition.Count + + payload.RenderingUsage.Count + + payload.RequirementConstraintMembership.Count + + payload.RequirementDefinition.Count + + payload.RequirementUsage.Count + + payload.RequirementVerificationMembership.Count + + payload.ResultExpressionMembership.Count + + payload.ReturnParameterMembership.Count + + payload.SatisfyRequirementUsage.Count + + payload.SelectExpression.Count + + payload.SendActionUsage.Count + + payload.Specialization.Count + + payload.StakeholderMembership.Count + + payload.StateDefinition.Count + + payload.StateSubactionMembership.Count + + payload.StateUsage.Count + + payload.Step.Count + + payload.Structure.Count + + payload.Subclassification.Count + + payload.SubjectMembership.Count + + payload.Subsetting.Count + + payload.Succession.Count + + payload.SuccessionAsUsage.Count + + payload.SuccessionFlow.Count + + payload.SuccessionFlowUsage.Count + + payload.TerminateActionUsage.Count + + payload.TextualRepresentation.Count + + payload.TransitionFeatureMembership.Count + + payload.TransitionUsage.Count + + payload.TriggerInvocationExpression.Count + + payload.Type.Count + + payload.TypeFeaturing.Count + + payload.Unioning.Count + + payload.Usage.Count + + payload.UseCaseDefinition.Count + + payload.UseCaseUsage.Count + + payload.VariantMembership.Count + + payload.VerificationCaseDefinition.Count + + payload.VerificationCaseUsage.Count + + payload.ViewDefinition.Count + + payload.ViewpointDefinition.Count + + payload.ViewpointUsage.Count + + payload.ViewRenderingMembership.Count + + payload.ViewUsage.Count + + payload.WhileLoopActionUsage.Count + ; + + var result = new List(capacity); + + AddRange(result, payload.AcceptActionUsage); + AddRange(result, payload.ActionDefinition); + AddRange(result, payload.ActionUsage); + AddRange(result, payload.ActorMembership); + AddRange(result, payload.AllocationDefinition); + AddRange(result, payload.AllocationUsage); + AddRange(result, payload.AnalysisCaseDefinition); + AddRange(result, payload.AnalysisCaseUsage); + AddRange(result, payload.AnnotatingElement); + AddRange(result, payload.Annotation); + AddRange(result, payload.AssertConstraintUsage); + AddRange(result, payload.AssignmentActionUsage); + AddRange(result, payload.Association); + AddRange(result, payload.AssociationStructure); + AddRange(result, payload.AttributeDefinition); + AddRange(result, payload.AttributeUsage); + AddRange(result, payload.Behavior); + AddRange(result, payload.BindingConnector); + AddRange(result, payload.BindingConnectorAsUsage); + AddRange(result, payload.BooleanExpression); + AddRange(result, payload.CalculationDefinition); + AddRange(result, payload.CalculationUsage); + AddRange(result, payload.CaseDefinition); + AddRange(result, payload.CaseUsage); + AddRange(result, payload.Class); + AddRange(result, payload.Classifier); + AddRange(result, payload.CollectExpression); + AddRange(result, payload.Comment); + AddRange(result, payload.ConcernDefinition); + AddRange(result, payload.ConcernUsage); + AddRange(result, payload.ConjugatedPortDefinition); + AddRange(result, payload.ConjugatedPortTyping); + AddRange(result, payload.Conjugation); + AddRange(result, payload.ConnectionDefinition); + AddRange(result, payload.ConnectionUsage); + AddRange(result, payload.Connector); + AddRange(result, payload.ConstraintDefinition); + AddRange(result, payload.ConstraintUsage); + AddRange(result, payload.ConstructorExpression); + AddRange(result, payload.CrossSubsetting); + AddRange(result, payload.DataType); + AddRange(result, payload.DecisionNode); + AddRange(result, payload.Definition); + AddRange(result, payload.Dependency); + AddRange(result, payload.Differencing); + AddRange(result, payload.Disjoining); + AddRange(result, payload.Documentation); + AddRange(result, payload.ElementFilterMembership); + AddRange(result, payload.EndFeatureMembership); + AddRange(result, payload.EnumerationDefinition); + AddRange(result, payload.EnumerationUsage); + AddRange(result, payload.EventOccurrenceUsage); + AddRange(result, payload.ExhibitStateUsage); + AddRange(result, payload.Expression); + AddRange(result, payload.Feature); + AddRange(result, payload.FeatureChainExpression); + AddRange(result, payload.FeatureChaining); + AddRange(result, payload.FeatureInverting); + AddRange(result, payload.FeatureMembership); + AddRange(result, payload.FeatureReferenceExpression); + AddRange(result, payload.FeatureTyping); + AddRange(result, payload.FeatureValue); + AddRange(result, payload.Flow); + AddRange(result, payload.FlowDefinition); + AddRange(result, payload.FlowEnd); + AddRange(result, payload.FlowUsage); + AddRange(result, payload.ForkNode); + AddRange(result, payload.ForLoopActionUsage); + AddRange(result, payload.FramedConcernMembership); + AddRange(result, payload.Function); + AddRange(result, payload.IfActionUsage); + AddRange(result, payload.IncludeUseCaseUsage); + AddRange(result, payload.IndexExpression); + AddRange(result, payload.Interaction); + AddRange(result, payload.InterfaceDefinition); + AddRange(result, payload.InterfaceUsage); + AddRange(result, payload.Intersecting); + AddRange(result, payload.Invariant); + AddRange(result, payload.InvocationExpression); + AddRange(result, payload.ItemDefinition); + AddRange(result, payload.ItemUsage); + AddRange(result, payload.JoinNode); + AddRange(result, payload.LibraryPackage); + AddRange(result, payload.LiteralBoolean); + AddRange(result, payload.LiteralExpression); + AddRange(result, payload.LiteralInfinity); + AddRange(result, payload.LiteralInteger); + AddRange(result, payload.LiteralRational); + AddRange(result, payload.LiteralString); + AddRange(result, payload.Membership); + AddRange(result, payload.MembershipExpose); + AddRange(result, payload.MembershipImport); + AddRange(result, payload.MergeNode); + AddRange(result, payload.Metaclass); + AddRange(result, payload.MetadataAccessExpression); + AddRange(result, payload.MetadataDefinition); + AddRange(result, payload.MetadataFeature); + AddRange(result, payload.MetadataUsage); + AddRange(result, payload.Multiplicity); + AddRange(result, payload.MultiplicityRange); + AddRange(result, payload.Namespace); + AddRange(result, payload.NamespaceExpose); + AddRange(result, payload.NamespaceImport); + AddRange(result, payload.NullExpression); + AddRange(result, payload.ObjectiveMembership); + AddRange(result, payload.OccurrenceDefinition); + AddRange(result, payload.OccurrenceUsage); + AddRange(result, payload.OperatorExpression); + AddRange(result, payload.OwningMembership); + AddRange(result, payload.Package); + AddRange(result, payload.ParameterMembership); + AddRange(result, payload.PartDefinition); + AddRange(result, payload.PartUsage); + AddRange(result, payload.PayloadFeature); + AddRange(result, payload.PerformActionUsage); + AddRange(result, payload.PortConjugation); + AddRange(result, payload.PortDefinition); + AddRange(result, payload.PortUsage); + AddRange(result, payload.Predicate); + AddRange(result, payload.Redefinition); + AddRange(result, payload.ReferenceSubsetting); + AddRange(result, payload.ReferenceUsage); + AddRange(result, payload.RenderingDefinition); + AddRange(result, payload.RenderingUsage); + AddRange(result, payload.RequirementConstraintMembership); + AddRange(result, payload.RequirementDefinition); + AddRange(result, payload.RequirementUsage); + AddRange(result, payload.RequirementVerificationMembership); + AddRange(result, payload.ResultExpressionMembership); + AddRange(result, payload.ReturnParameterMembership); + AddRange(result, payload.SatisfyRequirementUsage); + AddRange(result, payload.SelectExpression); + AddRange(result, payload.SendActionUsage); + AddRange(result, payload.Specialization); + AddRange(result, payload.StakeholderMembership); + AddRange(result, payload.StateDefinition); + AddRange(result, payload.StateSubactionMembership); + AddRange(result, payload.StateUsage); + AddRange(result, payload.Step); + AddRange(result, payload.Structure); + AddRange(result, payload.Subclassification); + AddRange(result, payload.SubjectMembership); + AddRange(result, payload.Subsetting); + AddRange(result, payload.Succession); + AddRange(result, payload.SuccessionAsUsage); + AddRange(result, payload.SuccessionFlow); + AddRange(result, payload.SuccessionFlowUsage); + AddRange(result, payload.TerminateActionUsage); + AddRange(result, payload.TextualRepresentation); + AddRange(result, payload.TransitionFeatureMembership); + AddRange(result, payload.TransitionUsage); + AddRange(result, payload.TriggerInvocationExpression); + AddRange(result, payload.Type); + AddRange(result, payload.TypeFeaturing); + AddRange(result, payload.Unioning); + AddRange(result, payload.Usage); + AddRange(result, payload.UseCaseDefinition); + AddRange(result, payload.UseCaseUsage); + AddRange(result, payload.VariantMembership); + AddRange(result, payload.VerificationCaseDefinition); + AddRange(result, payload.VerificationCaseUsage); + AddRange(result, payload.ViewDefinition); + AddRange(result, payload.ViewpointDefinition); + AddRange(result, payload.ViewpointUsage); + AddRange(result, payload.ViewRenderingMembership); + AddRange(result, payload.ViewUsage); + AddRange(result, payload.WhileLoopActionUsage); + + return result; + } + + /// + /// Adds all elements from the specified source list to the target list + /// without incurring additional allocations or intermediate collections. + /// + /// + /// The concrete data type of the elements being added. The type must + /// implement . + /// + /// + /// The destination list that receives the elements. + /// + /// + /// The source list whose elements are appended to the list. + /// + /// + /// This method is intentionally implemented using a foreach loop over + /// rather than calling + /// in order to: + /// + /// + /// Avoid unnecessary interface-based enumeration when aggregating heterogeneous + /// collections into a . + /// + /// + /// Benefit from the struct-based enumerator used by , + /// which minimizes overhead in tight loops. + /// + /// + /// Centralize the constraint and casting logic in a single, + /// well-defined location. + /// + /// + /// This method is intended for high-throughput aggregation of DTO payloads + /// where predictable performance and minimal allocations are required. + /// + private static void AddRange(List target, List source) where T : IData + { + foreach (var item in source) + { + target.Add(item); + } + } + + /// + /// Ensures that the specified list has sufficient capacity to hold all + /// elements of the given runtime type without triggering internal resizing. + /// + /// + /// The element type of the . + /// + /// + /// The list whose is adjusted, if required. + /// + /// + /// A lookup table mapping concrete runtime types to the number of elements + /// of that type present in the source collection. + /// + /// + /// The concrete runtime corresponding to the elements + /// stored in the . + /// + /// + /// This method is used during payload construction to pre-size collections + /// based on a prior counting pass. Pre-sizing avoids repeated internal + /// reallocations and array copying that would otherwise occur when elements + /// are added incrementally. + /// + /// The capacity is only increased when the required size exceeds the current + /// capacity; existing capacity is never reduced. + /// + private static void SetCapacity(List list, Dictionary counts, Type key) + { + if (counts.TryGetValue(key, out var required) && required > list.Capacity) + { + list.Capacity = required; + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs new file mode 100644 index 00000000..8f78ea81 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/AutoGenMessagePackPayload/PayloadMessagePackFormatter.cs @@ -0,0 +1,2960 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +/* -------------------------------------------------------------------------- | + | index | property name | + | -------------------------------------------------------------------------- | + | -------------------------------------------------------------------------- | + | 0 | Created | + | -------------------------------------------------------------------------- | + | 1 | Systems.Actions.AcceptActionUsage + | -------------------------------------------------------------------------- | + | 2 | Systems.Actions.ActionDefinition + | -------------------------------------------------------------------------- | + | 3 | Systems.Actions.ActionUsage + | -------------------------------------------------------------------------- | + | 4 | Systems.Requirements.ActorMembership + | -------------------------------------------------------------------------- | + | 5 | Systems.Allocations.AllocationDefinition + | -------------------------------------------------------------------------- | + | 6 | Systems.Allocations.AllocationUsage + | -------------------------------------------------------------------------- | + | 7 | Systems.AnalysisCases.AnalysisCaseDefinition + | -------------------------------------------------------------------------- | + | 8 | Systems.AnalysisCases.AnalysisCaseUsage + | -------------------------------------------------------------------------- | + | 9 | Root.Annotations.AnnotatingElement + | -------------------------------------------------------------------------- | + | 10 | Root.Annotations.Annotation + | -------------------------------------------------------------------------- | + | 11 | Systems.Constraints.AssertConstraintUsage + | -------------------------------------------------------------------------- | + | 12 | Systems.Actions.AssignmentActionUsage + | -------------------------------------------------------------------------- | + | 13 | Kernel.Associations.Association + | -------------------------------------------------------------------------- | + | 14 | Kernel.Associations.AssociationStructure + | -------------------------------------------------------------------------- | + | 15 | Systems.Attributes.AttributeDefinition + | -------------------------------------------------------------------------- | + | 16 | Systems.Attributes.AttributeUsage + | -------------------------------------------------------------------------- | + | 17 | Kernel.Behaviors.Behavior + | -------------------------------------------------------------------------- | + | 18 | Kernel.Connectors.BindingConnector + | -------------------------------------------------------------------------- | + | 19 | Systems.Connections.BindingConnectorAsUsage + | -------------------------------------------------------------------------- | + | 20 | Kernel.Functions.BooleanExpression + | -------------------------------------------------------------------------- | + | 21 | Systems.Calculations.CalculationDefinition + | -------------------------------------------------------------------------- | + | 22 | Systems.Calculations.CalculationUsage + | -------------------------------------------------------------------------- | + | 23 | Systems.Cases.CaseDefinition + | -------------------------------------------------------------------------- | + | 24 | Systems.Cases.CaseUsage + | -------------------------------------------------------------------------- | + | 25 | Kernel.Classes.Class + | -------------------------------------------------------------------------- | + | 26 | Core.Classifiers.Classifier + | -------------------------------------------------------------------------- | + | 27 | Kernel.Expressions.CollectExpression + | -------------------------------------------------------------------------- | + | 28 | Root.Annotations.Comment + | -------------------------------------------------------------------------- | + | 29 | Systems.Requirements.ConcernDefinition + | -------------------------------------------------------------------------- | + | 30 | Systems.Requirements.ConcernUsage + | -------------------------------------------------------------------------- | + | 31 | Systems.Ports.ConjugatedPortDefinition + | -------------------------------------------------------------------------- | + | 32 | Systems.Ports.ConjugatedPortTyping + | -------------------------------------------------------------------------- | + | 33 | Core.Types.Conjugation + | -------------------------------------------------------------------------- | + | 34 | Systems.Connections.ConnectionDefinition + | -------------------------------------------------------------------------- | + | 35 | Systems.Connections.ConnectionUsage + | -------------------------------------------------------------------------- | + | 36 | Kernel.Connectors.Connector + | -------------------------------------------------------------------------- | + | 37 | Systems.Constraints.ConstraintDefinition + | -------------------------------------------------------------------------- | + | 38 | Systems.Constraints.ConstraintUsage + | -------------------------------------------------------------------------- | + | 39 | Kernel.Expressions.ConstructorExpression + | -------------------------------------------------------------------------- | + | 40 | Core.Features.CrossSubsetting + | -------------------------------------------------------------------------- | + | 41 | Kernel.DataTypes.DataType + | -------------------------------------------------------------------------- | + | 42 | Systems.Actions.DecisionNode + | -------------------------------------------------------------------------- | + | 43 | Systems.DefinitionAndUsage.Definition + | -------------------------------------------------------------------------- | + | 44 | Root.Dependencies.Dependency + | -------------------------------------------------------------------------- | + | 45 | Core.Types.Differencing + | -------------------------------------------------------------------------- | + | 46 | Core.Types.Disjoining + | -------------------------------------------------------------------------- | + | 47 | Root.Annotations.Documentation + | -------------------------------------------------------------------------- | + | 48 | Kernel.Packages.ElementFilterMembership + | -------------------------------------------------------------------------- | + | 49 | Core.Features.EndFeatureMembership + | -------------------------------------------------------------------------- | + | 50 | Systems.Enumerations.EnumerationDefinition + | -------------------------------------------------------------------------- | + | 51 | Systems.Enumerations.EnumerationUsage + | -------------------------------------------------------------------------- | + | 52 | Systems.Occurrences.EventOccurrenceUsage + | -------------------------------------------------------------------------- | + | 53 | Systems.States.ExhibitStateUsage + | -------------------------------------------------------------------------- | + | 54 | Kernel.Functions.Expression + | -------------------------------------------------------------------------- | + | 55 | Core.Features.Feature + | -------------------------------------------------------------------------- | + | 56 | Kernel.Expressions.FeatureChainExpression + | -------------------------------------------------------------------------- | + | 57 | Core.Features.FeatureChaining + | -------------------------------------------------------------------------- | + | 58 | Core.Features.FeatureInverting + | -------------------------------------------------------------------------- | + | 59 | Core.Types.FeatureMembership + | -------------------------------------------------------------------------- | + | 60 | Kernel.Expressions.FeatureReferenceExpression + | -------------------------------------------------------------------------- | + | 61 | Core.Features.FeatureTyping + | -------------------------------------------------------------------------- | + | 62 | Kernel.FeatureValues.FeatureValue + | -------------------------------------------------------------------------- | + | 63 | Kernel.Interactions.Flow + | -------------------------------------------------------------------------- | + | 64 | Systems.Flows.FlowDefinition + | -------------------------------------------------------------------------- | + | 65 | Kernel.Interactions.FlowEnd + | -------------------------------------------------------------------------- | + | 66 | Systems.Flows.FlowUsage + | -------------------------------------------------------------------------- | + | 67 | Systems.Actions.ForkNode + | -------------------------------------------------------------------------- | + | 68 | Systems.Actions.ForLoopActionUsage + | -------------------------------------------------------------------------- | + | 69 | Systems.Requirements.FramedConcernMembership + | -------------------------------------------------------------------------- | + | 70 | Kernel.Functions.Function + | -------------------------------------------------------------------------- | + | 71 | Systems.Actions.IfActionUsage + | -------------------------------------------------------------------------- | + | 72 | Systems.UseCases.IncludeUseCaseUsage + | -------------------------------------------------------------------------- | + | 73 | Kernel.Expressions.IndexExpression + | -------------------------------------------------------------------------- | + | 74 | Kernel.Interactions.Interaction + | -------------------------------------------------------------------------- | + | 75 | Systems.Interfaces.InterfaceDefinition + | -------------------------------------------------------------------------- | + | 76 | Systems.Interfaces.InterfaceUsage + | -------------------------------------------------------------------------- | + | 77 | Core.Types.Intersecting + | -------------------------------------------------------------------------- | + | 78 | Kernel.Functions.Invariant + | -------------------------------------------------------------------------- | + | 79 | Kernel.Expressions.InvocationExpression + | -------------------------------------------------------------------------- | + | 80 | Systems.Items.ItemDefinition + | -------------------------------------------------------------------------- | + | 81 | Systems.Items.ItemUsage + | -------------------------------------------------------------------------- | + | 82 | Systems.Actions.JoinNode + | -------------------------------------------------------------------------- | + | 83 | Kernel.Packages.LibraryPackage + | -------------------------------------------------------------------------- | + | 84 | Kernel.Expressions.LiteralBoolean + | -------------------------------------------------------------------------- | + | 85 | Kernel.Expressions.LiteralExpression + | -------------------------------------------------------------------------- | + | 86 | Kernel.Expressions.LiteralInfinity + | -------------------------------------------------------------------------- | + | 87 | Kernel.Expressions.LiteralInteger + | -------------------------------------------------------------------------- | + | 88 | Kernel.Expressions.LiteralRational + | -------------------------------------------------------------------------- | + | 89 | Kernel.Expressions.LiteralString + | -------------------------------------------------------------------------- | + | 90 | Root.Namespaces.Membership + | -------------------------------------------------------------------------- | + | 91 | Systems.Views.MembershipExpose + | -------------------------------------------------------------------------- | + | 92 | Root.Namespaces.MembershipImport + | -------------------------------------------------------------------------- | + | 93 | Systems.Actions.MergeNode + | -------------------------------------------------------------------------- | + | 94 | Kernel.Metadata.Metaclass + | -------------------------------------------------------------------------- | + | 95 | Kernel.Expressions.MetadataAccessExpression + | -------------------------------------------------------------------------- | + | 96 | Systems.Metadata.MetadataDefinition + | -------------------------------------------------------------------------- | + | 97 | Kernel.Metadata.MetadataFeature + | -------------------------------------------------------------------------- | + | 98 | Systems.Metadata.MetadataUsage + | -------------------------------------------------------------------------- | + | 99 | Core.Types.Multiplicity + | -------------------------------------------------------------------------- | + | 100 | Kernel.Multiplicities.MultiplicityRange + | -------------------------------------------------------------------------- | + | 101 | Root.Namespaces.Namespace + | -------------------------------------------------------------------------- | + | 102 | Systems.Views.NamespaceExpose + | -------------------------------------------------------------------------- | + | 103 | Root.Namespaces.NamespaceImport + | -------------------------------------------------------------------------- | + | 104 | Kernel.Expressions.NullExpression + | -------------------------------------------------------------------------- | + | 105 | Systems.Cases.ObjectiveMembership + | -------------------------------------------------------------------------- | + | 106 | Systems.Occurrences.OccurrenceDefinition + | -------------------------------------------------------------------------- | + | 107 | Systems.Occurrences.OccurrenceUsage + | -------------------------------------------------------------------------- | + | 108 | Kernel.Expressions.OperatorExpression + | -------------------------------------------------------------------------- | + | 109 | Root.Namespaces.OwningMembership + | -------------------------------------------------------------------------- | + | 110 | Kernel.Packages.Package + | -------------------------------------------------------------------------- | + | 111 | Kernel.Behaviors.ParameterMembership + | -------------------------------------------------------------------------- | + | 112 | Systems.Parts.PartDefinition + | -------------------------------------------------------------------------- | + | 113 | Systems.Parts.PartUsage + | -------------------------------------------------------------------------- | + | 114 | Kernel.Interactions.PayloadFeature + | -------------------------------------------------------------------------- | + | 115 | Systems.Actions.PerformActionUsage + | -------------------------------------------------------------------------- | + | 116 | Systems.Ports.PortConjugation + | -------------------------------------------------------------------------- | + | 117 | Systems.Ports.PortDefinition + | -------------------------------------------------------------------------- | + | 118 | Systems.Ports.PortUsage + | -------------------------------------------------------------------------- | + | 119 | Kernel.Functions.Predicate + | -------------------------------------------------------------------------- | + | 120 | Core.Features.Redefinition + | -------------------------------------------------------------------------- | + | 121 | Core.Features.ReferenceSubsetting + | -------------------------------------------------------------------------- | + | 122 | Systems.DefinitionAndUsage.ReferenceUsage + | -------------------------------------------------------------------------- | + | 123 | Systems.Views.RenderingDefinition + | -------------------------------------------------------------------------- | + | 124 | Systems.Views.RenderingUsage + | -------------------------------------------------------------------------- | + | 125 | Systems.Requirements.RequirementConstraintMembership + | -------------------------------------------------------------------------- | + | 126 | Systems.Requirements.RequirementDefinition + | -------------------------------------------------------------------------- | + | 127 | Systems.Requirements.RequirementUsage + | -------------------------------------------------------------------------- | + | 128 | Systems.VerificationCases.RequirementVerificationMembership + | -------------------------------------------------------------------------- | + | 129 | Kernel.Functions.ResultExpressionMembership + | -------------------------------------------------------------------------- | + | 130 | Kernel.Functions.ReturnParameterMembership + | -------------------------------------------------------------------------- | + | 131 | Systems.Requirements.SatisfyRequirementUsage + | -------------------------------------------------------------------------- | + | 132 | Kernel.Expressions.SelectExpression + | -------------------------------------------------------------------------- | + | 133 | Systems.Actions.SendActionUsage + | -------------------------------------------------------------------------- | + | 134 | Core.Types.Specialization + | -------------------------------------------------------------------------- | + | 135 | Systems.Requirements.StakeholderMembership + | -------------------------------------------------------------------------- | + | 136 | Systems.States.StateDefinition + | -------------------------------------------------------------------------- | + | 137 | Systems.States.StateSubactionMembership + | -------------------------------------------------------------------------- | + | 138 | Systems.States.StateUsage + | -------------------------------------------------------------------------- | + | 139 | Kernel.Behaviors.Step + | -------------------------------------------------------------------------- | + | 140 | Kernel.Structures.Structure + | -------------------------------------------------------------------------- | + | 141 | Core.Classifiers.Subclassification + | -------------------------------------------------------------------------- | + | 142 | Systems.Requirements.SubjectMembership + | -------------------------------------------------------------------------- | + | 143 | Core.Features.Subsetting + | -------------------------------------------------------------------------- | + | 144 | Kernel.Connectors.Succession + | -------------------------------------------------------------------------- | + | 145 | Systems.Connections.SuccessionAsUsage + | -------------------------------------------------------------------------- | + | 146 | Kernel.Interactions.SuccessionFlow + | -------------------------------------------------------------------------- | + | 147 | Systems.Flows.SuccessionFlowUsage + | -------------------------------------------------------------------------- | + | 148 | Systems.Actions.TerminateActionUsage + | -------------------------------------------------------------------------- | + | 149 | Root.Annotations.TextualRepresentation + | -------------------------------------------------------------------------- | + | 150 | Systems.States.TransitionFeatureMembership + | -------------------------------------------------------------------------- | + | 151 | Systems.States.TransitionUsage + | -------------------------------------------------------------------------- | + | 152 | Systems.Actions.TriggerInvocationExpression + | -------------------------------------------------------------------------- | + | 153 | Core.Types.Type + | -------------------------------------------------------------------------- | + | 154 | Core.Features.TypeFeaturing + | -------------------------------------------------------------------------- | + | 155 | Core.Types.Unioning + | -------------------------------------------------------------------------- | + | 156 | Systems.DefinitionAndUsage.Usage + | -------------------------------------------------------------------------- | + | 157 | Systems.UseCases.UseCaseDefinition + | -------------------------------------------------------------------------- | + | 158 | Systems.UseCases.UseCaseUsage + | -------------------------------------------------------------------------- | + | 159 | Systems.DefinitionAndUsage.VariantMembership + | -------------------------------------------------------------------------- | + | 160 | Systems.VerificationCases.VerificationCaseDefinition + | -------------------------------------------------------------------------- | + | 161 | Systems.VerificationCases.VerificationCaseUsage + | -------------------------------------------------------------------------- | + | 162 | Systems.Views.ViewDefinition + | -------------------------------------------------------------------------- | + | 163 | Systems.Views.ViewpointDefinition + | -------------------------------------------------------------------------- | + | 164 | Systems.Views.ViewpointUsage + | -------------------------------------------------------------------------- | + | 165 | Systems.Views.ViewRenderingMembership + | -------------------------------------------------------------------------- | + | 166 | Systems.Views.ViewUsage + | -------------------------------------------------------------------------- | + | 167 | Systems.Actions.WhileLoopActionUsage + | -------------------------------------------------------------------------- | + * -------------------------------------------------------------------------- | */ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + + using global::MessagePack; + using global::MessagePack.Formatters; + + /// + /// The purpose of the is to provide + /// the contract for serialization of the type + /// + internal class PayloadMessagePackFormatter : IMessagePackFormatter + { + /// + /// Serializes an . + /// + /// + /// The writer to use when serializing the . + /// + /// + /// The that is to be serialized. + /// + /// + /// The serialization settings to use. + /// + public void Serialize(ref MessagePackWriter writer, Payload payload, MessagePackSerializerOptions options) + { + if (payload == null) + { + throw new ArgumentNullException(nameof(payload), "The Payload may not be null"); + } + + var formatterResolver = options.Resolver; + + writer.WriteArrayHeader(167); + + writer.Write(payload.Created); + + writer.WriteArrayHeader(payload.AcceptActionUsage.Count); + foreach (var acceptActionUsageDto in payload.AcceptActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, acceptActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.ActionDefinition.Count); + foreach (var actionDefinitionDto in payload.ActionDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, actionDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ActionUsage.Count); + foreach (var actionUsageDto in payload.ActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, actionUsageDto, options); + } + + writer.WriteArrayHeader(payload.ActorMembership.Count); + foreach (var actorMembershipDto in payload.ActorMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, actorMembershipDto, options); + } + + writer.WriteArrayHeader(payload.AllocationDefinition.Count); + foreach (var allocationDefinitionDto in payload.AllocationDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, allocationDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.AllocationUsage.Count); + foreach (var allocationUsageDto in payload.AllocationUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, allocationUsageDto, options); + } + + writer.WriteArrayHeader(payload.AnalysisCaseDefinition.Count); + foreach (var analysisCaseDefinitionDto in payload.AnalysisCaseDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, analysisCaseDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.AnalysisCaseUsage.Count); + foreach (var analysisCaseUsageDto in payload.AnalysisCaseUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, analysisCaseUsageDto, options); + } + + writer.WriteArrayHeader(payload.AnnotatingElement.Count); + foreach (var annotatingElementDto in payload.AnnotatingElement) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, annotatingElementDto, options); + } + + writer.WriteArrayHeader(payload.Annotation.Count); + foreach (var annotationDto in payload.Annotation) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, annotationDto, options); + } + + writer.WriteArrayHeader(payload.AssertConstraintUsage.Count); + foreach (var assertConstraintUsageDto in payload.AssertConstraintUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, assertConstraintUsageDto, options); + } + + writer.WriteArrayHeader(payload.AssignmentActionUsage.Count); + foreach (var assignmentActionUsageDto in payload.AssignmentActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, assignmentActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.Association.Count); + foreach (var associationDto in payload.Association) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, associationDto, options); + } + + writer.WriteArrayHeader(payload.AssociationStructure.Count); + foreach (var associationStructureDto in payload.AssociationStructure) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, associationStructureDto, options); + } + + writer.WriteArrayHeader(payload.AttributeDefinition.Count); + foreach (var attributeDefinitionDto in payload.AttributeDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, attributeDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.AttributeUsage.Count); + foreach (var attributeUsageDto in payload.AttributeUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, attributeUsageDto, options); + } + + writer.WriteArrayHeader(payload.Behavior.Count); + foreach (var behaviorDto in payload.Behavior) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, behaviorDto, options); + } + + writer.WriteArrayHeader(payload.BindingConnector.Count); + foreach (var bindingConnectorDto in payload.BindingConnector) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, bindingConnectorDto, options); + } + + writer.WriteArrayHeader(payload.BindingConnectorAsUsage.Count); + foreach (var bindingConnectorAsUsageDto in payload.BindingConnectorAsUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, bindingConnectorAsUsageDto, options); + } + + writer.WriteArrayHeader(payload.BooleanExpression.Count); + foreach (var booleanExpressionDto in payload.BooleanExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, booleanExpressionDto, options); + } + + writer.WriteArrayHeader(payload.CalculationDefinition.Count); + foreach (var calculationDefinitionDto in payload.CalculationDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, calculationDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.CalculationUsage.Count); + foreach (var calculationUsageDto in payload.CalculationUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, calculationUsageDto, options); + } + + writer.WriteArrayHeader(payload.CaseDefinition.Count); + foreach (var caseDefinitionDto in payload.CaseDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, caseDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.CaseUsage.Count); + foreach (var caseUsageDto in payload.CaseUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, caseUsageDto, options); + } + + writer.WriteArrayHeader(payload.Class.Count); + foreach (var classDto in payload.Class) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, classDto, options); + } + + writer.WriteArrayHeader(payload.Classifier.Count); + foreach (var classifierDto in payload.Classifier) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, classifierDto, options); + } + + writer.WriteArrayHeader(payload.CollectExpression.Count); + foreach (var collectExpressionDto in payload.CollectExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, collectExpressionDto, options); + } + + writer.WriteArrayHeader(payload.Comment.Count); + foreach (var commentDto in payload.Comment) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, commentDto, options); + } + + writer.WriteArrayHeader(payload.ConcernDefinition.Count); + foreach (var concernDefinitionDto in payload.ConcernDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, concernDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ConcernUsage.Count); + foreach (var concernUsageDto in payload.ConcernUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, concernUsageDto, options); + } + + writer.WriteArrayHeader(payload.ConjugatedPortDefinition.Count); + foreach (var conjugatedPortDefinitionDto in payload.ConjugatedPortDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, conjugatedPortDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ConjugatedPortTyping.Count); + foreach (var conjugatedPortTypingDto in payload.ConjugatedPortTyping) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, conjugatedPortTypingDto, options); + } + + writer.WriteArrayHeader(payload.Conjugation.Count); + foreach (var conjugationDto in payload.Conjugation) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, conjugationDto, options); + } + + writer.WriteArrayHeader(payload.ConnectionDefinition.Count); + foreach (var connectionDefinitionDto in payload.ConnectionDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, connectionDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ConnectionUsage.Count); + foreach (var connectionUsageDto in payload.ConnectionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, connectionUsageDto, options); + } + + writer.WriteArrayHeader(payload.Connector.Count); + foreach (var connectorDto in payload.Connector) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, connectorDto, options); + } + + writer.WriteArrayHeader(payload.ConstraintDefinition.Count); + foreach (var constraintDefinitionDto in payload.ConstraintDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, constraintDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ConstraintUsage.Count); + foreach (var constraintUsageDto in payload.ConstraintUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, constraintUsageDto, options); + } + + writer.WriteArrayHeader(payload.ConstructorExpression.Count); + foreach (var constructorExpressionDto in payload.ConstructorExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, constructorExpressionDto, options); + } + + writer.WriteArrayHeader(payload.CrossSubsetting.Count); + foreach (var crossSubsettingDto in payload.CrossSubsetting) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, crossSubsettingDto, options); + } + + writer.WriteArrayHeader(payload.DataType.Count); + foreach (var dataTypeDto in payload.DataType) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, dataTypeDto, options); + } + + writer.WriteArrayHeader(payload.DecisionNode.Count); + foreach (var decisionNodeDto in payload.DecisionNode) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, decisionNodeDto, options); + } + + writer.WriteArrayHeader(payload.Definition.Count); + foreach (var definitionDto in payload.Definition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, definitionDto, options); + } + + writer.WriteArrayHeader(payload.Dependency.Count); + foreach (var dependencyDto in payload.Dependency) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, dependencyDto, options); + } + + writer.WriteArrayHeader(payload.Differencing.Count); + foreach (var differencingDto in payload.Differencing) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, differencingDto, options); + } + + writer.WriteArrayHeader(payload.Disjoining.Count); + foreach (var disjoiningDto in payload.Disjoining) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, disjoiningDto, options); + } + + writer.WriteArrayHeader(payload.Documentation.Count); + foreach (var documentationDto in payload.Documentation) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, documentationDto, options); + } + + writer.WriteArrayHeader(payload.ElementFilterMembership.Count); + foreach (var elementFilterMembershipDto in payload.ElementFilterMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, elementFilterMembershipDto, options); + } + + writer.WriteArrayHeader(payload.EndFeatureMembership.Count); + foreach (var endFeatureMembershipDto in payload.EndFeatureMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, endFeatureMembershipDto, options); + } + + writer.WriteArrayHeader(payload.EnumerationDefinition.Count); + foreach (var enumerationDefinitionDto in payload.EnumerationDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, enumerationDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.EnumerationUsage.Count); + foreach (var enumerationUsageDto in payload.EnumerationUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, enumerationUsageDto, options); + } + + writer.WriteArrayHeader(payload.EventOccurrenceUsage.Count); + foreach (var eventOccurrenceUsageDto in payload.EventOccurrenceUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, eventOccurrenceUsageDto, options); + } + + writer.WriteArrayHeader(payload.ExhibitStateUsage.Count); + foreach (var exhibitStateUsageDto in payload.ExhibitStateUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, exhibitStateUsageDto, options); + } + + writer.WriteArrayHeader(payload.Expression.Count); + foreach (var expressionDto in payload.Expression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, expressionDto, options); + } + + writer.WriteArrayHeader(payload.Feature.Count); + foreach (var featureDto in payload.Feature) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureDto, options); + } + + writer.WriteArrayHeader(payload.FeatureChainExpression.Count); + foreach (var featureChainExpressionDto in payload.FeatureChainExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureChainExpressionDto, options); + } + + writer.WriteArrayHeader(payload.FeatureChaining.Count); + foreach (var featureChainingDto in payload.FeatureChaining) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureChainingDto, options); + } + + writer.WriteArrayHeader(payload.FeatureInverting.Count); + foreach (var featureInvertingDto in payload.FeatureInverting) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureInvertingDto, options); + } + + writer.WriteArrayHeader(payload.FeatureMembership.Count); + foreach (var featureMembershipDto in payload.FeatureMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureMembershipDto, options); + } + + writer.WriteArrayHeader(payload.FeatureReferenceExpression.Count); + foreach (var featureReferenceExpressionDto in payload.FeatureReferenceExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureReferenceExpressionDto, options); + } + + writer.WriteArrayHeader(payload.FeatureTyping.Count); + foreach (var featureTypingDto in payload.FeatureTyping) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureTypingDto, options); + } + + writer.WriteArrayHeader(payload.FeatureValue.Count); + foreach (var featureValueDto in payload.FeatureValue) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, featureValueDto, options); + } + + writer.WriteArrayHeader(payload.Flow.Count); + foreach (var flowDto in payload.Flow) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, flowDto, options); + } + + writer.WriteArrayHeader(payload.FlowDefinition.Count); + foreach (var flowDefinitionDto in payload.FlowDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, flowDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.FlowEnd.Count); + foreach (var flowEndDto in payload.FlowEnd) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, flowEndDto, options); + } + + writer.WriteArrayHeader(payload.FlowUsage.Count); + foreach (var flowUsageDto in payload.FlowUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, flowUsageDto, options); + } + + writer.WriteArrayHeader(payload.ForkNode.Count); + foreach (var forkNodeDto in payload.ForkNode) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, forkNodeDto, options); + } + + writer.WriteArrayHeader(payload.ForLoopActionUsage.Count); + foreach (var forLoopActionUsageDto in payload.ForLoopActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, forLoopActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.FramedConcernMembership.Count); + foreach (var framedConcernMembershipDto in payload.FramedConcernMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, framedConcernMembershipDto, options); + } + + writer.WriteArrayHeader(payload.Function.Count); + foreach (var functionDto in payload.Function) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, functionDto, options); + } + + writer.WriteArrayHeader(payload.IfActionUsage.Count); + foreach (var ifActionUsageDto in payload.IfActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, ifActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.IncludeUseCaseUsage.Count); + foreach (var includeUseCaseUsageDto in payload.IncludeUseCaseUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, includeUseCaseUsageDto, options); + } + + writer.WriteArrayHeader(payload.IndexExpression.Count); + foreach (var indexExpressionDto in payload.IndexExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, indexExpressionDto, options); + } + + writer.WriteArrayHeader(payload.Interaction.Count); + foreach (var interactionDto in payload.Interaction) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, interactionDto, options); + } + + writer.WriteArrayHeader(payload.InterfaceDefinition.Count); + foreach (var interfaceDefinitionDto in payload.InterfaceDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, interfaceDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.InterfaceUsage.Count); + foreach (var interfaceUsageDto in payload.InterfaceUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, interfaceUsageDto, options); + } + + writer.WriteArrayHeader(payload.Intersecting.Count); + foreach (var intersectingDto in payload.Intersecting) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, intersectingDto, options); + } + + writer.WriteArrayHeader(payload.Invariant.Count); + foreach (var invariantDto in payload.Invariant) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, invariantDto, options); + } + + writer.WriteArrayHeader(payload.InvocationExpression.Count); + foreach (var invocationExpressionDto in payload.InvocationExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, invocationExpressionDto, options); + } + + writer.WriteArrayHeader(payload.ItemDefinition.Count); + foreach (var itemDefinitionDto in payload.ItemDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, itemDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ItemUsage.Count); + foreach (var itemUsageDto in payload.ItemUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, itemUsageDto, options); + } + + writer.WriteArrayHeader(payload.JoinNode.Count); + foreach (var joinNodeDto in payload.JoinNode) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, joinNodeDto, options); + } + + writer.WriteArrayHeader(payload.LibraryPackage.Count); + foreach (var libraryPackageDto in payload.LibraryPackage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, libraryPackageDto, options); + } + + writer.WriteArrayHeader(payload.LiteralBoolean.Count); + foreach (var literalBooleanDto in payload.LiteralBoolean) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalBooleanDto, options); + } + + writer.WriteArrayHeader(payload.LiteralExpression.Count); + foreach (var literalExpressionDto in payload.LiteralExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalExpressionDto, options); + } + + writer.WriteArrayHeader(payload.LiteralInfinity.Count); + foreach (var literalInfinityDto in payload.LiteralInfinity) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalInfinityDto, options); + } + + writer.WriteArrayHeader(payload.LiteralInteger.Count); + foreach (var literalIntegerDto in payload.LiteralInteger) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalIntegerDto, options); + } + + writer.WriteArrayHeader(payload.LiteralRational.Count); + foreach (var literalRationalDto in payload.LiteralRational) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalRationalDto, options); + } + + writer.WriteArrayHeader(payload.LiteralString.Count); + foreach (var literalStringDto in payload.LiteralString) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, literalStringDto, options); + } + + writer.WriteArrayHeader(payload.Membership.Count); + foreach (var membershipDto in payload.Membership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, membershipDto, options); + } + + writer.WriteArrayHeader(payload.MembershipExpose.Count); + foreach (var membershipExposeDto in payload.MembershipExpose) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, membershipExposeDto, options); + } + + writer.WriteArrayHeader(payload.MembershipImport.Count); + foreach (var membershipImportDto in payload.MembershipImport) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, membershipImportDto, options); + } + + writer.WriteArrayHeader(payload.MergeNode.Count); + foreach (var mergeNodeDto in payload.MergeNode) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, mergeNodeDto, options); + } + + writer.WriteArrayHeader(payload.Metaclass.Count); + foreach (var metaclassDto in payload.Metaclass) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, metaclassDto, options); + } + + writer.WriteArrayHeader(payload.MetadataAccessExpression.Count); + foreach (var metadataAccessExpressionDto in payload.MetadataAccessExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, metadataAccessExpressionDto, options); + } + + writer.WriteArrayHeader(payload.MetadataDefinition.Count); + foreach (var metadataDefinitionDto in payload.MetadataDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, metadataDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.MetadataFeature.Count); + foreach (var metadataFeatureDto in payload.MetadataFeature) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, metadataFeatureDto, options); + } + + writer.WriteArrayHeader(payload.MetadataUsage.Count); + foreach (var metadataUsageDto in payload.MetadataUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, metadataUsageDto, options); + } + + writer.WriteArrayHeader(payload.Multiplicity.Count); + foreach (var multiplicityDto in payload.Multiplicity) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, multiplicityDto, options); + } + + writer.WriteArrayHeader(payload.MultiplicityRange.Count); + foreach (var multiplicityRangeDto in payload.MultiplicityRange) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, multiplicityRangeDto, options); + } + + writer.WriteArrayHeader(payload.Namespace.Count); + foreach (var namespaceDto in payload.Namespace) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, namespaceDto, options); + } + + writer.WriteArrayHeader(payload.NamespaceExpose.Count); + foreach (var namespaceExposeDto in payload.NamespaceExpose) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, namespaceExposeDto, options); + } + + writer.WriteArrayHeader(payload.NamespaceImport.Count); + foreach (var namespaceImportDto in payload.NamespaceImport) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, namespaceImportDto, options); + } + + writer.WriteArrayHeader(payload.NullExpression.Count); + foreach (var nullExpressionDto in payload.NullExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, nullExpressionDto, options); + } + + writer.WriteArrayHeader(payload.ObjectiveMembership.Count); + foreach (var objectiveMembershipDto in payload.ObjectiveMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, objectiveMembershipDto, options); + } + + writer.WriteArrayHeader(payload.OccurrenceDefinition.Count); + foreach (var occurrenceDefinitionDto in payload.OccurrenceDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, occurrenceDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.OccurrenceUsage.Count); + foreach (var occurrenceUsageDto in payload.OccurrenceUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, occurrenceUsageDto, options); + } + + writer.WriteArrayHeader(payload.OperatorExpression.Count); + foreach (var operatorExpressionDto in payload.OperatorExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, operatorExpressionDto, options); + } + + writer.WriteArrayHeader(payload.OwningMembership.Count); + foreach (var owningMembershipDto in payload.OwningMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, owningMembershipDto, options); + } + + writer.WriteArrayHeader(payload.Package.Count); + foreach (var packageDto in payload.Package) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, packageDto, options); + } + + writer.WriteArrayHeader(payload.ParameterMembership.Count); + foreach (var parameterMembershipDto in payload.ParameterMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, parameterMembershipDto, options); + } + + writer.WriteArrayHeader(payload.PartDefinition.Count); + foreach (var partDefinitionDto in payload.PartDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, partDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.PartUsage.Count); + foreach (var partUsageDto in payload.PartUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, partUsageDto, options); + } + + writer.WriteArrayHeader(payload.PayloadFeature.Count); + foreach (var payloadFeatureDto in payload.PayloadFeature) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, payloadFeatureDto, options); + } + + writer.WriteArrayHeader(payload.PerformActionUsage.Count); + foreach (var performActionUsageDto in payload.PerformActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, performActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.PortConjugation.Count); + foreach (var portConjugationDto in payload.PortConjugation) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, portConjugationDto, options); + } + + writer.WriteArrayHeader(payload.PortDefinition.Count); + foreach (var portDefinitionDto in payload.PortDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, portDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.PortUsage.Count); + foreach (var portUsageDto in payload.PortUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, portUsageDto, options); + } + + writer.WriteArrayHeader(payload.Predicate.Count); + foreach (var predicateDto in payload.Predicate) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, predicateDto, options); + } + + writer.WriteArrayHeader(payload.Redefinition.Count); + foreach (var redefinitionDto in payload.Redefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, redefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ReferenceSubsetting.Count); + foreach (var referenceSubsettingDto in payload.ReferenceSubsetting) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, referenceSubsettingDto, options); + } + + writer.WriteArrayHeader(payload.ReferenceUsage.Count); + foreach (var referenceUsageDto in payload.ReferenceUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, referenceUsageDto, options); + } + + writer.WriteArrayHeader(payload.RenderingDefinition.Count); + foreach (var renderingDefinitionDto in payload.RenderingDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, renderingDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.RenderingUsage.Count); + foreach (var renderingUsageDto in payload.RenderingUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, renderingUsageDto, options); + } + + writer.WriteArrayHeader(payload.RequirementConstraintMembership.Count); + foreach (var requirementConstraintMembershipDto in payload.RequirementConstraintMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, requirementConstraintMembershipDto, options); + } + + writer.WriteArrayHeader(payload.RequirementDefinition.Count); + foreach (var requirementDefinitionDto in payload.RequirementDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, requirementDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.RequirementUsage.Count); + foreach (var requirementUsageDto in payload.RequirementUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, requirementUsageDto, options); + } + + writer.WriteArrayHeader(payload.RequirementVerificationMembership.Count); + foreach (var requirementVerificationMembershipDto in payload.RequirementVerificationMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, requirementVerificationMembershipDto, options); + } + + writer.WriteArrayHeader(payload.ResultExpressionMembership.Count); + foreach (var resultExpressionMembershipDto in payload.ResultExpressionMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, resultExpressionMembershipDto, options); + } + + writer.WriteArrayHeader(payload.ReturnParameterMembership.Count); + foreach (var returnParameterMembershipDto in payload.ReturnParameterMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, returnParameterMembershipDto, options); + } + + writer.WriteArrayHeader(payload.SatisfyRequirementUsage.Count); + foreach (var satisfyRequirementUsageDto in payload.SatisfyRequirementUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, satisfyRequirementUsageDto, options); + } + + writer.WriteArrayHeader(payload.SelectExpression.Count); + foreach (var selectExpressionDto in payload.SelectExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, selectExpressionDto, options); + } + + writer.WriteArrayHeader(payload.SendActionUsage.Count); + foreach (var sendActionUsageDto in payload.SendActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, sendActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.Specialization.Count); + foreach (var specializationDto in payload.Specialization) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, specializationDto, options); + } + + writer.WriteArrayHeader(payload.StakeholderMembership.Count); + foreach (var stakeholderMembershipDto in payload.StakeholderMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, stakeholderMembershipDto, options); + } + + writer.WriteArrayHeader(payload.StateDefinition.Count); + foreach (var stateDefinitionDto in payload.StateDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, stateDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.StateSubactionMembership.Count); + foreach (var stateSubactionMembershipDto in payload.StateSubactionMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, stateSubactionMembershipDto, options); + } + + writer.WriteArrayHeader(payload.StateUsage.Count); + foreach (var stateUsageDto in payload.StateUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, stateUsageDto, options); + } + + writer.WriteArrayHeader(payload.Step.Count); + foreach (var stepDto in payload.Step) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, stepDto, options); + } + + writer.WriteArrayHeader(payload.Structure.Count); + foreach (var structureDto in payload.Structure) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, structureDto, options); + } + + writer.WriteArrayHeader(payload.Subclassification.Count); + foreach (var subclassificationDto in payload.Subclassification) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, subclassificationDto, options); + } + + writer.WriteArrayHeader(payload.SubjectMembership.Count); + foreach (var subjectMembershipDto in payload.SubjectMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, subjectMembershipDto, options); + } + + writer.WriteArrayHeader(payload.Subsetting.Count); + foreach (var subsettingDto in payload.Subsetting) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, subsettingDto, options); + } + + writer.WriteArrayHeader(payload.Succession.Count); + foreach (var successionDto in payload.Succession) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, successionDto, options); + } + + writer.WriteArrayHeader(payload.SuccessionAsUsage.Count); + foreach (var successionAsUsageDto in payload.SuccessionAsUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, successionAsUsageDto, options); + } + + writer.WriteArrayHeader(payload.SuccessionFlow.Count); + foreach (var successionFlowDto in payload.SuccessionFlow) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, successionFlowDto, options); + } + + writer.WriteArrayHeader(payload.SuccessionFlowUsage.Count); + foreach (var successionFlowUsageDto in payload.SuccessionFlowUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, successionFlowUsageDto, options); + } + + writer.WriteArrayHeader(payload.TerminateActionUsage.Count); + foreach (var terminateActionUsageDto in payload.TerminateActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, terminateActionUsageDto, options); + } + + writer.WriteArrayHeader(payload.TextualRepresentation.Count); + foreach (var textualRepresentationDto in payload.TextualRepresentation) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, textualRepresentationDto, options); + } + + writer.WriteArrayHeader(payload.TransitionFeatureMembership.Count); + foreach (var transitionFeatureMembershipDto in payload.TransitionFeatureMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, transitionFeatureMembershipDto, options); + } + + writer.WriteArrayHeader(payload.TransitionUsage.Count); + foreach (var transitionUsageDto in payload.TransitionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, transitionUsageDto, options); + } + + writer.WriteArrayHeader(payload.TriggerInvocationExpression.Count); + foreach (var triggerInvocationExpressionDto in payload.TriggerInvocationExpression) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, triggerInvocationExpressionDto, options); + } + + writer.WriteArrayHeader(payload.Type.Count); + foreach (var typeDto in payload.Type) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, typeDto, options); + } + + writer.WriteArrayHeader(payload.TypeFeaturing.Count); + foreach (var typeFeaturingDto in payload.TypeFeaturing) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, typeFeaturingDto, options); + } + + writer.WriteArrayHeader(payload.Unioning.Count); + foreach (var unioningDto in payload.Unioning) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, unioningDto, options); + } + + writer.WriteArrayHeader(payload.Usage.Count); + foreach (var usageDto in payload.Usage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, usageDto, options); + } + + writer.WriteArrayHeader(payload.UseCaseDefinition.Count); + foreach (var useCaseDefinitionDto in payload.UseCaseDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, useCaseDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.UseCaseUsage.Count); + foreach (var useCaseUsageDto in payload.UseCaseUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, useCaseUsageDto, options); + } + + writer.WriteArrayHeader(payload.VariantMembership.Count); + foreach (var variantMembershipDto in payload.VariantMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, variantMembershipDto, options); + } + + writer.WriteArrayHeader(payload.VerificationCaseDefinition.Count); + foreach (var verificationCaseDefinitionDto in payload.VerificationCaseDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, verificationCaseDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.VerificationCaseUsage.Count); + foreach (var verificationCaseUsageDto in payload.VerificationCaseUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, verificationCaseUsageDto, options); + } + + writer.WriteArrayHeader(payload.ViewDefinition.Count); + foreach (var viewDefinitionDto in payload.ViewDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, viewDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ViewpointDefinition.Count); + foreach (var viewpointDefinitionDto in payload.ViewpointDefinition) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, viewpointDefinitionDto, options); + } + + writer.WriteArrayHeader(payload.ViewpointUsage.Count); + foreach (var viewpointUsageDto in payload.ViewpointUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, viewpointUsageDto, options); + } + + writer.WriteArrayHeader(payload.ViewRenderingMembership.Count); + foreach (var viewRenderingMembershipDto in payload.ViewRenderingMembership) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, viewRenderingMembershipDto, options); + } + + writer.WriteArrayHeader(payload.ViewUsage.Count); + foreach (var viewUsageDto in payload.ViewUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, viewUsageDto, options); + } + + writer.WriteArrayHeader(payload.WhileLoopActionUsage.Count); + foreach (var whileLoopActionUsageDto in payload.WhileLoopActionUsage) + { + formatterResolver.GetFormatterWithVerify().Serialize(ref writer, whileLoopActionUsageDto, options); + } + + + writer.Flush(); + } + + /// + /// Deserializes an . + /// + /// + /// The reader to deserialize from. + /// + /// + /// The serialization settings to use. + /// + /// + /// The deserialized value. + /// + public Payload Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.TryReadNil()) + { + return null; + } + + var formatterResolver = options.Resolver; + options.Security.DepthStep(ref reader); + + var payload = new Payload(); + + var propertyCounter = reader.ReadArrayHeader(); + + for (var i = 0; i < propertyCounter; i++) + { + int valueLength; + int valueCounter; + + switch (i) + { + case 0: + payload.Created = reader.ReadDateTime(); + break; + case 1: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var acceptActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AcceptActionUsage.Add(acceptActionUsageDto); + } + + break; + case 2: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var actionDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ActionDefinition.Add(actionDefinitionDto); + } + + break; + case 3: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var actionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ActionUsage.Add(actionUsageDto); + } + + break; + case 4: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var actorMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ActorMembership.Add(actorMembershipDto); + } + + break; + case 5: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var allocationDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AllocationDefinition.Add(allocationDefinitionDto); + } + + break; + case 6: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var allocationUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AllocationUsage.Add(allocationUsageDto); + } + + break; + case 7: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var analysisCaseDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AnalysisCaseDefinition.Add(analysisCaseDefinitionDto); + } + + break; + case 8: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var analysisCaseUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AnalysisCaseUsage.Add(analysisCaseUsageDto); + } + + break; + case 9: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var annotatingElementDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AnnotatingElement.Add(annotatingElementDto); + } + + break; + case 10: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var annotationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Annotation.Add(annotationDto); + } + + break; + case 11: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var assertConstraintUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AssertConstraintUsage.Add(assertConstraintUsageDto); + } + + break; + case 12: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var assignmentActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AssignmentActionUsage.Add(assignmentActionUsageDto); + } + + break; + case 13: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var associationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Association.Add(associationDto); + } + + break; + case 14: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var associationStructureDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AssociationStructure.Add(associationStructureDto); + } + + break; + case 15: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var attributeDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AttributeDefinition.Add(attributeDefinitionDto); + } + + break; + case 16: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var attributeUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.AttributeUsage.Add(attributeUsageDto); + } + + break; + case 17: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var behaviorDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Behavior.Add(behaviorDto); + } + + break; + case 18: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var bindingConnectorDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.BindingConnector.Add(bindingConnectorDto); + } + + break; + case 19: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var bindingConnectorAsUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.BindingConnectorAsUsage.Add(bindingConnectorAsUsageDto); + } + + break; + case 20: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var booleanExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.BooleanExpression.Add(booleanExpressionDto); + } + + break; + case 21: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var calculationDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CalculationDefinition.Add(calculationDefinitionDto); + } + + break; + case 22: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var calculationUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CalculationUsage.Add(calculationUsageDto); + } + + break; + case 23: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var caseDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CaseDefinition.Add(caseDefinitionDto); + } + + break; + case 24: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var caseUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CaseUsage.Add(caseUsageDto); + } + + break; + case 25: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var classDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Class.Add(classDto); + } + + break; + case 26: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var classifierDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Classifier.Add(classifierDto); + } + + break; + case 27: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var collectExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CollectExpression.Add(collectExpressionDto); + } + + break; + case 28: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var commentDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Comment.Add(commentDto); + } + + break; + case 29: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var concernDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConcernDefinition.Add(concernDefinitionDto); + } + + break; + case 30: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var concernUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConcernUsage.Add(concernUsageDto); + } + + break; + case 31: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var conjugatedPortDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConjugatedPortDefinition.Add(conjugatedPortDefinitionDto); + } + + break; + case 32: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var conjugatedPortTypingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConjugatedPortTyping.Add(conjugatedPortTypingDto); + } + + break; + case 33: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var conjugationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Conjugation.Add(conjugationDto); + } + + break; + case 34: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var connectionDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConnectionDefinition.Add(connectionDefinitionDto); + } + + break; + case 35: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var connectionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConnectionUsage.Add(connectionUsageDto); + } + + break; + case 36: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var connectorDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Connector.Add(connectorDto); + } + + break; + case 37: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var constraintDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConstraintDefinition.Add(constraintDefinitionDto); + } + + break; + case 38: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var constraintUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConstraintUsage.Add(constraintUsageDto); + } + + break; + case 39: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var constructorExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ConstructorExpression.Add(constructorExpressionDto); + } + + break; + case 40: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var crossSubsettingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.CrossSubsetting.Add(crossSubsettingDto); + } + + break; + case 41: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var dataTypeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.DataType.Add(dataTypeDto); + } + + break; + case 42: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var decisionNodeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.DecisionNode.Add(decisionNodeDto); + } + + break; + case 43: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var definitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Definition.Add(definitionDto); + } + + break; + case 44: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var dependencyDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Dependency.Add(dependencyDto); + } + + break; + case 45: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var differencingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Differencing.Add(differencingDto); + } + + break; + case 46: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var disjoiningDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Disjoining.Add(disjoiningDto); + } + + break; + case 47: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var documentationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Documentation.Add(documentationDto); + } + + break; + case 48: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var elementFilterMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ElementFilterMembership.Add(elementFilterMembershipDto); + } + + break; + case 49: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var endFeatureMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.EndFeatureMembership.Add(endFeatureMembershipDto); + } + + break; + case 50: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var enumerationDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.EnumerationDefinition.Add(enumerationDefinitionDto); + } + + break; + case 51: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var enumerationUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.EnumerationUsage.Add(enumerationUsageDto); + } + + break; + case 52: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var eventOccurrenceUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.EventOccurrenceUsage.Add(eventOccurrenceUsageDto); + } + + break; + case 53: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var exhibitStateUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ExhibitStateUsage.Add(exhibitStateUsageDto); + } + + break; + case 54: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var expressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Expression.Add(expressionDto); + } + + break; + case 55: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Feature.Add(featureDto); + } + + break; + case 56: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureChainExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureChainExpression.Add(featureChainExpressionDto); + } + + break; + case 57: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureChainingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureChaining.Add(featureChainingDto); + } + + break; + case 58: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureInvertingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureInverting.Add(featureInvertingDto); + } + + break; + case 59: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureMembership.Add(featureMembershipDto); + } + + break; + case 60: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureReferenceExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureReferenceExpression.Add(featureReferenceExpressionDto); + } + + break; + case 61: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureTypingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureTyping.Add(featureTypingDto); + } + + break; + case 62: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var featureValueDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FeatureValue.Add(featureValueDto); + } + + break; + case 63: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var flowDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Flow.Add(flowDto); + } + + break; + case 64: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var flowDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FlowDefinition.Add(flowDefinitionDto); + } + + break; + case 65: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var flowEndDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FlowEnd.Add(flowEndDto); + } + + break; + case 66: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var flowUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FlowUsage.Add(flowUsageDto); + } + + break; + case 67: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var forkNodeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ForkNode.Add(forkNodeDto); + } + + break; + case 68: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var forLoopActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ForLoopActionUsage.Add(forLoopActionUsageDto); + } + + break; + case 69: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var framedConcernMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.FramedConcernMembership.Add(framedConcernMembershipDto); + } + + break; + case 70: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var functionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Function.Add(functionDto); + } + + break; + case 71: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var ifActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.IfActionUsage.Add(ifActionUsageDto); + } + + break; + case 72: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var includeUseCaseUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.IncludeUseCaseUsage.Add(includeUseCaseUsageDto); + } + + break; + case 73: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var indexExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.IndexExpression.Add(indexExpressionDto); + } + + break; + case 74: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var interactionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Interaction.Add(interactionDto); + } + + break; + case 75: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var interfaceDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.InterfaceDefinition.Add(interfaceDefinitionDto); + } + + break; + case 76: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var interfaceUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.InterfaceUsage.Add(interfaceUsageDto); + } + + break; + case 77: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var intersectingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Intersecting.Add(intersectingDto); + } + + break; + case 78: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var invariantDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Invariant.Add(invariantDto); + } + + break; + case 79: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var invocationExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.InvocationExpression.Add(invocationExpressionDto); + } + + break; + case 80: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var itemDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ItemDefinition.Add(itemDefinitionDto); + } + + break; + case 81: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var itemUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ItemUsage.Add(itemUsageDto); + } + + break; + case 82: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var joinNodeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.JoinNode.Add(joinNodeDto); + } + + break; + case 83: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var libraryPackageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LibraryPackage.Add(libraryPackageDto); + } + + break; + case 84: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalBooleanDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralBoolean.Add(literalBooleanDto); + } + + break; + case 85: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralExpression.Add(literalExpressionDto); + } + + break; + case 86: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalInfinityDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralInfinity.Add(literalInfinityDto); + } + + break; + case 87: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalIntegerDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralInteger.Add(literalIntegerDto); + } + + break; + case 88: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalRationalDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralRational.Add(literalRationalDto); + } + + break; + case 89: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var literalStringDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.LiteralString.Add(literalStringDto); + } + + break; + case 90: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var membershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Membership.Add(membershipDto); + } + + break; + case 91: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var membershipExposeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MembershipExpose.Add(membershipExposeDto); + } + + break; + case 92: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var membershipImportDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MembershipImport.Add(membershipImportDto); + } + + break; + case 93: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var mergeNodeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MergeNode.Add(mergeNodeDto); + } + + break; + case 94: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var metaclassDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Metaclass.Add(metaclassDto); + } + + break; + case 95: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var metadataAccessExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MetadataAccessExpression.Add(metadataAccessExpressionDto); + } + + break; + case 96: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var metadataDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MetadataDefinition.Add(metadataDefinitionDto); + } + + break; + case 97: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var metadataFeatureDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MetadataFeature.Add(metadataFeatureDto); + } + + break; + case 98: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var metadataUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MetadataUsage.Add(metadataUsageDto); + } + + break; + case 99: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var multiplicityDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Multiplicity.Add(multiplicityDto); + } + + break; + case 100: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var multiplicityRangeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.MultiplicityRange.Add(multiplicityRangeDto); + } + + break; + case 101: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var namespaceDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Namespace.Add(namespaceDto); + } + + break; + case 102: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var namespaceExposeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.NamespaceExpose.Add(namespaceExposeDto); + } + + break; + case 103: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var namespaceImportDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.NamespaceImport.Add(namespaceImportDto); + } + + break; + case 104: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var nullExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.NullExpression.Add(nullExpressionDto); + } + + break; + case 105: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var objectiveMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ObjectiveMembership.Add(objectiveMembershipDto); + } + + break; + case 106: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var occurrenceDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.OccurrenceDefinition.Add(occurrenceDefinitionDto); + } + + break; + case 107: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var occurrenceUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.OccurrenceUsage.Add(occurrenceUsageDto); + } + + break; + case 108: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var operatorExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.OperatorExpression.Add(operatorExpressionDto); + } + + break; + case 109: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var owningMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.OwningMembership.Add(owningMembershipDto); + } + + break; + case 110: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var packageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Package.Add(packageDto); + } + + break; + case 111: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var parameterMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ParameterMembership.Add(parameterMembershipDto); + } + + break; + case 112: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var partDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PartDefinition.Add(partDefinitionDto); + } + + break; + case 113: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var partUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PartUsage.Add(partUsageDto); + } + + break; + case 114: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var payloadFeatureDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PayloadFeature.Add(payloadFeatureDto); + } + + break; + case 115: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var performActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PerformActionUsage.Add(performActionUsageDto); + } + + break; + case 116: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var portConjugationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PortConjugation.Add(portConjugationDto); + } + + break; + case 117: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var portDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PortDefinition.Add(portDefinitionDto); + } + + break; + case 118: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var portUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.PortUsage.Add(portUsageDto); + } + + break; + case 119: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var predicateDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Predicate.Add(predicateDto); + } + + break; + case 120: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var redefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Redefinition.Add(redefinitionDto); + } + + break; + case 121: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var referenceSubsettingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ReferenceSubsetting.Add(referenceSubsettingDto); + } + + break; + case 122: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var referenceUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ReferenceUsage.Add(referenceUsageDto); + } + + break; + case 123: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var renderingDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RenderingDefinition.Add(renderingDefinitionDto); + } + + break; + case 124: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var renderingUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RenderingUsage.Add(renderingUsageDto); + } + + break; + case 125: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var requirementConstraintMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RequirementConstraintMembership.Add(requirementConstraintMembershipDto); + } + + break; + case 126: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var requirementDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RequirementDefinition.Add(requirementDefinitionDto); + } + + break; + case 127: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var requirementUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RequirementUsage.Add(requirementUsageDto); + } + + break; + case 128: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var requirementVerificationMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.RequirementVerificationMembership.Add(requirementVerificationMembershipDto); + } + + break; + case 129: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var resultExpressionMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ResultExpressionMembership.Add(resultExpressionMembershipDto); + } + + break; + case 130: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var returnParameterMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ReturnParameterMembership.Add(returnParameterMembershipDto); + } + + break; + case 131: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var satisfyRequirementUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SatisfyRequirementUsage.Add(satisfyRequirementUsageDto); + } + + break; + case 132: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var selectExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SelectExpression.Add(selectExpressionDto); + } + + break; + case 133: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var sendActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SendActionUsage.Add(sendActionUsageDto); + } + + break; + case 134: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var specializationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Specialization.Add(specializationDto); + } + + break; + case 135: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var stakeholderMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.StakeholderMembership.Add(stakeholderMembershipDto); + } + + break; + case 136: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var stateDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.StateDefinition.Add(stateDefinitionDto); + } + + break; + case 137: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var stateSubactionMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.StateSubactionMembership.Add(stateSubactionMembershipDto); + } + + break; + case 138: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var stateUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.StateUsage.Add(stateUsageDto); + } + + break; + case 139: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var stepDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Step.Add(stepDto); + } + + break; + case 140: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var structureDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Structure.Add(structureDto); + } + + break; + case 141: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var subclassificationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Subclassification.Add(subclassificationDto); + } + + break; + case 142: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var subjectMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SubjectMembership.Add(subjectMembershipDto); + } + + break; + case 143: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var subsettingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Subsetting.Add(subsettingDto); + } + + break; + case 144: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var successionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Succession.Add(successionDto); + } + + break; + case 145: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var successionAsUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SuccessionAsUsage.Add(successionAsUsageDto); + } + + break; + case 146: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var successionFlowDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SuccessionFlow.Add(successionFlowDto); + } + + break; + case 147: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var successionFlowUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.SuccessionFlowUsage.Add(successionFlowUsageDto); + } + + break; + case 148: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var terminateActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TerminateActionUsage.Add(terminateActionUsageDto); + } + + break; + case 149: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var textualRepresentationDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TextualRepresentation.Add(textualRepresentationDto); + } + + break; + case 150: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var transitionFeatureMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TransitionFeatureMembership.Add(transitionFeatureMembershipDto); + } + + break; + case 151: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var transitionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TransitionUsage.Add(transitionUsageDto); + } + + break; + case 152: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var triggerInvocationExpressionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TriggerInvocationExpression.Add(triggerInvocationExpressionDto); + } + + break; + case 153: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var typeDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Type.Add(typeDto); + } + + break; + case 154: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var typeFeaturingDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.TypeFeaturing.Add(typeFeaturingDto); + } + + break; + case 155: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var unioningDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Unioning.Add(unioningDto); + } + + break; + case 156: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var usageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.Usage.Add(usageDto); + } + + break; + case 157: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var useCaseDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.UseCaseDefinition.Add(useCaseDefinitionDto); + } + + break; + case 158: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var useCaseUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.UseCaseUsage.Add(useCaseUsageDto); + } + + break; + case 159: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var variantMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.VariantMembership.Add(variantMembershipDto); + } + + break; + case 160: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var verificationCaseDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.VerificationCaseDefinition.Add(verificationCaseDefinitionDto); + } + + break; + case 161: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var verificationCaseUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.VerificationCaseUsage.Add(verificationCaseUsageDto); + } + + break; + case 162: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var viewDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ViewDefinition.Add(viewDefinitionDto); + } + + break; + case 163: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var viewpointDefinitionDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ViewpointDefinition.Add(viewpointDefinitionDto); + } + + break; + case 164: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var viewpointUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ViewpointUsage.Add(viewpointUsageDto); + } + + break; + case 165: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var viewRenderingMembershipDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ViewRenderingMembership.Add(viewRenderingMembershipDto); + } + + break; + case 166: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var viewUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.ViewUsage.Add(viewUsageDto); + } + + break; + case 167: + valueLength = reader.ReadArrayHeader(); + for (valueCounter = 0; valueCounter < valueLength; valueCounter++) + { + var whileLoopActionUsageDto = formatterResolver.GetFormatterWithVerify().Deserialize(ref reader, options); + payload.WhileLoopActionUsage.Add(whileLoopActionUsageDto); + } + + break; + } + } + + return payload; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.Serializer.MessagePack/Core/MessagePackFormatterBase.cs b/SysML2.NET.Serializer.MessagePack/Core/MessagePackFormatterBase.cs new file mode 100644 index 00000000..cec1fd54 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Core/MessagePackFormatterBase.cs @@ -0,0 +1,149 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Core +{ + using System; + using System.Buffers; + + using global::MessagePack; + + using SysML2.NET.Extensions.Comparers; + + /// + /// Provides shared low-level helper functionality for MessagePack formatters, + /// including optimized binary encoding and decoding of common value types. + /// + /// + /// This base class exists to centralize performance-critical serialization logic + /// that is reused across multiple MessagePack formatters. + /// + public class MessagePackFormatterBase + { + /// + /// Thread-local reusable buffer for serializing values + /// as fixed-size 16-byte MessagePack binary values. + /// + /// + /// + /// The buffer is allocated once per thread and reused to avoid per-call allocations + /// and overhead. + /// + /// + /// The buffer length is always exactly 16 bytes, making it safe to pass directly + /// to after writing + /// a bin(16) header. + /// + /// + [ThreadStatic] + private static byte[] guidBuffer; + + /// + /// Shared instance used to provide deterministic + /// ordering of values during serialization. + /// + /// + /// This comparer is stateless and thread-safe and is shared across all + /// formatter instances to avoid repeated allocations. + /// + protected static readonly GuidComparer GuidComparer = new(); + + /// + /// Writes a value as a MessagePack bin(16) field. + /// + /// + /// The used to write the binary representation. + /// + /// + /// The value to serialize. + /// + /// + /// + /// This method encodes the as a fixed-length 16-byte binary value + /// instead of using , avoiding per-call allocations. + /// + /// + /// A thread-local reusable buffer is used to maximize throughput while remaining + /// safe with respect to span lifetime rules. + /// + /// + /// This encoding is compatible with MessagePack v3.1.4, which does not provide + /// built-in serialization helpers. + /// + /// + protected static void WriteGuidBin16(ref MessagePackWriter writer, Guid value) + { + var buffer = guidBuffer ??= new byte[16]; + value.TryWriteBytes(buffer); + + writer.WriteBinHeader(16); + writer.WriteRaw(buffer); // safe because buffer is exactly 16 bytes + } + + /// + /// Reads a value encoded as a MessagePack bin(16) field. + /// + /// + /// The from which to read the binary value. + /// + /// + /// The deserialized value. + /// + /// + /// Thrown when the value is nil or when the binary payload length is not exactly 16 bytes. + /// + /// + /// + /// This method supports both single-segment and multi-segment + /// inputs without allocating intermediate arrays. + /// + /// + /// For multi-segment sequences, a stack-allocated temporary buffer is used to + /// assemble the 16-byte payload before constructing the . + /// + /// + /// This method assumes the value was written using . + /// + /// + protected static Guid ReadGuidBin16(ref MessagePackReader reader) + { + var bytes = reader.ReadBytes(); + if (!bytes.HasValue) + { + throw new MessagePackSerializationException("Expected Guid as bin(16), got nil."); + } + + var seq = bytes.Value; + if (seq.Length != 16) + { + throw new MessagePackSerializationException($"Expected Guid as 16 bytes, got {seq.Length} bytes."); + } + + if (seq.IsSingleSegment) + { + return new Guid(seq.FirstSpan); + } + + Span tmp = stackalloc byte[16]; + seq.CopyTo(tmp); + return new Guid(tmp); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/DeSerializer.cs b/SysML2.NET.Serializer.MessagePack/DeSerializer.cs new file mode 100644 index 00000000..c8a2f868 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/DeSerializer.cs @@ -0,0 +1,153 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.IO; + using System.Threading; + using System.Threading.Tasks; + + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Logging.Abstractions; + + using SysML2.NET.Common; + using SysML2.NET.Serializer.MessagePack.Core; + + /// + /// The purpose of the is to deserialize a MessagePack to + /// an and + /// + public class DeSerializer : SerializerBase, IDeSerializer + { + /// + /// The (injected) logger + /// + private readonly ILogger logger; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The (injected) used to set up logging + /// + public DeSerializer(ILoggerFactory loggerFactory = null) + { + this.logger = loggerFactory == null ? NullLogger.Instance : loggerFactory.CreateLogger(); + } + + /// + /// Deserializes the JSON stream to an + /// + /// + /// the JSON input stream + /// + /// + /// The to use + /// + /// + /// an + /// + public IEnumerable DeSerialize(Stream stream, SerializationTargetKind serializationTargetKind) + { + if (stream == null) + { + throw new ArgumentNullException(nameof(stream), "Stream may not be null"); + } + + var options = this.CreateSerializerOptions(); + + var sw = Stopwatch.StartNew(); + + var payload = global::MessagePack.MessagePackSerializer.Deserialize(stream, options); + + sw.Stop(); + + this.logger.LogDebug("DeserializeAsync finished in {ElapsedMilliseconds} [ms]", sw.ElapsedMilliseconds); + + var result = payload.ToDataItems(); + + return result; + } + + /// + /// Asynchronously deserializes the JSON stream to an + /// + /// + /// the JSON input stream + /// + /// + /// The to use + /// + /// + /// The used to cancel the operation + /// + /// + /// an + /// + public Task> DeSerializeAsync(Stream stream, SerializationTargetKind serializationTargetKind, CancellationToken cancellationToken) + { + if (stream == null) + { + throw new ArgumentNullException(nameof(stream), "Stream may not be null"); + } + + return this.DeserializeInternalAsync(stream, serializationTargetKind, cancellationToken); + } + + /// + /// Asynchronously deserializes the JSON stream to an + /// + /// + /// the JSON input stream + /// + /// + /// The to use + /// + /// + /// The used to cancel the operation + /// + /// + /// an + /// + /// + /// This method is used to split asynchronous code from parameter checking. + /// The method is exposed and shall be used. + /// + public async Task> DeserializeInternalAsync(Stream stream, SerializationTargetKind serializationTargetKind, CancellationToken cancellationToken) + { + var options = this.CreateSerializerOptions(); + + var sw = Stopwatch.StartNew(); + + var payload = await global::MessagePack.MessagePackSerializer.DeserializeAsync(stream, options, cancellationToken); + + sw.Stop(); + + this.logger.LogDebug("DeserializeAsync finished in {ElapsedMilliseconds} [ms]", sw.ElapsedMilliseconds); + + var result = payload.ToDataItems(); + + return result; + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/Helpers/DataFormatterResolver.cs b/SysML2.NET.Serializer.MessagePack/Helpers/DataFormatterResolver.cs new file mode 100644 index 00000000..7f928955 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Helpers/DataFormatterResolver.cs @@ -0,0 +1,72 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Helpers +{ + using global::MessagePack; + using global::MessagePack.Formatters; + + using SysML2.NET.Serializer.MessagePack.Core; + + /// + /// The purpose of the is to provide the model + /// for all concrete classes + /// + public class DataFormatterResolver : IFormatterResolver + { + // Resolver should be singleton. + public static readonly IFormatterResolver Instance = new DataFormatterResolver(); + + /// + /// Initializes a new instance of the class + /// + private DataFormatterResolver() + { + } + + /// + /// Gets an instance that can serialize or deserialize some type . + /// + /// The type of value to be serialized or deserialized. + /// A formatter, if this resolver supplies one for type ; otherwise . + public IMessagePackFormatter GetFormatter() + { + return FormatterCache.Formatter; + } + + /// + /// A cache from which can be resolved + /// + /// + private static class FormatterCache + { + public static readonly IMessagePackFormatter Formatter; + + // generic's static constructor should be minimized for reduce type generation size! + // use outer helper method. + static FormatterCache() + { + var type = typeof(T); + + Formatter = (IMessagePackFormatter)DataResolverGetFormatterHelper.GetFormatter(type); + } + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/Helpers/ReadOnlySequenceExtensions.cs b/SysML2.NET.Serializer.MessagePack/Helpers/ReadOnlySequenceExtensions.cs new file mode 100644 index 00000000..08da0652 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Helpers/ReadOnlySequenceExtensions.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack.Helpers +{ + using System; + using System.Buffers; + + /// + /// Extension methods for the class + /// + public static class ReadOnlySequenceExtensions + { + /// + /// Converts a nullable ReadOnlySequence of nullable byte to a Guid + /// + /// + /// + public static Guid ToGuid(this ReadOnlySequence? sequence) + { + if (sequence == null) + { + throw new ArgumentNullException(nameof(sequence), "the sequence may not be null"); + } + + if (!sequence.HasValue) + { + throw new ArgumentException("the sequence does not have a value"); + } + + return new Guid(sequence.Value.ToArray()); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/IDeSerializer.cs b/SysML2.NET.Serializer.MessagePack/IDeSerializer.cs new file mode 100644 index 00000000..1e372c2c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/IDeSerializer.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using System.Collections.Generic; + using System.IO; + using System.Threading; + using System.Threading.Tasks; + + using SysML2.NET.Common; + + /// + /// The purpose of the is to deserialize a MessagePack to + /// an and + /// + public interface IDeSerializer + { + /// + /// Deserializes the JSON stream to an + /// + /// + /// the JSON input stream + /// + /// + /// The to use + /// + /// + /// an + /// + IEnumerable DeSerialize(Stream stream, SerializationTargetKind serializationTargetKind); + + /// + /// Asynchronously deserializes the JSON stream to an + /// + /// + /// the JSON input stream + /// + /// + /// The to use + /// + /// + /// The used to cancel the operation + /// + /// + /// an + /// + Task> DeSerializeAsync(Stream stream, SerializationTargetKind serializationTargetKind, CancellationToken cancellationToken); + } +} diff --git a/SysML2.NET.Serializer.MessagePack/ISerializer.cs b/SysML2.NET.Serializer.MessagePack/ISerializer.cs new file mode 100644 index 00000000..b585ef7e --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/ISerializer.cs @@ -0,0 +1,76 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using System.Buffers; + using System.Collections.Generic; + using System.IO; + using System.Threading; + using System.Threading.Tasks; + + using SysML2.NET.Common; + + /// + /// The purpose of the is to write an and + /// as MessagePack to a + /// + public interface ISerializer + { + /// + /// Serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target + /// + void Serialize(IEnumerable dataItems, Stream stream); + + /// + /// Serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target . + /// + /// + /// A + /// + void SerializeToBufferWriter(IEnumerable dataItems, IBufferWriter writer, CancellationToken cancellationToken = default); + + /// + /// Asynchronously serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target + /// + /// + /// The used to cancel the operation + /// + Task SerializeAsync(IEnumerable dataItems, Stream stream, CancellationToken cancellationToken); + } +} diff --git a/SysML2.NET.Serializer.MessagePack/SerializationTargetKind.cs b/SysML2.NET.Serializer.MessagePack/SerializationTargetKind.cs new file mode 100644 index 00000000..386b7e1c --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/SerializationTargetKind.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using System; + + /// + /// an enumeration that denotes what kind of serialization target shall be used + /// + [Flags] + public enum SerializationTargetKind + { + /// + /// (de)serialization to and from SysML Core concepts + /// + CORE = 0, + + /// + /// (de)serialization to and from SysML Core concepts as well as REST API concepts + /// + PSM = 1, + } +} \ No newline at end of file diff --git a/SysML2.NET.Serializer.MessagePack/Serializer.cs b/SysML2.NET.Serializer.MessagePack/Serializer.cs new file mode 100644 index 00000000..cafeda85 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/Serializer.cs @@ -0,0 +1,185 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using System; + using System.Buffers; + using System.Collections.Generic; + using System.Diagnostics; + using System.IO; + using System.Linq; + using System.Threading; + using System.Threading.Tasks; + + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Logging.Abstractions; + + using SysML2.NET.Common; + using SysML2.NET.Serializer.MessagePack.Core; + + /// + /// The purpose of the is to write an and + /// as MessagePack to a + /// + public class Serializer : SerializerBase, ISerializer + { + /// + /// The (injected) logger + /// + private readonly ILogger logger; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The (injected) used to set up logging + /// + public Serializer(ILoggerFactory loggerFactory = null) + { + this.logger = loggerFactory == null ? NullLogger.Instance : loggerFactory.CreateLogger(); + } + + /// + /// Serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target + /// + public void Serialize(IEnumerable dataItems, Stream stream) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + if (stream == null) + { + throw new ArgumentNullException(nameof(stream)); + } + + var options = this.CreateSerializerOptions(); + + var payload = dataItems.ToList().AsReadOnly().ToPayload(); + + var sw = Stopwatch.StartNew(); + + global::MessagePack.MessagePackSerializer.Serialize(stream, payload, options); + + sw.Stop(); + + this.logger.LogDebug("SerializeToStream finished in {ElapsedMilliseconds} [ms]", sw.ElapsedMilliseconds); + } + + /// + /// Serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target . + /// + /// + /// A + /// + public void SerializeToBufferWriter(IEnumerable dataItems, IBufferWriter writer, CancellationToken cancellationToken = default) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + if (writer == null) + { + throw new ArgumentNullException(nameof(writer)); + } + + var options = this.CreateSerializerOptions(); + + var payload = dataItems.ToList().AsReadOnly().ToPayload(); + + var sw = Stopwatch.StartNew(); + + global::MessagePack.MessagePackSerializer.Serialize(writer, payload, options, cancellationToken); + + sw.Stop(); + + this.logger.LogDebug("SerializeToBufferWriter finished in {ElapsedMilliseconds} [ms]", sw.ElapsedMilliseconds); + } + + /// + /// Asynchronously serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target + /// + /// + /// The used to cancel the operation + /// + public Task SerializeAsync(IEnumerable dataItems, Stream stream, CancellationToken cancellationToken) + { + if (dataItems == null) + { + throw new ArgumentNullException(nameof(dataItems)); + } + + if (stream == null) + { + throw new ArgumentNullException(nameof(stream)); + } + + return this.SerializeInternalAsync(dataItems, stream, cancellationToken); + } + + /// + /// Asynchronously serialize an as MessagePack to a target + /// + /// + /// The that shall be serialized + /// + /// + /// The target + /// + /// + /// The used to cancel the operation + /// + private async Task SerializeInternalAsync(IEnumerable dataItems, Stream stream, CancellationToken cancellationToken) + { + var options = this.CreateSerializerOptions(); + + var payload = dataItems.ToList().AsReadOnly().ToPayload(); + + var sw = Stopwatch.StartNew(); + + await global::MessagePack.MessagePackSerializer.SerializeAsync(stream, payload, options, cancellationToken); + + sw.Stop(); + + this.logger.LogDebug("SerializeInternalAsync finished in {ElapsedMilliseconds} [ms]", sw.ElapsedMilliseconds); + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/SerializerBase.cs b/SysML2.NET.Serializer.MessagePack/SerializerBase.cs new file mode 100644 index 00000000..1809570f --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/SerializerBase.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.MessagePack +{ + using global::MessagePack; + using global::MessagePack.Resolvers; + + using SysML2.NET.Serializer.MessagePack.Helpers; + + /// + /// Base class from which the Serializer and Deserializer derive + /// + public abstract class SerializerBase + { + /// + /// Creates an instance of the + /// + /// + /// An instance of + /// + protected MessagePackSerializerOptions CreateSerializerOptions() + { + var formatterResolver = CompositeResolver.Create( + DataFormatterResolver.Instance, + StandardResolver.Instance); + + var options = MessagePackSerializerOptions.Standard + .WithResolver(formatterResolver) + .WithOldSpec(false); + + return options; + } + } +} diff --git a/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj b/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj new file mode 100644 index 00000000..df4b68f9 --- /dev/null +++ b/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj @@ -0,0 +1,44 @@ + + + netstandard2.1 + 12.0 + 0.17.0 + A .NET implementation of the OMG SysML v2 MessagePack serializer. + SysML2.NET.Serializer.MessagePack + Starion Group S.A. + Copyright © Starion Group S.A. + Apache-2.0 + https://github.com/STARIONGROUP/SysML2.NET.git + Git + Sam Gerené + true + + + + cdp4-icon.png + README.md + true + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SysML2.NET.sln b/SysML2.NET.sln index 0adebfa3..b931f8c1 100644 --- a/SysML2.NET.sln +++ b/SysML2.NET.sln @@ -9,6 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SysML2.NET.CodeGenerator", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{ACF2E7D6-C673-420D-88DC-3D7D5D283AD6}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig .gitignore = .gitignore CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md coverlet.runsettings = coverlet.runsettings @@ -16,7 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution NOTICE = NOTICE Nuget.Config = Nuget.Config README.md = README.md - .editorconfig = .editorconfig EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SysML2.NET.CodeGenerator.Tests", "SysML2.NET.CodeGenerator.Tests\SysML2.NET.CodeGenerator.Tests.csproj", "{F7DCD458-E07C-42D5-8247-3A55202C90B6}" @@ -58,6 +58,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysML2.NET.Extensions", "Sy EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysML2.NET.Extensions.Tests", "SysML2.NET.Extensions.Tests\SysML2.NET.Extensions.Tests.csproj", "{69D5C7A7-9C2E-415F-949C-BB5BF2F87989}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysML2.NET.Serializer.MessagePack", "SysML2.NET.Serializer.MessagePack\SysML2.NET.Serializer.MessagePack.csproj", "{6916010A-72C8-4BF5-8BE0-624CA0C02B07}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysML2.NET.Serializer.MessagePack.Tests", "SysML2.NET.Serializer.MessagePack.Tests\SysML2.NET.Serializer.MessagePack.Tests.csproj", "{A6909F7B-D348-4F91-8E78-85605F36A628}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -128,6 +132,14 @@ Global {69D5C7A7-9C2E-415F-949C-BB5BF2F87989}.Debug|Any CPU.Build.0 = Debug|Any CPU {69D5C7A7-9C2E-415F-949C-BB5BF2F87989}.Release|Any CPU.ActiveCfg = Release|Any CPU {69D5C7A7-9C2E-415F-949C-BB5BF2F87989}.Release|Any CPU.Build.0 = Release|Any CPU + {6916010A-72C8-4BF5-8BE0-624CA0C02B07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6916010A-72C8-4BF5-8BE0-624CA0C02B07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6916010A-72C8-4BF5-8BE0-624CA0C02B07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6916010A-72C8-4BF5-8BE0-624CA0C02B07}.Release|Any CPU.Build.0 = Release|Any CPU + {A6909F7B-D348-4F91-8E78-85605F36A628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6909F7B-D348-4F91-8E78-85605F36A628}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6909F7B-D348-4F91-8E78-85605F36A628}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6909F7B-D348-4F91-8E78-85605F36A628}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE