komodo_client 2.1.0

Client for the Komodo build and deployment system
Documentation
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
use std::collections::HashMap;

use serde::{Deserialize, Serialize};
use typeshare::typeshare;

use crate::entities::{
  docker::{
    config::SwarmConfigListItem, container::ContainerListItem,
    image::ImageListItem, network::NetworkListItem,
    node::SwarmNodeListItem, secret::SwarmSecretListItem,
    service::SwarmServiceListItem, stack::SwarmStackListItem,
    task::SwarmTaskListItem, volume::VolumeListItem,
  },
  stack::ComposeProject,
};

use super::{I64, U64};

pub mod config;
pub mod container;
pub mod image;
pub mod network;
pub mod node;
pub mod secret;
pub mod service;
pub mod stack;
pub mod stats;
pub mod swarm;
pub mod task;
pub mod volume;

/// Swarm lists available from a manager node.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SwarmLists {
  pub nodes: Vec<SwarmNodeListItem>,
  pub stacks: Vec<SwarmStackListItem>,
  pub services: Vec<SwarmServiceListItem>,
  pub tasks: Vec<SwarmTaskListItem>,
  pub configs: Vec<SwarmConfigListItem>,
  pub secrets: Vec<SwarmSecretListItem>,
}

/// Standard docker lists available from a Server.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct DockerLists {
  pub containers: Vec<ContainerListItem>,
  pub networks: Vec<NetworkListItem>,
  pub images: Vec<ImageListItem>,
  pub volumes: Vec<VolumeListItem>,
  pub projects: Vec<ComposeProject>,
}

/// PortBinding represents a binding between a host IP address and a host port.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct PortBinding {
  /// Host IP address that the container's port is mapped to.
  #[serde(rename = "HostIp")]
  pub host_ip: Option<String>,

  /// Host port number that the container's port is mapped to.
  #[serde(rename = "HostPort")]
  pub host_port: Option<String>,
}

/// Information about the storage driver used to store the container's and image's filesystem.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct GraphDriverData {
  /// Name of the storage driver.
  #[serde(default, rename = "Name")]
  pub name: String,
  /// Low-level storage metadata, provided as key/value pairs.  This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only.
  #[serde(default, rename = "Data")]
  pub data: HashMap<String, String>,
}

/// Configuration for a container that is portable between hosts.  When used as `ContainerConfig` field in an image, `ContainerConfig` is an optional field containing the configuration of the container that was last committed when creating the image.  Previous versions of Docker builder used this field to store build cache, and it is not in active use anymore.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ContainerConfig {
  /// The hostname to use for the container, as a valid RFC 1123 hostname.
  #[serde(rename = "Hostname")]
  pub hostname: Option<String>,

  /// The domain name to use for the container.
  #[serde(rename = "Domainname")]
  pub domainname: Option<String>,

  /// The user that commands are run as inside the container.
  #[serde(rename = "User")]
  pub user: Option<String>,

  /// Whether to attach to `stdin`.
  #[serde(rename = "AttachStdin")]
  pub attach_stdin: Option<bool>,

  /// Whether to attach to `stdout`.
  #[serde(rename = "AttachStdout")]
  pub attach_stdout: Option<bool>,

  /// Whether to attach to `stderr`.
  #[serde(rename = "AttachStderr")]
  pub attach_stderr: Option<bool>,

  /// An object mapping ports to an empty object in the form:  `{\"<port>/<tcp|udp|sctp>\": {}}`
  #[serde(default, rename = "ExposedPorts")]
  pub exposed_ports: Vec<String>,

  /// Attach standard streams to a TTY, including `stdin` if it is not closed.
  #[serde(rename = "Tty")]
  pub tty: Option<bool>,

  /// Open `stdin`
  #[serde(rename = "OpenStdin")]
  pub open_stdin: Option<bool>,

  /// Close `stdin` after one attached client disconnects
  #[serde(rename = "StdinOnce")]
  pub stdin_once: Option<bool>,

  /// A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
  #[serde(default, rename = "Env")]
  pub env: Vec<String>,

  /// Command to run specified as a string or an array of strings.
  #[serde(default, rename = "Cmd")]
  pub cmd: Vec<String>,

  #[serde(rename = "Healthcheck")]
  pub healthcheck: Option<HealthConfig>,

  /// Command is already escaped (Windows only)
  #[serde(rename = "ArgsEscaped")]
  pub args_escaped: Option<bool>,

  /// The name (or reference) of the image to use when creating the container, or which was used when the container was created.
  #[serde(rename = "Image")]
  pub image: Option<String>,

  /// An object mapping mount point paths inside the container to empty objects.
  #[serde(default, rename = "Volumes")]
  pub volumes: Vec<String>,

  /// The working directory for commands to run in.
  #[serde(rename = "WorkingDir")]
  pub working_dir: Option<String>,

  /// The entry point for the container as a string or an array of strings.  If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
  #[serde(default, rename = "Entrypoint")]
  pub entrypoint: Vec<String>,

  /// Disable networking for the container.
  #[serde(rename = "NetworkDisabled")]
  pub network_disabled: Option<bool>,

  /// `ONBUILD` metadata that were defined in the image's `Dockerfile`.
  #[serde(default, rename = "OnBuild")]
  pub on_build: Vec<String>,

  /// User-defined key/value metadata.
  #[serde(default, rename = "Labels")]
  pub labels: HashMap<String, String>,

  /// Signal to stop a container as a string or unsigned integer.
  #[serde(rename = "StopSignal")]
  pub stop_signal: Option<String>,

  /// Timeout to stop a container in seconds.
  #[serde(rename = "StopTimeout")]
  pub stop_timeout: Option<I64>,

  /// Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
  #[serde(default, rename = "Shell")]
  pub shell: Vec<String>,
}

