Skip to content

Commit

Permalink
Allow late binding of derived types
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel committed Oct 21, 2024
1 parent 6c37775 commit d757f8a
Show file tree
Hide file tree
Showing 17 changed files with 364 additions and 291 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
root = true

[*]
end_of_line = crlf
insert_final_newline = true
charset = utf-8

# Code files
[*.{cs,cshtml,ts}]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public sealed partial record ArchivalParameters
{
[System.Text.Json.Serialization.JsonPropertyName("key")]
[Qowaiv.Validation.DataAnnotations.Mandatory]
public required DerivedTypes.Key Key { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("value")]
[System.ComponentModel.DataAnnotations.Required]
public required string Value { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public sealed partial record BankMailAttributes
{
[System.Text.Json.Serialization.JsonPropertyName("communicationSubject")]
[Qowaiv.Validation.DataAnnotations.Optional]
[System.ComponentModel.DataAnnotations.MinLength(1)]
[System.ComponentModel.DataAnnotations.MaxLength(256)]
public string? CommunicationSubject { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

[System.Text.Json.Serialization.JsonDerivedType(typeof(DerivedTypes.Distribution))]
public partial record Channels
{
[System.Text.Json.Serialization.JsonPropertyName("channels")]
[Qowaiv.Validation.DataAnnotations.Optional]
public DerivedTypes.Channels[][] _Channels { get; init; } = System.Array.Empty<DerivedTypes.Channels[]>();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

[System.Text.Json.Serialization.JsonDerivedType(typeof(DerivedTypes.EmailAttributes))]
[System.Text.Json.Serialization.JsonDerivedType(typeof(DerivedTypes.BankMailAttributes))]
public partial record Distribution : DerivedTypes.Channels
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public sealed partial record DocumentEnclosures
{
[System.Text.Json.Serialization.JsonPropertyName("references")]
[Qowaiv.Validation.DataAnnotations.Any]
public required string[] References { get; init; } = System.Array.Empty<string>();

[System.Text.Json.Serialization.JsonPropertyName("source")]
[Qowaiv.Validation.DataAnnotations.Mandatory]
public required DerivedTypes.Source Source { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public sealed partial record DocumentGenerationRequest
{
[System.Text.Json.Serialization.JsonPropertyName("agreementId")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string? AgreementId { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("archivalInstructions")]
[Qowaiv.Validation.DataAnnotations.Optional]
public DerivedTypes.ArchivalParameters[] ArchivalInstructions { get; init; } = System.Array.Empty<DerivedTypes.ArchivalParameters>();

[System.Text.Json.Serialization.JsonPropertyName("businessActivityId")]
[System.ComponentModel.DataAnnotations.Required]
public required string BusinessActivityId { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("distribution")]
[Qowaiv.Validation.DataAnnotations.Optional]
public DerivedTypes.Distribution? Distribution { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("documentEnclosures")]
[Qowaiv.Validation.DataAnnotations.Optional]
public DerivedTypes.DocumentEnclosures[] DocumentEnclosures { get; init; } = System.Array.Empty<DerivedTypes.DocumentEnclosures>();

[System.Text.Json.Serialization.JsonPropertyName("documentGenerationCategory")]
[System.ComponentModel.DataAnnotations.Required]
public required string DocumentGenerationCategory { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("documentGenerationType")]
[System.ComponentModel.DataAnnotations.Required]
public required string DocumentGenerationType { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("documentTitle")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string? DocumentTitle { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("languageId")]
[Qowaiv.Validation.DataAnnotations.Optional]
public DerivedTypes.LanguageId LanguageId { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("partyId")]
[System.ComponentModel.DataAnnotations.Required]
public required long PartyId { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public sealed partial record EmailAttributes
{
[System.Text.Json.Serialization.JsonPropertyName("blindCarbonCopyAddresses")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string[] BlindCarbonCopyAddresses { get; init; } = System.Array.Empty<string>();

[System.Text.Json.Serialization.JsonPropertyName("carbonCopyAddresses")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string[] CarbonCopyAddresses { get; init; } = System.Array.Empty<string>();

[System.Text.Json.Serialization.JsonPropertyName("communicationSubject")]
[Qowaiv.Validation.DataAnnotations.Optional]
[System.ComponentModel.DataAnnotations.MinLength(1)]
[System.ComponentModel.DataAnnotations.MaxLength(256)]
public string? CommunicationSubject { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("emailAddress")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string? EmailAddress { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("encloseDocuments")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string[] EncloseDocuments { get; init; } = System.Array.Empty<string>();

[System.Text.Json.Serialization.JsonPropertyName("senderEmailAddress")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string? SenderEmailAddress { get; init; }

[System.Text.Json.Serialization.JsonPropertyName("senderLegalName")]
[Qowaiv.Validation.DataAnnotations.Optional]
public string? SenderLegalName { get; init; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public enum Key
{
[System.Runtime.Serialization.EnumMember(Value = null)]
None = 0,

[System.Runtime.Serialization.EnumMember(Value = "ARCHIVE_DOCUMENT_TYPE")]
ARCHIVE_DOCUMENT_TYPE,

[System.Runtime.Serialization.EnumMember(Value = "ARCHIVE_LABEL")]
ARCHIVE_LABEL,

[System.Runtime.Serialization.EnumMember(Value = "ARCHIVE_SERIAL_NUMBER")]
ARCHIVE_SERIAL_NUMBER,

[System.Runtime.Serialization.EnumMember(Value = "ARCHIVE_SOURCE_NAME")]
ARCHIVE_SOURCE_NAME,

[System.Runtime.Serialization.EnumMember(Value = "ARCHIVE_DATE")]
ARCHIVE_DATE,

[System.Runtime.Serialization.EnumMember(Value = "DOCUMENT_TYPE")]
DOCUMENT_TYPE,

[System.Runtime.Serialization.EnumMember(Value = "DOCUMENT_SUB_TYPE")]
DOCUMENT_SUB_TYPE,

[System.Runtime.Serialization.EnumMember(Value = "ADD_TO_DOSSIER")]
ADD_TO_DOSSIER,

[System.Runtime.Serialization.EnumMember(Value = "DOCUMENT_DOSSIER_REFERENCE")]
DOCUMENT_DOSSIER_REFERENCE,

[System.Runtime.Serialization.EnumMember(Value = "ALTERNATE_DOCUMENT_TYPE")]
ALTERNATE_DOCUMENT_TYPE,

[System.Runtime.Serialization.EnumMember(Value = "SECURITY_CLASSIFIER")]
SECURITY_CLASSIFIER,

[System.Runtime.Serialization.EnumMember(Value = "RELATED_ENTITY")]
RELATED_ENTITY,

[System.Runtime.Serialization.EnumMember(Value = "SCOPE")]
SCOPE
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public enum LanguageId
{
[System.Runtime.Serialization.EnumMember(Value = null)]
None = 0,

[System.Runtime.Serialization.EnumMember(Value = "NL")]
NL,

[System.Runtime.Serialization.EnumMember(Value = "EN")]
EN
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#nullable enable

namespace DerivedTypes;

public enum Source
{
[System.Runtime.Serialization.EnumMember(Value = null)]
None = 0,

[System.Runtime.Serialization.EnumMember(Value = "SCRIPTURA_STORE")]
SCRIPTURA_STORE,

[System.Runtime.Serialization.EnumMember(Value = "EARCHIVE")]
EARCHIVE,

[System.Runtime.Serialization.EnumMember(Value = "BASE")]
BASE,

[System.Runtime.Serialization.EnumMember(Value = "DOCHUB6")]
DOCHUB6,

[System.Runtime.Serialization.EnumMember(Value = "DAM")]
DAM
}
Loading

0 comments on commit d757f8a

Please sign in to comment.