1#[doc = "An abstract server used in operations within this test script in the origin element."]
3#[derive(Debug, Clone, PartialEq)]
4pub struct TestScriptOrigin {
5 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
6 pub r#id: Option<std::string::String>,
7 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
8 pub r#extension: Vec<super::super::types::Extension>,
9 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
10 pub r#modifier_extension: Vec<super::super::types::Extension>,
11 #[doc = "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1."]
12 pub r#index: super::super::types::Integer,
13 #[doc = "The type of origin profile the test system supports."]
14 pub r#profile: Box<super::super::types::Coding>,
15}
16#[allow(clippy::derivable_impls)]
17impl Default for TestScriptOrigin {
18 fn default() -> Self {
19 Self {
20 r#id: Default::default(),
21 r#extension: Default::default(),
22 r#modifier_extension: Default::default(),
23 r#index: super::super::types::Integer {
24 id: Some("$invalid".to_string()),
25 ..Default::default()
26 },
27 r#profile: Box::new(super::super::types::Coding {
28 id: Some("$invalid".to_string()),
29 ..Default::default()
30 }),
31 }
32 }
33}
34#[doc = "An abstract server used in operations within this test script in the destination element."]
35#[derive(Debug, Clone, PartialEq)]
36pub struct TestScriptDestination {
37 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
38 pub r#id: Option<std::string::String>,
39 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
40 pub r#extension: Vec<super::super::types::Extension>,
41 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
42 pub r#modifier_extension: Vec<super::super::types::Extension>,
43 #[doc = "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1."]
44 pub r#index: super::super::types::Integer,
45 #[doc = "The type of destination profile the test system supports."]
46 pub r#profile: Box<super::super::types::Coding>,
47}
48#[allow(clippy::derivable_impls)]
49impl Default for TestScriptDestination {
50 fn default() -> Self {
51 Self {
52 r#id: Default::default(),
53 r#extension: Default::default(),
54 r#modifier_extension: Default::default(),
55 r#index: super::super::types::Integer {
56 id: Some("$invalid".to_string()),
57 ..Default::default()
58 },
59 r#profile: Box::new(super::super::types::Coding {
60 id: Some("$invalid".to_string()),
61 ..Default::default()
62 }),
63 }
64 }
65}
66#[doc = "A link to the FHIR specification that this test is covering."]
67#[derive(Debug, Clone, PartialEq)]
68pub struct TestScriptMetadataLink {
69 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
70 pub r#id: Option<std::string::String>,
71 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
72 pub r#extension: Vec<super::super::types::Extension>,
73 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
74 pub r#modifier_extension: Vec<super::super::types::Extension>,
75 #[doc = "URL to a particular requirement or feature within the FHIR specification."]
76 pub r#url: super::super::types::Uri,
77 #[doc = "Short description of the link."]
78 pub r#description: Option<super::super::types::String>,
79}
80#[allow(clippy::derivable_impls)]
81impl Default for TestScriptMetadataLink {
82 fn default() -> Self {
83 Self {
84 r#id: Default::default(),
85 r#extension: Default::default(),
86 r#modifier_extension: Default::default(),
87 r#url: super::super::types::Uri {
88 id: Some("$invalid".to_string()),
89 ..Default::default()
90 },
91 r#description: Default::default(),
92 }
93 }
94}
95#[doc = "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."]
96#[derive(Debug, Clone, PartialEq)]
97pub struct TestScriptMetadataCapability {
98 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
99 pub r#id: Option<std::string::String>,
100 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
101 pub r#extension: Vec<super::super::types::Extension>,
102 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
103 pub r#modifier_extension: Vec<super::super::types::Extension>,
104 #[doc = "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute."]
105 pub r#required: super::super::types::Boolean,
106 #[doc = "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute."]
107 pub r#validated: super::super::types::Boolean,
108 #[doc = "Description of the capabilities that this test script is requiring the server to support."]
109 pub r#description: Option<super::super::types::String>,
110 #[doc = "Which origin server these requirements apply to."]
111 pub r#origin: Vec<super::super::types::Integer>,
112 #[doc = "Which server these requirements apply to."]
113 pub r#destination: Option<super::super::types::Integer>,
114 #[doc = "Links to the FHIR specification that describes this interaction and the resources involved in more detail."]
115 pub r#link: Vec<super::super::types::Uri>,
116 #[doc = "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped."]
117 pub r#capabilities: super::super::types::Canonical,
118}
119#[allow(clippy::derivable_impls)]
120impl Default for TestScriptMetadataCapability {
121 fn default() -> Self {
122 Self {
123 r#id: Default::default(),
124 r#extension: Default::default(),
125 r#modifier_extension: Default::default(),
126 r#required: super::super::types::Boolean {
127 id: Some("$invalid".to_string()),
128 ..Default::default()
129 },
130 r#validated: super::super::types::Boolean {
131 id: Some("$invalid".to_string()),
132 ..Default::default()
133 },
134 r#description: Default::default(),
135 r#origin: Default::default(),
136 r#destination: Default::default(),
137 r#link: Default::default(),
138 r#capabilities: super::super::types::Canonical {
139 id: Some("$invalid".to_string()),
140 ..Default::default()
141 },
142 }
143 }
144}
145#[doc = "The required capability must exist and are assumed to function correctly on the FHIR server being tested."]
146#[derive(Debug, Clone, PartialEq)]
147pub struct TestScriptMetadata {
148 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
149 pub r#id: Option<std::string::String>,
150 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
151 pub r#extension: Vec<super::super::types::Extension>,
152 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
153 pub r#modifier_extension: Vec<super::super::types::Extension>,
154 #[doc = "A link to the FHIR specification that this test is covering."]
155 pub r#link: Vec<TestScriptMetadataLink>,
156 #[doc = "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested."]
157 pub r#capability: Vec<TestScriptMetadataCapability>,
158}
159#[allow(clippy::derivable_impls)]
160impl Default for TestScriptMetadata {
161 fn default() -> Self {
162 Self {
163 r#id: Default::default(),
164 r#extension: Default::default(),
165 r#modifier_extension: Default::default(),
166 r#link: Default::default(),
167 r#capability: Default::default(),
168 }
169 }
170}
171#[doc = "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute."]
172#[derive(Debug, Clone, PartialEq)]
173pub struct TestScriptFixture {
174 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
175 pub r#id: Option<std::string::String>,
176 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
177 pub r#extension: Vec<super::super::types::Extension>,
178 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
179 pub r#modifier_extension: Vec<super::super::types::Extension>,
180 #[doc = "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section."]
181 pub r#autocreate: super::super::types::Boolean,
182 #[doc = "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section."]
183 pub r#autodelete: super::super::types::Boolean,
184 #[doc = "Reference to the resource (containing the contents of the resource needed for operations)."]
185 pub r#resource: Option<Box<super::super::types::Reference>>,
186}
187#[allow(clippy::derivable_impls)]
188impl Default for TestScriptFixture {
189 fn default() -> Self {
190 Self {
191 r#id: Default::default(),
192 r#extension: Default::default(),
193 r#modifier_extension: Default::default(),
194 r#autocreate: super::super::types::Boolean {
195 id: Some("$invalid".to_string()),
196 ..Default::default()
197 },
198 r#autodelete: super::super::types::Boolean {
199 id: Some("$invalid".to_string()),
200 ..Default::default()
201 },
202 r#resource: Default::default(),
203 }
204 }
205}
206#[doc = "Variable is set based either on element value in response body or on header field value in the response headers."]
207#[derive(Debug, Clone, PartialEq)]
208pub struct TestScriptVariable {
209 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
210 pub r#id: Option<std::string::String>,
211 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
212 pub r#extension: Vec<super::super::types::Extension>,
213 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
214 pub r#modifier_extension: Vec<super::super::types::Extension>,
215 #[doc = "Descriptive name for this variable."]
216 pub r#name: super::super::types::String,
217 #[doc = "A default, hard-coded, or user-defined value for this variable."]
218 pub r#default_value: Option<super::super::types::String>,
219 #[doc = "A free text natural language description of the variable and its purpose."]
220 pub r#description: Option<super::super::types::String>,
221 #[doc = "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified."]
222 pub r#expression: Option<super::super::types::String>,
223 #[doc = "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to."]
224 pub r#header_field: Option<super::super::types::String>,
225 #[doc = "Displayable text string with hint help information to the user when entering a default value."]
226 pub r#hint: Option<super::super::types::String>,
227 #[doc = "XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified."]
228 pub r#path: Option<super::super::types::String>,
229 #[doc = "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable."]
230 pub r#source_id: Option<super::super::types::Id>,
231}
232#[allow(clippy::derivable_impls)]
233impl Default for TestScriptVariable {
234 fn default() -> Self {
235 Self {
236 r#id: Default::default(),
237 r#extension: Default::default(),
238 r#modifier_extension: Default::default(),
239 r#name: super::super::types::String {
240 id: Some("$invalid".to_string()),
241 ..Default::default()
242 },
243 r#default_value: Default::default(),
244 r#description: Default::default(),
245 r#expression: Default::default(),
246 r#header_field: Default::default(),
247 r#hint: Default::default(),
248 r#path: Default::default(),
249 r#source_id: Default::default(),
250 }
251 }
252}
253#[doc = "Header elements would be used to set HTTP headers."]
254#[derive(Debug, Clone, PartialEq)]
255pub struct TestScriptSetupActionOperationRequestHeader {
256 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
257 pub r#id: Option<std::string::String>,
258 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
259 pub r#extension: Vec<super::super::types::Extension>,
260 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
261 pub r#modifier_extension: Vec<super::super::types::Extension>,
262 #[doc = "The HTTP header field e.g. \"Accept\"."]
263 pub r#field: super::super::types::String,
264 #[doc = "The value of the header e.g. \"application/fhir+xml\"."]
265 pub r#value: super::super::types::String,
266}
267#[allow(clippy::derivable_impls)]
268impl Default for TestScriptSetupActionOperationRequestHeader {
269 fn default() -> Self {
270 Self {
271 r#id: Default::default(),
272 r#extension: Default::default(),
273 r#modifier_extension: Default::default(),
274 r#field: super::super::types::String {
275 id: Some("$invalid".to_string()),
276 ..Default::default()
277 },
278 r#value: super::super::types::String {
279 id: Some("$invalid".to_string()),
280 ..Default::default()
281 },
282 }
283 }
284}
285#[doc = "The operation to perform."]
286#[derive(Debug, Clone, PartialEq)]
287pub struct TestScriptSetupActionOperation {
288 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
289 pub r#id: Option<std::string::String>,
290 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
291 pub r#extension: Vec<super::super::types::Extension>,
292 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
293 pub r#modifier_extension: Vec<super::super::types::Extension>,
294 #[doc = "Server interaction or operation type."]
295 pub r#type: Option<Box<super::super::types::Coding>>,
296 #[doc = "The type of the resource. See <http://build.fhir.org/resourcelist.html>."]
297 pub r#resource: Option<super::super::types::Code>,
298 #[doc = "The label would be used for tracking/logging purposes by test engines."]
299 pub r#label: Option<super::super::types::String>,
300 #[doc = "The description would be used by test engines for tracking and reporting purposes."]
301 pub r#description: Option<super::super::types::String>,
302 #[doc = "The mime-type to use for RESTful operation in the 'Accept' header."]
303 pub r#accept: Option<super::super::types::Code>,
304 #[doc = "The mime-type to use for RESTful operation in the 'Content-Type' header."]
305 pub r#content_type: Option<super::super::types::Code>,
306 #[doc = "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section."]
307 pub r#destination: Option<super::super::types::Integer>,
308 #[doc = "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths."]
309 pub r#encode_request_url: super::super::types::Boolean,
310 #[doc = "The HTTP method the test engine MUST use for this operation regardless of any other operation details."]
311 pub r#method: Option<super::super::types::Code>,
312 #[doc = "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section."]
313 pub r#origin: Option<super::super::types::Integer>,
314 #[doc = "Path plus parameters after `type`. Used to set parts of the request URL explicitly."]
315 pub r#params: Option<super::super::types::String>,
316 #[doc = "Header elements would be used to set HTTP headers."]
317 pub r#request_header: Vec<TestScriptSetupActionOperationRequestHeader>,
318 #[doc = "The fixture id (maybe new) to map to the request."]
319 pub r#request_id: Option<super::super::types::Id>,
320 #[doc = "The fixture id (maybe new) to map to the response."]
321 pub r#response_id: Option<super::super::types::Id>,
322 #[doc = "The id of the fixture used as the body of a PUT or POST request."]
323 pub r#source_id: Option<super::super::types::Id>,
324 #[doc = "Id of fixture used for extracting the `id`, `type`, and `vid` for GET requests."]
325 pub r#target_id: Option<super::super::types::Id>,
326 #[doc = "Complete request URL."]
327 pub r#url: Option<super::super::types::String>,
328}
329#[allow(clippy::derivable_impls)]
330impl Default for TestScriptSetupActionOperation {
331 fn default() -> Self {
332 Self {
333 r#id: Default::default(),
334 r#extension: Default::default(),
335 r#modifier_extension: Default::default(),
336 r#type: Default::default(),
337 r#resource: Default::default(),
338 r#label: Default::default(),
339 r#description: Default::default(),
340 r#accept: Default::default(),
341 r#content_type: Default::default(),
342 r#destination: Default::default(),
343 r#encode_request_url: super::super::types::Boolean {
344 id: Some("$invalid".to_string()),
345 ..Default::default()
346 },
347 r#method: Default::default(),
348 r#origin: Default::default(),
349 r#params: Default::default(),
350 r#request_header: Default::default(),
351 r#request_id: Default::default(),
352 r#response_id: Default::default(),
353 r#source_id: Default::default(),
354 r#target_id: Default::default(),
355 r#url: Default::default(),
356 }
357 }
358}
359#[doc = "Evaluates the results of previous operations to determine if the server under test behaves appropriately."]
360#[derive(Debug, Clone, PartialEq)]
361pub struct TestScriptSetupActionAssert {
362 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
363 pub r#id: Option<std::string::String>,
364 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
365 pub r#extension: Vec<super::super::types::Extension>,
366 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
367 pub r#modifier_extension: Vec<super::super::types::Extension>,
368 #[doc = "The label would be used for tracking/logging purposes by test engines."]
369 pub r#label: Option<super::super::types::String>,
370 #[doc = "The description would be used by test engines for tracking and reporting purposes."]
371 pub r#description: Option<super::super::types::String>,
372 #[doc = "The direction to use for the assertion."]
373 pub r#direction: Option<super::super::types::Code>,
374 #[doc = "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition."]
375 pub r#compare_to_source_id: Option<super::super::types::String>,
376 #[doc = "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both."]
377 pub r#compare_to_source_expression: Option<super::super::types::String>,
378 #[doc = "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both."]
379 pub r#compare_to_source_path: Option<super::super::types::String>,
380 #[doc = "The mime-type contents to compare against the request or response message 'Content-Type' header."]
381 pub r#content_type: Option<super::super::types::Code>,
382 #[doc = "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload."]
383 pub r#expression: Option<super::super::types::String>,
384 #[doc = "The HTTP header field name e.g. 'Location'."]
385 pub r#header_field: Option<super::super::types::String>,
386 #[doc = "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId."]
387 pub r#minimum_id: Option<super::super::types::String>,
388 #[doc = "Whether or not the test execution performs validation on the bundle navigation links."]
389 pub r#navigation_links: Option<super::super::types::Boolean>,
390 #[doc = "The operator type defines the conditional behavior of the assert. If not defined, the default is equals."]
391 pub r#operator: Option<super::super::types::Code>,
392 #[doc = "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server."]
393 pub r#path: Option<super::super::types::String>,
394 #[doc = "The request method or HTTP operation code to compare against that used by the client system under test."]
395 pub r#request_method: Option<super::super::types::Code>,
396 #[doc = "The value to use in a comparison against the request URL path string."]
397 pub r#request_url: Option<super::super::types::String>,
398 #[doc = "The type of the resource. See <http://build.fhir.org/resourcelist.html>."]
399 pub r#resource: Option<super::super::types::Code>,
400 #[doc = "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable."]
401 pub r#response: Option<super::super::types::Code>,
402 #[doc = "The value of the HTTP response code to be tested."]
403 pub r#response_code: Option<super::super::types::String>,
404 #[doc = "Fixture to evaluate the XPath/JSONPath expression or the headerField against."]
405 pub r#source_id: Option<super::super::types::Id>,
406 #[doc = "The ID of the Profile to validate against."]
407 pub r#validate_profile_id: Option<super::super::types::Id>,
408 #[doc = "The value to compare to."]
409 pub r#value: Option<super::super::types::String>,
410 #[doc = "Whether or not the test execution will produce a warning only on error for this assert."]
411 pub r#warning_only: super::super::types::Boolean,
412}
413#[allow(clippy::derivable_impls)]
414impl Default for TestScriptSetupActionAssert {
415 fn default() -> Self {
416 Self {
417 r#id: Default::default(),
418 r#extension: Default::default(),
419 r#modifier_extension: Default::default(),
420 r#label: Default::default(),
421 r#description: Default::default(),
422 r#direction: Default::default(),
423 r#compare_to_source_id: Default::default(),
424 r#compare_to_source_expression: Default::default(),
425 r#compare_to_source_path: Default::default(),
426 r#content_type: Default::default(),
427 r#expression: Default::default(),
428 r#header_field: Default::default(),
429 r#minimum_id: Default::default(),
430 r#navigation_links: Default::default(),
431 r#operator: Default::default(),
432 r#path: Default::default(),
433 r#request_method: Default::default(),
434 r#request_url: Default::default(),
435 r#resource: Default::default(),
436 r#response: Default::default(),
437 r#response_code: Default::default(),
438 r#source_id: Default::default(),
439 r#validate_profile_id: Default::default(),
440 r#value: Default::default(),
441 r#warning_only: super::super::types::Boolean {
442 id: Some("$invalid".to_string()),
443 ..Default::default()
444 },
445 }
446 }
447}
448#[doc = "Action would contain either an operation or an assertion."]
449#[derive(Debug, Clone, PartialEq)]
450pub struct TestScriptSetupAction {
451 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
452 pub r#id: Option<std::string::String>,
453 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
454 pub r#extension: Vec<super::super::types::Extension>,
455 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
456 pub r#modifier_extension: Vec<super::super::types::Extension>,
457 #[doc = "The operation to perform."]
458 pub r#operation: Option<TestScriptSetupActionOperation>,
459 #[doc = "Evaluates the results of previous operations to determine if the server under test behaves appropriately."]
460 pub r#assert: Option<TestScriptSetupActionAssert>,
461}
462#[allow(clippy::derivable_impls)]
463impl Default for TestScriptSetupAction {
464 fn default() -> Self {
465 Self {
466 r#id: Default::default(),
467 r#extension: Default::default(),
468 r#modifier_extension: Default::default(),
469 r#operation: Default::default(),
470 r#assert: Default::default(),
471 }
472 }
473}
474#[doc = "A series of required setup operations before tests are executed."]
475#[derive(Debug, Clone, PartialEq)]
476pub struct TestScriptSetup {
477 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
478 pub r#id: Option<std::string::String>,
479 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
480 pub r#extension: Vec<super::super::types::Extension>,
481 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
482 pub r#modifier_extension: Vec<super::super::types::Extension>,
483 #[doc = "Action would contain either an operation or an assertion."]
484 pub r#action: Vec<TestScriptSetupAction>,
485}
486#[allow(clippy::derivable_impls)]
487impl Default for TestScriptSetup {
488 fn default() -> Self {
489 Self {
490 r#id: Default::default(),
491 r#extension: Default::default(),
492 r#modifier_extension: Default::default(),
493 r#action: Default::default(),
494 }
495 }
496}
497#[doc = "Action would contain either an operation or an assertion."]
498#[derive(Debug, Clone, PartialEq)]
499pub struct TestScriptTestAction {
500 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
501 pub r#id: Option<std::string::String>,
502 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
503 pub r#extension: Vec<super::super::types::Extension>,
504 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
505 pub r#modifier_extension: Vec<super::super::types::Extension>,
506 #[doc = "An operation would involve a REST request to a server."]
507 pub r#operation: Option<TestScriptSetupActionOperation>,
508 #[doc = "Evaluates the results of previous operations to determine if the server under test behaves appropriately."]
509 pub r#assert: Option<TestScriptSetupActionAssert>,
510}
511#[allow(clippy::derivable_impls)]
512impl Default for TestScriptTestAction {
513 fn default() -> Self {
514 Self {
515 r#id: Default::default(),
516 r#extension: Default::default(),
517 r#modifier_extension: Default::default(),
518 r#operation: Default::default(),
519 r#assert: Default::default(),
520 }
521 }
522}
523#[doc = "A test in this script."]
524#[derive(Debug, Clone, PartialEq)]
525pub struct TestScriptTest {
526 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
527 pub r#id: Option<std::string::String>,
528 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
529 pub r#extension: Vec<super::super::types::Extension>,
530 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
531 pub r#modifier_extension: Vec<super::super::types::Extension>,
532 #[doc = "The name of this test used for tracking/logging purposes by test engines."]
533 pub r#name: Option<super::super::types::String>,
534 #[doc = "A short description of the test used by test engines for tracking and reporting purposes."]
535 pub r#description: Option<super::super::types::String>,
536 #[doc = "Action would contain either an operation or an assertion."]
537 pub r#action: Vec<TestScriptTestAction>,
538}
539#[allow(clippy::derivable_impls)]
540impl Default for TestScriptTest {
541 fn default() -> Self {
542 Self {
543 r#id: Default::default(),
544 r#extension: Default::default(),
545 r#modifier_extension: Default::default(),
546 r#name: Default::default(),
547 r#description: Default::default(),
548 r#action: Default::default(),
549 }
550 }
551}
552#[doc = "The teardown action will only contain an operation."]
553#[derive(Debug, Clone, PartialEq)]
554pub struct TestScriptTeardownAction {
555 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
556 pub r#id: Option<std::string::String>,
557 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
558 pub r#extension: Vec<super::super::types::Extension>,
559 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
560 pub r#modifier_extension: Vec<super::super::types::Extension>,
561 #[doc = "An operation would involve a REST request to a server."]
562 pub r#operation: TestScriptSetupActionOperation,
563}
564#[allow(clippy::derivable_impls)]
565impl Default for TestScriptTeardownAction {
566 fn default() -> Self {
567 Self {
568 r#id: Default::default(),
569 r#extension: Default::default(),
570 r#modifier_extension: Default::default(),
571 r#operation: TestScriptSetupActionOperation {
572 id: Some("$invalid".to_string()),
573 ..Default::default()
574 },
575 }
576 }
577}
578#[doc = "A series of operations required to clean up after all the tests are executed (successfully or otherwise)."]
579#[derive(Debug, Clone, PartialEq)]
580pub struct TestScriptTeardown {
581 #[doc = "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."]
582 pub r#id: Option<std::string::String>,
583 #[doc = "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
584 pub r#extension: Vec<super::super::types::Extension>,
585 #[doc = "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
586 pub r#modifier_extension: Vec<super::super::types::Extension>,
587 #[doc = "The teardown action will only contain an operation."]
588 pub r#action: Vec<TestScriptTeardownAction>,
589}
590#[allow(clippy::derivable_impls)]
591impl Default for TestScriptTeardown {
592 fn default() -> Self {
593 Self {
594 r#id: Default::default(),
595 r#extension: Default::default(),
596 r#modifier_extension: Default::default(),
597 r#action: Default::default(),
598 }
599 }
600}
601#[doc = "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification."]
602#[derive(Debug, Clone, PartialEq)]
603pub struct TestScript {
604 #[doc = "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."]
605 pub r#id: Option<super::super::types::Id>,
606 #[doc = "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."]
607 pub r#meta: Option<Box<super::super::types::Meta>>,
608 #[doc = "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."]
609 pub r#implicit_rules: Option<super::super::types::Uri>,
610 #[doc = "The base language in which the resource is written."]
611 pub r#language: Option<super::super::types::Code>,
612 #[doc = "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."]
613 pub r#text: Option<Box<super::super::types::Narrative>>,
614 #[doc = "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."]
615 pub r#contained: Vec<super::super::Resource>,
616 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."]
617 pub r#extension: Vec<super::super::types::Extension>,
618 #[doc = "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."]
619 pub r#modifier_extension: Vec<super::super::types::Extension>,
620 #[doc = "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers."]
621 pub r#url: super::super::types::Uri,
622 #[doc = "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance."]
623 pub r#identifier: Option<Box<super::super::types::Identifier>>,
624 #[doc = "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence."]
625 pub r#version: Option<super::super::types::String>,
626 #[doc = "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation."]
627 pub r#name: super::super::types::String,
628 #[doc = "A short, descriptive, user-friendly title for the test script."]
629 pub r#title: Option<super::super::types::String>,
630 #[doc = "The status of this test script. Enables tracking the life-cycle of the content."]
631 pub r#status: super::super::types::Code,
632 #[doc = "A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage."]
633 pub r#experimental: Option<super::super::types::Boolean>,
634 #[doc = "The date (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes."]
635 pub r#date: Option<super::super::types::DateTime>,
636 #[doc = "The name of the organization or individual that published the test script."]
637 pub r#publisher: Option<super::super::types::String>,
638 #[doc = "Contact details to assist a user in finding and communicating with the publisher."]
639 pub r#contact: Vec<super::super::types::ContactDetail>,
640 #[doc = "A free text natural language description of the test script from a consumer's perspective."]
641 pub r#description: Option<super::super::types::Markdown>,
642 #[doc = "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances."]
643 pub r#use_context: Vec<super::super::types::UsageContext>,
644 #[doc = "A legal or geographic region in which the test script is intended to be used."]
645 pub r#jurisdiction: Vec<super::super::types::CodeableConcept>,
646 #[doc = "Explanation of why this test script is needed and why it has been designed as it has."]
647 pub r#purpose: Option<super::super::types::Markdown>,
648 #[doc = "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script."]
649 pub r#copyright: Option<super::super::types::Markdown>,
650 #[doc = "An abstract server used in operations within this test script in the origin element."]
651 pub r#origin: Vec<TestScriptOrigin>,
652 #[doc = "An abstract server used in operations within this test script in the destination element."]
653 pub r#destination: Vec<TestScriptDestination>,
654 #[doc = "The required capability must exist and are assumed to function correctly on the FHIR server being tested."]
655 pub r#metadata: Option<TestScriptMetadata>,
656 #[doc = "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute."]
657 pub r#fixture: Vec<TestScriptFixture>,
658 #[doc = "Reference to the profile to be used for validation."]
659 pub r#profile: Vec<super::super::types::Reference>,
660 #[doc = "Variable is set based either on element value in response body or on header field value in the response headers."]
661 pub r#variable: Vec<TestScriptVariable>,
662 #[doc = "A series of required setup operations before tests are executed."]
663 pub r#setup: Option<TestScriptSetup>,
664 #[doc = "A test in this script."]
665 pub r#test: Vec<TestScriptTest>,
666 #[doc = "A series of operations required to clean up after all the tests are executed (successfully or otherwise)."]
667 pub r#teardown: Option<TestScriptTeardown>,
668}
669#[allow(clippy::derivable_impls)]
670impl Default for TestScript {
671 fn default() -> Self {
672 Self {
673 r#id: Default::default(),
674 r#meta: Default::default(),
675 r#implicit_rules: Default::default(),
676 r#language: Default::default(),
677 r#text: Default::default(),
678 r#contained: Default::default(),
679 r#extension: Default::default(),
680 r#modifier_extension: Default::default(),
681 r#url: super::super::types::Uri {
682 id: Some("$invalid".to_string()),
683 ..Default::default()
684 },
685 r#identifier: Default::default(),
686 r#version: Default::default(),
687 r#name: super::super::types::String {
688 id: Some("$invalid".to_string()),
689 ..Default::default()
690 },
691 r#title: Default::default(),
692 r#status: super::super::types::Code {
693 id: Some("$invalid".to_string()),
694 ..Default::default()
695 },
696 r#experimental: Default::default(),
697 r#date: Default::default(),
698 r#publisher: Default::default(),
699 r#contact: Default::default(),
700 r#description: Default::default(),
701 r#use_context: Default::default(),
702 r#jurisdiction: Default::default(),
703 r#purpose: Default::default(),
704 r#copyright: Default::default(),
705 r#origin: Default::default(),
706 r#destination: Default::default(),
707 r#metadata: Default::default(),
708 r#fixture: Default::default(),
709 r#profile: Default::default(),
710 r#variable: Default::default(),
711 r#setup: Default::default(),
712 r#test: Default::default(),
713 r#teardown: Default::default(),
714 }
715 }
716}