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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Request to update an existing changeset.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateChangesetInput {
    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier for the FinSpace Dataset in which the Changeset is created.</p>
    pub dataset_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier for the Changeset to update.</p>
    pub changeset_id: ::std::option::Option<::std::string::String>,
    /// <p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p>
    /// <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p>
    /// <p>Here is an example of how you could specify the <code>sourceParams</code>:</p>
    /// <p> <code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code> </p>
    /// <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a>section.</p>
    pub source_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>). </p>
    /// <p> <code>formatType</code> is a required attribute and can have the following values: </p>
    /// <ul>
    /// <li> <p> <code>PARQUET</code> – Parquet source file format.</p> </li>
    /// <li> <p> <code>CSV</code> – CSV source file format.</p> </li>
    /// <li> <p> <code>JSON</code> – JSON source file format.</p> </li>
    /// <li> <p> <code>XML</code> – XML source file format.</p> </li>
    /// </ul>
    /// <p>Here is an example of how you could specify the <code>formatParams</code>:</p>
    /// <p> <code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code> </p>
    /// <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p>
    /// <p> <code> { "withHeader": "true", "separator": "," } </code> </p>
    /// <p> For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p>
    pub format_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateChangesetInput {
    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The unique identifier for the FinSpace Dataset in which the Changeset is created.</p>
    pub fn dataset_id(&self) -> ::std::option::Option<&str> {
        self.dataset_id.as_deref()
    }
    /// <p>The unique identifier for the Changeset to update.</p>
    pub fn changeset_id(&self) -> ::std::option::Option<&str> {
        self.changeset_id.as_deref()
    }
    /// <p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p>
    /// <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p>
    /// <p>Here is an example of how you could specify the <code>sourceParams</code>:</p>
    /// <p> <code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code> </p>
    /// <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a>section.</p>
    pub fn source_params(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.source_params.as_ref()
    }
    /// <p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>). </p>
    /// <p> <code>formatType</code> is a required attribute and can have the following values: </p>
    /// <ul>
    /// <li> <p> <code>PARQUET</code> – Parquet source file format.</p> </li>
    /// <li> <p> <code>CSV</code> – CSV source file format.</p> </li>
    /// <li> <p> <code>JSON</code> – JSON source file format.</p> </li>
    /// <li> <p> <code>XML</code> – XML source file format.</p> </li>
    /// </ul>
    /// <p>Here is an example of how you could specify the <code>formatParams</code>:</p>
    /// <p> <code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code> </p>
    /// <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p>
    /// <p> <code> { "withHeader": "true", "separator": "," } </code> </p>
    /// <p> For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p>
    pub fn format_params(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.format_params.as_ref()
    }
}
impl UpdateChangesetInput {
    /// Creates a new builder-style object to manufacture [`UpdateChangesetInput`](crate::operation::update_changeset::UpdateChangesetInput).
    pub fn builder() -> crate::operation::update_changeset::builders::UpdateChangesetInputBuilder {
        crate::operation::update_changeset::builders::UpdateChangesetInputBuilder::default()
    }
}