/// A test to perform to check that the container is healthy.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct HealthConfig {
  /// The test to perform. Possible values are:  - `[]` inherit healthcheck from image or parent image - `[\"NONE\"]` disable healthcheck - `[\"CMD\", args...]` exec arguments directly - `[\"CMD-SHELL\", command]` run command with system's default shell
  #[serde(default, rename = "Test")]
  pub test: Vec<String>,

  /// The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
  #[serde(rename = "Interval")]
  pub interval: Option<I64>,

  /// The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
  #[serde(rename = "Timeout")]
  pub timeout: Option<I64>,

  /// The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.
  #[serde(rename = "Retries")]
  pub retries: Option<I64>,

  /// Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
  #[serde(rename = "StartPeriod")]
  pub start_period: Option<I64>,

  /// The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
  #[serde(rename = "StartInterval")]
  pub start_interval: Option<I64>,
}

/// The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects.  This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ObjectVersion {
  #[serde(rename = "Index")]
  pub index: Option<U64>,
}

/// Driver represents a driver (network, logging, secrets).
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct Driver {
  /// Name of the driver.
  #[serde(rename = "Name")]
  pub name: String,

  /// Key/value map of driver-specific options.
  #[serde(rename = "Options")]
  pub options: Option<HashMap<String, String>>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct Mount {
  /// Container path.
  #[serde(rename = "Target")]
  pub target: Option<String>,

  /// Mount source (e.g. a volume name, a host path).
  #[serde(rename = "Source")]
  pub source: Option<String>,

  /// The mount type. Available types:
  ///   - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
  ///   - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
  ///   - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
  ///   - `cluster` a Swarm cluster volume
  #[serde(default, rename = "Type")]
  pub typ: MountTypeEnum,

  /// Whether the mount should be read-only.
  #[serde(rename = "ReadOnly")]
  pub read_only: Option<bool>,

  /// The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
  #[serde(rename = "Consistency")]
  pub consistency: Option<String>,

  #[serde(rename = "BindOptions")]
  pub bind_options: Option<MountBindOptions>,

  #[serde(rename = "VolumeOptions")]
  pub volume_options: Option<MountVolumeOptions>,

  #[serde(rename = "TmpfsOptions")]
  pub tmpfs_options: Option<MountTmpfsOptions>,
}

#[typeshare]
#[derive(
  Debug,
  Clone,
  Copy,
  PartialEq,
  PartialOrd,
  Serialize,
  Deserialize,
  Eq,
  Ord,
  Default,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum MountTypeEnum {
  #[default]
  #[serde(rename = "")]
  Empty,
  #[serde(rename = "bind")]
  Bind,
  #[serde(rename = "volume")]
  Volume,
  #[serde(rename = "image")]
  Image,
  #[serde(rename = "tmpfs")]
  Tmpfs,
  #[serde(rename = "npipe")]
  Npipe,
  #[serde(rename = "cluster")]
  Cluster,
}

/// Optional configuration for the `bind` type.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct MountBindOptions {
  /// A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
  #[serde(default, rename = "Propagation")]
  pub propagation: MountBindOptionsPropagationEnum,

  /// Disable recursive bind mount.
  #[serde(rename = "NonRecursive")]
  pub non_recursive: Option<bool>,

  /// Create mount point on host if missing
  #[serde(rename = "CreateMountpoint")]
  pub create_mountpoint: Option<bool>,

  /// Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction).  Addded in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44.
  #[serde(rename = "ReadOnlyNonRecursive")]
  pub read_only_non_recursive: Option<bool>,

  /// Raise an error if the mount cannot be made recursively read-only.
  #[serde(rename = "ReadOnlyForceRecursive")]
  pub read_only_force_recursive: Option<bool>,
}

