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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies the validation and image scan statuses of the model package.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ModelPackageStatusDetails {
    /// <p>The validation status of the model package.</p>
    #[doc(hidden)]
    pub validation_statuses:
        std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
    /// <p>The status of the scan of the Docker image container for the model package.</p>
    #[doc(hidden)]
    pub image_scan_statuses:
        std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
}
impl ModelPackageStatusDetails {
    /// <p>The validation status of the model package.</p>
    pub fn validation_statuses(
        &self,
    ) -> std::option::Option<&[crate::types::ModelPackageStatusItem]> {
        self.validation_statuses.as_deref()
    }
    /// <p>The status of the scan of the Docker image container for the model package.</p>
    pub fn image_scan_statuses(
        &self,
    ) -> std::option::Option<&[crate::types::ModelPackageStatusItem]> {
        self.image_scan_statuses.as_deref()
    }
}
impl ModelPackageStatusDetails {
    /// Creates a new builder-style object to manufacture [`ModelPackageStatusDetails`](crate::types::ModelPackageStatusDetails).
    pub fn builder() -> crate::types::builders::ModelPackageStatusDetailsBuilder {
        crate::types::builders::ModelPackageStatusDetailsBuilder::default()
    }
}

/// A builder for [`ModelPackageStatusDetails`](crate::types::ModelPackageStatusDetails).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ModelPackageStatusDetailsBuilder {
    pub(crate) validation_statuses:
        std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
    pub(crate) image_scan_statuses:
        std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
}
impl ModelPackageStatusDetailsBuilder {
    /// Appends an item to `validation_statuses`.
    ///
    /// To override the contents of this collection use [`set_validation_statuses`](Self::set_validation_statuses).
    ///
    /// <p>The validation status of the model package.</p>
    pub fn validation_statuses(mut self, input: crate::types::ModelPackageStatusItem) -> Self {
        let mut v = self.validation_statuses.unwrap_or_default();
        v.push(input);
        self.validation_statuses = Some(v);
        self
    }
    /// <p>The validation status of the model package.</p>
    pub fn set_validation_statuses(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
    ) -> Self {
        self.validation_statuses = input;
        self
    }
    /// Appends an item to `image_scan_statuses`.
    ///
    /// To override the contents of this collection use [`set_image_scan_statuses`](Self::set_image_scan_statuses).
    ///
    /// <p>The status of the scan of the Docker image container for the model package.</p>
    pub fn image_scan_statuses(mut self, input: crate::types::ModelPackageStatusItem) -> Self {
        let mut v = self.image_scan_statuses.unwrap_or_default();
        v.push(input);
        self.image_scan_statuses = Some(v);
        self
    }
    /// <p>The status of the scan of the Docker image container for the model package.</p>
    pub fn set_image_scan_statuses(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ModelPackageStatusItem>>,
    ) -> Self {
        self.image_scan_statuses = input;
        self
    }
    /// Consumes the builder and constructs a [`ModelPackageStatusDetails`](crate::types::ModelPackageStatusDetails).
    pub fn build(self) -> crate::types::ModelPackageStatusDetails {
        crate::types::ModelPackageStatusDetails {
            validation_statuses: self.validation_statuses,
            image_scan_statuses: self.image_scan_statuses,
        }
    }
}