/// A builder for [`UpdateChangesetInput`](crate::operation::update_changeset::UpdateChangesetInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateChangesetInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
    pub(crate) changeset_id: ::std::option::Option<::std::string::String>,
    pub(crate) source_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) format_params: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl UpdateChangesetInputBuilder {
    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The unique identifier for the FinSpace Dataset in which the Changeset is created.</p>
    /// This field is required.
    pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the FinSpace Dataset in which the Changeset is created.</p>
    pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_id = input;
        self
    }
    /// <p>The unique identifier for the FinSpace Dataset in which the Changeset is created.</p>
    pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_id
    }
    /// <p>The unique identifier for the Changeset to update.</p>
    /// This field is required.
    pub fn changeset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.changeset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the Changeset to update.</p>
    pub fn set_changeset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.changeset_id = input;
        self
    }
    /// <p>The unique identifier for the Changeset to update.</p>
    pub fn get_changeset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.changeset_id
    }
    /// Adds a key-value pair to `source_params`.
    ///
    /// To override the contents of this collection use [`set_source_params`](Self::set_source_params).
    ///
    /// <p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p>
    /// <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p>
    /// <p>Here is an example of how you could specify the <code>sourceParams</code>:</p>
    /// <p> <code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code> </p>
    /// <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a>section.</p>
    pub fn source_params(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.source_params.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.source_params = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p>
    /// <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p>
    /// <p>Here is an example of how you could specify the <code>sourceParams</code>:</p>
    /// <p> <code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code> </p>
    /// <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a>section.</p>
    pub fn set_source_params(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.source_params = input;
        self
    }
    /// <p>Options that define the location of the data being ingested (<code>s3SourcePath</code>) and the source of the changeset (<code>sourceType</code>).</p>
    /// <p>Both <code>s3SourcePath</code> and <code>sourceType</code> are required attributes.</p>
    /// <p>Here is an example of how you could specify the <code>sourceParams</code>:</p>
    /// <p> <code> "sourceParams": { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" } </code> </p>
    /// <p>The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/finspace/latest/data-api/fs-using-the-finspace-api.html#access-s3-buckets">Loading data from an Amazon S3 Bucket using the FinSpace API</a>section.</p>
    pub fn get_source_params(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.source_params
    }
    /// Adds a key-value pair to `format_params`.
    ///
    /// To override the contents of this collection use [`set_format_params`](Self::set_format_params).
    ///
    /// <p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>). </p>
    /// <p> <code>formatType</code> is a required attribute and can have the following values: </p>
    /// <ul>
    /// <li> <p> <code>PARQUET</code> – Parquet source file format.</p> </li>
    /// <li> <p> <code>CSV</code> – CSV source file format.</p> </li>
    /// <li> <p> <code>JSON</code> – JSON source file format.</p> </li>
    /// <li> <p> <code>XML</code> – XML source file format.</p> </li>
    /// </ul>
    /// <p>Here is an example of how you could specify the <code>formatParams</code>:</p>
    /// <p> <code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code> </p>
    /// <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p>
    /// <p> <code> { "withHeader": "true", "separator": "," } </code> </p>
    /// <p> For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p>
    pub fn format_params(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.format_params.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.format_params = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>). </p>
    /// <p> <code>formatType</code> is a required attribute and can have the following values: </p>
    /// <ul>
    /// <li> <p> <code>PARQUET</code> – Parquet source file format.</p> </li>
    /// <li> <p> <code>CSV</code> – CSV source file format.</p> </li>
    /// <li> <p> <code>JSON</code> – JSON source file format.</p> </li>
    /// <li> <p> <code>XML</code> – XML source file format.</p> </li>
    /// </ul>
    /// <p>Here is an example of how you could specify the <code>formatParams</code>:</p>
    /// <p> <code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code> </p>
    /// <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p>
    /// <p> <code> { "withHeader": "true", "separator": "," } </code> </p>
    /// <p> For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p>
    pub fn set_format_params(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.format_params = input;
        self
    }
    /// <p>Options that define the structure of the source file(s) including the format type (<code>formatType</code>), header row (<code>withHeader</code>), data separation character (<code>separator</code>) and the type of compression (<code>compression</code>). </p>
    /// <p> <code>formatType</code> is a required attribute and can have the following values: </p>
    /// <ul>
    /// <li> <p> <code>PARQUET</code> – Parquet source file format.</p> </li>
    /// <li> <p> <code>CSV</code> – CSV source file format.</p> </li>
    /// <li> <p> <code>JSON</code> – JSON source file format.</p> </li>
    /// <li> <p> <code>XML</code> – XML source file format.</p> </li>
    /// </ul>
    /// <p>Here is an example of how you could specify the <code>formatParams</code>:</p>
    /// <p> <code> "formatParams": { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" } </code> </p>
    /// <p>Note that if you only provide <code>formatType</code> as <code>CSV</code>, the rest of the attributes will automatically default to CSV values as following:</p>
    /// <p> <code> { "withHeader": "true", "separator": "," } </code> </p>
    /// <p> For more information about supported file formats, see <a href="https://docs.aws.amazon.com/finspace/latest/userguide/supported-data-types.html">Supported Data Types and File Formats</a> in the FinSpace User Guide.</p>
    pub fn get_format_params(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.format_params
    }
    /// Consumes the builder and constructs a [`UpdateChangesetInput`](crate::operation::update_changeset::UpdateChangesetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_changeset::UpdateChangesetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_changeset::UpdateChangesetInput {
            client_token: self.client_token,
            dataset_id: self.dataset_id,
            changeset_id: self.changeset_id,
            source_params: self.source_params,
            format_params: self.format_params,
        })
    }
}