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

/// <p>The information required to specify a Maven reference. You can use Maven references to specify dependency JAR files.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MavenReference {
    /// <p>The group ID of the Maven reference.</p>
    pub group_id: ::std::string::String,
    /// <p>The artifact ID of the Maven reference.</p>
    pub artifact_id: ::std::string::String,
    /// <p>The version of the Maven reference.</p>
    pub version: ::std::string::String,
}
impl MavenReference {
    /// <p>The group ID of the Maven reference.</p>
    pub fn group_id(&self) -> &str {
        use std::ops::Deref;
        self.group_id.deref()
    }
    /// <p>The artifact ID of the Maven reference.</p>
    pub fn artifact_id(&self) -> &str {
        use std::ops::Deref;
        self.artifact_id.deref()
    }
    /// <p>The version of the Maven reference.</p>
    pub fn version(&self) -> &str {
        use std::ops::Deref;
        self.version.deref()
    }
}
impl MavenReference {
    /// Creates a new builder-style object to manufacture [`MavenReference`](crate::types::MavenReference).
    pub fn builder() -> crate::types::builders::MavenReferenceBuilder {
        crate::types::builders::MavenReferenceBuilder::default()
    }
}

/// A builder for [`MavenReference`](crate::types::MavenReference).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct MavenReferenceBuilder {
    pub(crate) group_id: ::std::option::Option<::std::string::String>,
    pub(crate) artifact_id: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
}
impl MavenReferenceBuilder {
    /// <p>The group ID of the Maven reference.</p>
    /// This field is required.
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The group ID of the Maven reference.</p>
    pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_id = input;
        self
    }
    /// <p>The group ID of the Maven reference.</p>
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// <p>The artifact ID of the Maven reference.</p>
    /// This field is required.
    pub fn artifact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.artifact_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The artifact ID of the Maven reference.</p>
    pub fn set_artifact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.artifact_id = input;
        self
    }
    /// <p>The artifact ID of the Maven reference.</p>
    pub fn get_artifact_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.artifact_id
    }
    /// <p>The version of the Maven reference.</p>
    /// This field is required.
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the Maven reference.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version of the Maven reference.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// Consumes the builder and constructs a [`MavenReference`](crate::types::MavenReference).
    /// This method will fail if any of the following fields are not set:
    /// - [`group_id`](crate::types::builders::MavenReferenceBuilder::group_id)
    /// - [`artifact_id`](crate::types::builders::MavenReferenceBuilder::artifact_id)
    /// - [`version`](crate::types::builders::MavenReferenceBuilder::version)
    pub fn build(self) -> ::std::result::Result<crate::types::MavenReference, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::MavenReference {
            group_id: self.group_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "group_id",
                    "group_id was not specified but it is required when building MavenReference",
                )
            })?,
            artifact_id: self.artifact_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "artifact_id",
                    "artifact_id was not specified but it is required when building MavenReference",
                )
            })?,
            version: self.version.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "version",
                    "version was not specified but it is required when building MavenReference",
                )
            })?,
        })
    }
}