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

/// <p>Information about an S3 recording <code>Config</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct S3RecordingConfig {
    /// <p>ARN of the bucket to record to.</p>
    pub bucket_arn: ::std::string::String,
    /// <p>ARN of the role Ground Station assumes to write data to the bucket.</p>
    pub role_arn: ::std::string::String,
    /// <p>S3 Key prefix to prefice data files.</p>
    pub prefix: ::std::option::Option<::std::string::String>,
}
impl S3RecordingConfig {
    /// <p>ARN of the bucket to record to.</p>
    pub fn bucket_arn(&self) -> &str {
        use std::ops::Deref;
        self.bucket_arn.deref()
    }
    /// <p>ARN of the role Ground Station assumes to write data to the bucket.</p>
    pub fn role_arn(&self) -> &str {
        use std::ops::Deref;
        self.role_arn.deref()
    }
    /// <p>S3 Key prefix to prefice data files.</p>
    pub fn prefix(&self) -> ::std::option::Option<&str> {
        self.prefix.as_deref()
    }
}
impl S3RecordingConfig {
    /// Creates a new builder-style object to manufacture [`S3RecordingConfig`](crate::types::S3RecordingConfig).
    pub fn builder() -> crate::types::builders::S3RecordingConfigBuilder {
        crate::types::builders::S3RecordingConfigBuilder::default()
    }
}

/// A builder for [`S3RecordingConfig`](crate::types::S3RecordingConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct S3RecordingConfigBuilder {
    pub(crate) bucket_arn: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) prefix: ::std::option::Option<::std::string::String>,
}
impl S3RecordingConfigBuilder {
    /// <p>ARN of the bucket to record to.</p>
    /// This field is required.
    pub fn bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of the bucket to record to.</p>
    pub fn set_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket_arn = input;
        self
    }
    /// <p>ARN of the bucket to record to.</p>
    pub fn get_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket_arn
    }
    /// <p>ARN of the role Ground Station assumes to write data to the bucket.</p>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of the role Ground Station assumes to write data to the bucket.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>ARN of the role Ground Station assumes to write data to the bucket.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>S3 Key prefix to prefice data files.</p>
    pub fn prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>S3 Key prefix to prefice data files.</p>
    pub fn set_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.prefix = input;
        self
    }
    /// <p>S3 Key prefix to prefice data files.</p>
    pub fn get_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.prefix
    }
    /// Consumes the builder and constructs a [`S3RecordingConfig`](crate::types::S3RecordingConfig).
    /// This method will fail if any of the following fields are not set:
    /// - [`bucket_arn`](crate::types::builders::S3RecordingConfigBuilder::bucket_arn)
    /// - [`role_arn`](crate::types::builders::S3RecordingConfigBuilder::role_arn)
    pub fn build(self) -> ::std::result::Result<crate::types::S3RecordingConfig, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::S3RecordingConfig {
            bucket_arn: self.bucket_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "bucket_arn",
                    "bucket_arn was not specified but it is required when building S3RecordingConfig",
                )
            })?,
            role_arn: self.role_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "role_arn",
                    "role_arn was not specified but it is required when building S3RecordingConfig",
                )
            })?,
            prefix: self.prefix,
        })
    }
}