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

/// <p>Metadata related to the function package.</p>
/// <p>A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to describe how the network functions should run on your network.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSolFunctionPackageMetadata {
    /// <p>Metadata related to the function package descriptor of the function package.</p>
    pub vnfd: ::std::option::Option<crate::types::FunctionArtifactMeta>,
    /// <p>The date that the resource was created.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The date that the resource was last modified.</p>
    pub last_modified: ::aws_smithy_types::DateTime,
}
impl GetSolFunctionPackageMetadata {
    /// <p>Metadata related to the function package descriptor of the function package.</p>
    pub fn vnfd(&self) -> ::std::option::Option<&crate::types::FunctionArtifactMeta> {
        self.vnfd.as_ref()
    }
    /// <p>The date that the resource was created.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The date that the resource was last modified.</p>
    pub fn last_modified(&self) -> &::aws_smithy_types::DateTime {
        &self.last_modified
    }
}
impl GetSolFunctionPackageMetadata {
    /// Creates a new builder-style object to manufacture [`GetSolFunctionPackageMetadata`](crate::types::GetSolFunctionPackageMetadata).
    pub fn builder() -> crate::types::builders::GetSolFunctionPackageMetadataBuilder {
        crate::types::builders::GetSolFunctionPackageMetadataBuilder::default()
    }
}

/// A builder for [`GetSolFunctionPackageMetadata`](crate::types::GetSolFunctionPackageMetadata).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSolFunctionPackageMetadataBuilder {
    pub(crate) vnfd: ::std::option::Option<crate::types::FunctionArtifactMeta>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl GetSolFunctionPackageMetadataBuilder {
    /// <p>Metadata related to the function package descriptor of the function package.</p>
    pub fn vnfd(mut self, input: crate::types::FunctionArtifactMeta) -> Self {
        self.vnfd = ::std::option::Option::Some(input);
        self
    }
    /// <p>Metadata related to the function package descriptor of the function package.</p>
    pub fn set_vnfd(mut self, input: ::std::option::Option<crate::types::FunctionArtifactMeta>) -> Self {
        self.vnfd = input;
        self
    }
    /// <p>Metadata related to the function package descriptor of the function package.</p>
    pub fn get_vnfd(&self) -> &::std::option::Option<crate::types::FunctionArtifactMeta> {
        &self.vnfd
    }
    /// <p>The date that the resource was created.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the resource was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date that the resource was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date that the resource was last modified.</p>
    /// This field is required.
    pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the resource was last modified.</p>
    pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified = input;
        self
    }
    /// <p>The date that the resource was last modified.</p>
    pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified
    }
    /// Consumes the builder and constructs a [`GetSolFunctionPackageMetadata`](crate::types::GetSolFunctionPackageMetadata).
    /// This method will fail if any of the following fields are not set:
    /// - [`created_at`](crate::types::builders::GetSolFunctionPackageMetadataBuilder::created_at)
    /// - [`last_modified`](crate::types::builders::GetSolFunctionPackageMetadataBuilder::last_modified)
    pub fn build(self) -> ::std::result::Result<crate::types::GetSolFunctionPackageMetadata, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::GetSolFunctionPackageMetadata {
            vnfd: self.vnfd,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetSolFunctionPackageMetadata",
                )
            })?,
            last_modified: self.last_modified.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "last_modified",
                    "last_modified was not specified but it is required when building GetSolFunctionPackageMetadata",
                )
            })?,
        })
    }
}