#[typeshare]
#[derive(
  Debug,
  Clone,
  Copy,
  PartialEq,
  PartialOrd,
  Serialize,
  Deserialize,
  Eq,
  Ord,
  Default,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum MountBindOptionsPropagationEnum {
  #[default]
  #[serde(rename = "")]
  Empty,
  #[serde(rename = "private")]
  Private,
  #[serde(rename = "rprivate")]
  Rprivate,
  #[serde(rename = "shared")]
  Shared,
  #[serde(rename = "rshared")]
  Rshared,
  #[serde(rename = "slave")]
  Slave,
  #[serde(rename = "rslave")]
  Rslave,
}

/// Optional configuration for the `volume` type.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct MountVolumeOptions {
  /// Populate volume with data from the target.
  #[serde(rename = "NoCopy")]
  pub no_copy: Option<bool>,

  /// User-defined key/value metadata.
  #[serde(default, rename = "Labels")]
  pub labels: HashMap<String, String>,

  #[serde(rename = "DriverConfig")]
  pub driver_config: Option<MountVolumeOptionsDriverConfig>,

  /// Source path inside the volume. Must be relative without any back traversals.
  #[serde(rename = "Subpath")]
  pub subpath: Option<String>,
}

/// Map of driver specific options
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct MountVolumeOptionsDriverConfig {
  /// Name of the driver to use to create the volume.
  #[serde(rename = "Name")]
  pub name: Option<String>,

  /// key/value map of driver specific options.
  #[serde(default, rename = "Options")]
  pub options: HashMap<String, String>,
}

