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

/// <p>A structure that contains information about one experiment or launch that uses the specified segment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RefResource {
    /// <p>The name of the experiment or launch.</p>
    pub name: ::std::string::String,
    /// <p>Specifies whether the resource that this structure contains information about is an experiment or a launch.</p>
    pub r#type: ::std::string::String,
    /// <p>The ARN of the experiment or launch.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The status of the experiment or launch.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The day and time that this experiment or launch started.</p>
    pub start_time: ::std::option::Option<::std::string::String>,
    /// <p>The day and time that this experiment or launch ended.</p>
    pub end_time: ::std::option::Option<::std::string::String>,
    /// <p>The day and time that this experiment or launch was most recently updated.</p>
    pub last_updated_on: ::std::option::Option<::std::string::String>,
}
impl RefResource {
    /// <p>The name of the experiment or launch.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>Specifies whether the resource that this structure contains information about is an experiment or a launch.</p>
    pub fn r#type(&self) -> &str {
        use std::ops::Deref;
        self.r#type.deref()
    }
    /// <p>The ARN of the experiment or launch.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The status of the experiment or launch.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The day and time that this experiment or launch started.</p>
    pub fn start_time(&self) -> ::std::option::Option<&str> {
        self.start_time.as_deref()
    }
    /// <p>The day and time that this experiment or launch ended.</p>
    pub fn end_time(&self) -> ::std::option::Option<&str> {
        self.end_time.as_deref()
    }
    /// <p>The day and time that this experiment or launch was most recently updated.</p>
    pub fn last_updated_on(&self) -> ::std::option::Option<&str> {
        self.last_updated_on.as_deref()
    }
}
impl RefResource {
    /// Creates a new builder-style object to manufacture [`RefResource`](crate::types::RefResource).
    pub fn builder() -> crate::types::builders::RefResourceBuilder {
        crate::types::builders::RefResourceBuilder::default()
    }
}

/// A builder for [`RefResource`](crate::types::RefResource).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RefResourceBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) start_time: ::std::option::Option<::std::string::String>,
    pub(crate) end_time: ::std::option::Option<::std::string::String>,
    pub(crate) last_updated_on: ::std::option::Option<::std::string::String>,
}
impl RefResourceBuilder {
    /// <p>The name of the experiment or launch.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the experiment or launch.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the experiment or launch.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Specifies whether the resource that this structure contains information about is an experiment or a launch.</p>
    /// This field is required.
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies whether the resource that this structure contains information about is an experiment or a launch.</p>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>Specifies whether the resource that this structure contains information about is an experiment or a launch.</p>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// <p>The ARN of the experiment or launch.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the experiment or launch.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the experiment or launch.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The status of the experiment or launch.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the experiment or launch.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the experiment or launch.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The day and time that this experiment or launch started.</p>
    pub fn start_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.start_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day and time that this experiment or launch started.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The day and time that this experiment or launch started.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.start_time
    }
    /// <p>The day and time that this experiment or launch ended.</p>
    pub fn end_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.end_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day and time that this experiment or launch ended.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The day and time that this experiment or launch ended.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.end_time
    }
    /// <p>The day and time that this experiment or launch was most recently updated.</p>
    pub fn last_updated_on(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_updated_on = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The day and time that this experiment or launch was most recently updated.</p>
    pub fn set_last_updated_on(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_updated_on = input;
        self
    }
    /// <p>The day and time that this experiment or launch was most recently updated.</p>
    pub fn get_last_updated_on(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_updated_on
    }
    /// Consumes the builder and constructs a [`RefResource`](crate::types::RefResource).
    /// This method will fail if any of the following fields are not set:
    /// - [`name`](crate::types::builders::RefResourceBuilder::name)
    /// - [`r#type`](crate::types::builders::RefResourceBuilder::r#type)
    pub fn build(self) -> ::std::result::Result<crate::types::RefResource, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::RefResource {
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building RefResource",
                )
            })?,
            r#type: self.r#type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "r#type",
                    "r#type was not specified but it is required when building RefResource",
                )
            })?,
            arn: self.arn,
            status: self.status,
            start_time: self.start_time,
            end_time: self.end_time,
            last_updated_on: self.last_updated_on,
        })
    }
}