-
Notifications
You must be signed in to change notification settings - Fork 46
/
FhirPrimitive.cs
105 lines (99 loc) · 3.57 KB
/
FhirPrimitive.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// <copyright file="FhirPrimitive.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// </copyright>
using System;
using System.Collections.Generic;
using System.Text;
namespace Microsoft.Health.Fhir.CodeGenCommon.Models;
/// <summary>A class representing a FHIR primitive (r2:simple) type.</summary>
public class FhirPrimitive : FhirModelBase, ICloneable
{
/// <summary>Initializes a new instance of the <see cref="FhirPrimitive"/> class.</summary>
/// <param name="id"> The identifier.</param>
/// <param name="name"> Name of this FHIR primitive.</param>
/// <param name="baseTypeName"> The base type name for this primitive type.</param>
/// <param name="version"> Version of this definition.</param>
/// <param name="url"> URL of the resource.</param>
/// <param name="publicationStatus">The publication status.</param>
/// <param name="standardStatus"> The standard status.</param>
/// <param name="fmmLevel"> The FHIR Maturity Model level.</param>
/// <param name="isExperimental"> If this primitive type is marked experimental.</param>
/// <param name="shortDescription">Information describing the short.</param>
/// <param name="purpose"> The purpose of this definition.</param>
/// <param name="comment"> The comment.</param>
/// <param name="validationRegEx"> The validation RegEx.</param>
public FhirPrimitive(
string id,
string name,
string baseTypeName,
string baseTypeCanonical,
string version,
Uri url,
string publicationStatus,
string standardStatus,
int? fmmLevel,
bool isExperimental,
string shortDescription,
string purpose,
string comment,
string validationRegEx,
string narrative,
string narrativeStatus,
string fhirVersion)
: base(
FhirArtifactClassEnum.PrimitiveType,
id,
name,
name,
baseTypeName,
baseTypeCanonical,
version,
url,
publicationStatus,
standardStatus,
fmmLevel,
isExperimental,
shortDescription,
purpose,
comment,
validationRegEx,
narrative,
narrativeStatus,
fhirVersion)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="FhirPrimitive"/> class.
/// </summary>
/// <param name="source">Source for the.</param>
public FhirPrimitive(FhirPrimitive source)
: this(
source.Id,
source.Name,
source.BaseTypeName,
source.BaseTypeCanonical,
source.Version,
source.URL,
source.PublicationStatus,
source.StandardStatus,
source.FhirMaturityLevel,
source.IsExperimental,
source.ShortDescription,
source.Purpose,
source.Comment,
source.ValidationRegEx,
source.NarrativeText,
source.NarrativeStatus,
source.FhirVersion)
{
}
/// <summary>Deep copy.</summary>
/// <returns>A FhirPrimitive.</returns>
public object Clone()
{
// generate the base object
FhirPrimitive primitive = new FhirPrimitive(this);
return primitive;
}
}