/// Optional configuration for the `tmpfs` type.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct MountTmpfsOptions {
  /// The size for the tmpfs mount in bytes.
  #[serde(rename = "SizeBytes")]
  pub size_bytes: Option<I64>,

  /// The permission mode for the tmpfs mount in an integer.
  #[serde(rename = "Mode")]
  pub mode: Option<I64>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ResourcesUlimits {
  /// Name of ulimit
  #[serde(rename = "Name")]
  pub name: Option<String>,

  /// Soft limit
  #[serde(rename = "Soft")]
  pub soft: Option<I64>,

  /// Hard limit
  #[serde(rename = "Hard")]
  pub hard: Option<I64>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct ResourceObject {
  #[serde(rename = "NanoCPUs")]
  pub nano_cpus: Option<I64>,

  #[serde(rename = "MemoryBytes")]
  pub memory_bytes: Option<I64>,

  #[serde(rename = "GenericResources")]
  pub generic_resources: Option<GenericResources>,
}

/// User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`).
#[typeshare]
pub type GenericResources = Vec<GenericResourcesInner>;

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct GenericResourcesInner {
  #[serde(rename = "NamedResourceSpec")]
  pub named_resource_spec:
    Option<GenericResourcesInnerNamedResourceSpec>,

  #[serde(rename = "DiscreteResourceSpec")]
  pub discrete_resource_spec:
    Option<GenericResourcesInnerDiscreteResourceSpec>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct GenericResourcesInnerDiscreteResourceSpec {
  #[serde(rename = "Kind")]
  pub kind: Option<String>,

  #[serde(rename = "Value")]
  pub value: Option<I64>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct GenericResourcesInnerNamedResourceSpec {
  #[serde(rename = "Kind")]
  pub kind: Option<String>,

  #[serde(rename = "Value")]
  pub value: Option<String>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct Platform {
  /// Architecture represents the hardware architecture (for example, `x86_64`).
  #[serde(rename = "Architecture")]
  pub architecture: Option<String>,

  /// OS represents the Operating System (for example, `linux` or `windows`).
  #[serde(rename = "OS")]
  pub os: Option<String>,
}

/// Specifies how a service should be attached to a particular network.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct NetworkAttachmentConfig {
  /// The target network for attachment. Must be a network name or ID.
  #[serde(rename = "Target")]
  pub target: Option<String>,

  /// Discoverable alternate names for the service on this network.
  #[serde(rename = "Aliases")]
  pub aliases: Option<Vec<String>>,

  /// Driver attachment options for the network target.
  #[serde(rename = "DriverOpts")]
  pub driver_opts: Option<HashMap<String, String>>,
}

#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct EndpointPortConfig {
  #[serde(rename = "Name")]
  pub name: Option<String>,

  #[serde(rename = "Protocol")]
  pub protocol: Option<EndpointPortConfigProtocolEnum>,

  /// The port inside the container.
  #[serde(rename = "TargetPort")]
  pub target_port: Option<I64>,

  /// The port on the swarm hosts.
  #[serde(rename = "PublishedPort")]
  pub published_port: Option<I64>,

  /// The mode in which port is published.  <p><br /></p>  - \"ingress\" makes the target port accessible on every node,   regardless of whether there is a task for the service running on   that node or not. - \"host\" bypasses the routing mesh and publish the port directly on   the swarm node where that service is running.
  #[serde(rename = "PublishMode")]
  pub publish_mode: Option<EndpointPortConfigPublishModeEnum>,
}

#[typeshare]
#[derive(
  Debug,
  Clone,
  Copy,
  PartialEq,
  Eq,
  PartialOrd,
  Ord,
  Default,
  Serialize,
  Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum EndpointPortConfigProtocolEnum {
  #[default]
  #[serde(rename = "")]
  EMPTY,
  #[serde(rename = "tcp")]
  TCP,
  #[serde(rename = "udp")]
  UDP,
  #[serde(rename = "sctp")]
  SCTP,
}

#[typeshare]
#[derive(
  Debug,
  Clone,
  Copy,
  PartialEq,
  Eq,
  PartialOrd,
  Ord,
  Default,
  Serialize,
  Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum EndpointPortConfigPublishModeEnum {
  #[default]
  #[serde(rename = "")]
  EMPTY,
  #[serde(rename = "ingress")]
  INGRESS,
  #[serde(rename = "host")]
  HOST,
}

/// Information about the issuer of leaf TLS certificates and the trusted root CA certificate.
#[typeshare]
#[derive(
  Debug, Clone, Default, PartialEq, Serialize, Deserialize,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct TlsInfo {
  /// The root CA certificate(s) that are used to validate leaf TLS certificates.
  #[serde(rename = "TrustRoot")]
  pub trust_root: Option<String>,

  /// The base64-url-safe-encoded raw subject bytes of the issuer.
  #[serde(rename = "CertIssuerSubject")]
  pub cert_issuer_subject: Option<String>,

  /// The base64-url-safe-encoded raw public key bytes of the issuer.
  #[serde(rename = "CertIssuerPublicKey")]
  pub cert_issuer_public_key: Option<String>,
}