1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* StructureGenerator.kt:197 */
|
2 3 | #[allow(missing_docs)] // documentation missing in model
|
4 + | /* RustType.kt:516 */
|
3 5 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::hash::Hash)]
|
4 - | pub struct StartSnapshotInput {
|
5 - | /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
6 + | pub /* StructureGenerator.kt:201 */ struct StartSnapshotInput {
|
7 + | /// /* StructureGenerator.kt:231 */<p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
6 8 | /// <ul>
|
7 9 | /// <li>
|
8 10 | /// <p>No blocks are written to the snapshot.</p></li>
|
9 11 | /// <li>
|
10 12 | /// <p>The snapshot is not completed after writing the last block of data.</p></li>
|
11 13 | /// </ul>
|
12 14 | /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
|
13 15 | pub timeout: ::std::option::Option<crate::model::Timeout>,
|
14 - | /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
16 + | /// /* StructureGenerator.kt:231 */<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
15 17 | /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
|
16 18 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
17 19 | pub client_token: ::std::option::Option<crate::model::IdempotencyToken>,
|
18 - | /// <p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
20 + | /// /* StructureGenerator.kt:231 */<p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
19 21 | pub volume_size: crate::model::VolumeSize,
|
20 - | /// <p>The tags to apply to the snapshot.</p>
|
22 + | /// /* StructureGenerator.kt:231 */<p>The tags to apply to the snapshot.</p>
|
21 23 | pub tags: ::std::option::Option<::std::vec::Vec<crate::model::Tag>>,
|
22 - | /// <p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
24 + | /// /* StructureGenerator.kt:231 */<p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
23 25 | /// <p>If you specify a value for <b>ParentSnapshotId</b>, omit this parameter.</p>
|
24 26 | /// <p>If you specify <code>true</code>, the snapshot is encrypted using the CMK specified using the <b>KmsKeyArn</b> parameter. If no value is specified for <b>KmsKeyArn</b>, the default CMK for your account is used. If no default CMK has been specified for your account, the AWS managed CMK is used. To set a default CMK for your account, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html"> ModifyEbsDefaultKmsKeyId</a>.</p>
|
25 27 | /// <p>If your account is enabled for encryption by default, you cannot set this parameter to <code>false</code>. In this case, you can omit this parameter.</p>
|
26 28 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
27 29 | pub encrypted: ::std::option::Option<bool>,
|
28 - | /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
30 + | /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
29 31 | /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
|
30 32 | /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
|
31 33 | pub kms_key_arn: ::std::option::Option<crate::model::KmsKeyArn>,
|
32 - | /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
34 + | /// /* StructureGenerator.kt:231 */<p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
33 35 | /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
|
34 36 | pub parent_snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
|
35 - | /// <p>A description for the snapshot.</p>
|
37 + | /// /* StructureGenerator.kt:231 */<p>A description for the snapshot.</p>
|
36 38 | pub description: ::std::option::Option<crate::model::Description>,
|
39 + | /* StructureGenerator.kt:201 */
|
37 40 | }
|
41 + | /* StructureGenerator.kt:135 */
|
38 42 | impl StartSnapshotInput {
|
39 - | /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
43 + | /// /* StructureGenerator.kt:231 */<p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
40 44 | /// <ul>
|
41 45 | /// <li>
|
42 46 | /// <p>No blocks are written to the snapshot.</p></li>
|
43 47 | /// <li>
|
44 48 | /// <p>The snapshot is not completed after writing the last block of data.</p></li>
|
45 49 | /// </ul>
|
46 50 | /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
|
51 + | /* StructureGenerator.kt:166 */
|
47 52 | pub fn timeout(&self) -> ::std::option::Option<&crate::model::Timeout> {
|
53 + | /* StructureGenerator.kt:170 */
|
48 54 | self.timeout.as_ref()
|
55 + | /* StructureGenerator.kt:166 */
|
49 56 | }
|
50 - | /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
57 + | /// /* StructureGenerator.kt:231 */<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
51 58 | /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
|
52 59 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
60 + | /* StructureGenerator.kt:166 */
|
53 61 | pub fn client_token(&self) -> ::std::option::Option<&crate::model::IdempotencyToken> {
|
62 + | /* StructureGenerator.kt:170 */
|
54 63 | self.client_token.as_ref()
|
64 + | /* StructureGenerator.kt:166 */
|
55 65 | }
|
56 - | /// <p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
66 + | /// /* StructureGenerator.kt:231 */<p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
67 + | /* StructureGenerator.kt:166 */
|
57 68 | pub fn volume_size(&self) -> &crate::model::VolumeSize {
|
69 + | /* StructureGenerator.kt:172 */
|
58 70 | &self.volume_size
|
71 + | /* StructureGenerator.kt:166 */
|
59 72 | }
|
60 - | /// <p>The tags to apply to the snapshot.</p>
|
73 + | /// /* StructureGenerator.kt:231 */<p>The tags to apply to the snapshot.</p>
|
74 + | /* StructureGenerator.kt:166 */
|
61 75 | pub fn tags(&self) -> ::std::option::Option<&[crate::model::Tag]> {
|
76 + | /* StructureGenerator.kt:169 */
|
62 77 | self.tags.as_deref()
|
78 + | /* StructureGenerator.kt:166 */
|
63 79 | }
|
64 - | /// <p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
80 + | /// /* StructureGenerator.kt:231 */<p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
65 81 | /// <p>If you specify a value for <b>ParentSnapshotId</b>, omit this parameter.</p>
|
66 82 | /// <p>If you specify <code>true</code>, the snapshot is encrypted using the CMK specified using the <b>KmsKeyArn</b> parameter. If no value is specified for <b>KmsKeyArn</b>, the default CMK for your account is used. If no default CMK has been specified for your account, the AWS managed CMK is used. To set a default CMK for your account, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html"> ModifyEbsDefaultKmsKeyId</a>.</p>
|
67 83 | /// <p>If your account is enabled for encryption by default, you cannot set this parameter to <code>false</code>. In this case, you can omit this parameter.</p>
|
68 84 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
85 + | /* StructureGenerator.kt:166 */
|
69 86 | pub fn encrypted(&self) -> ::std::option::Option<bool> {
|
87 + | /* StructureGenerator.kt:168 */
|
70 88 | self.encrypted
|
89 + | /* StructureGenerator.kt:166 */
|
71 90 | }
|
72 - | /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
91 + | /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
73 92 | /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
|
74 93 | /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
|
94 + | /* StructureGenerator.kt:166 */
|
75 95 | pub fn kms_key_arn(&self) -> ::std::option::Option<&crate::model::KmsKeyArn> {
|
96 + | /* StructureGenerator.kt:170 */
|
76 97 | self.kms_key_arn.as_ref()
|
98 + | /* StructureGenerator.kt:166 */
|
77 99 | }
|
78 - | /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
100 + | /// /* StructureGenerator.kt:231 */<p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
79 101 | /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
|
102 + | /* StructureGenerator.kt:166 */
|
80 103 | pub fn parent_snapshot_id(&self) -> ::std::option::Option<&crate::model::SnapshotId> {
|
104 + | /* StructureGenerator.kt:170 */
|
81 105 | self.parent_snapshot_id.as_ref()
|
106 + | /* StructureGenerator.kt:166 */
|
82 107 | }
|
83 - | /// <p>A description for the snapshot.</p>
|
108 + | /// /* StructureGenerator.kt:231 */<p>A description for the snapshot.</p>
|
109 + | /* StructureGenerator.kt:166 */
|
84 110 | pub fn description(&self) -> ::std::option::Option<&crate::model::Description> {
|
111 + | /* StructureGenerator.kt:170 */
|
85 112 | self.description.as_ref()
|
113 + | /* StructureGenerator.kt:166 */
|
86 114 | }
|
115 + | /* StructureGenerator.kt:135 */
|
87 116 | }
|
117 + | /* StructureGenerator.kt:101 */
|
88 118 | impl ::std::fmt::Debug for StartSnapshotInput {
|
119 + | /* StructureGenerator.kt:105 */
|
89 120 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
121 + | /* StructureGenerator.kt:106 */
|
90 122 | let mut formatter = f.debug_struct("StartSnapshotInput");
|
123 + | /* StructureGenerator.kt:121 */
|
91 124 | formatter.field("timeout", &self.timeout);
|
125 + | /* StructureGenerator.kt:121 */
|
92 126 | formatter.field("client_token", &self.client_token);
|
127 + | /* StructureGenerator.kt:121 */
|
93 128 | formatter.field("volume_size", &self.volume_size);
|
129 + | /* StructureGenerator.kt:121 */
|
94 130 | formatter.field("tags", &self.tags);
|
131 + | /* StructureGenerator.kt:121 */
|
95 132 | formatter.field("encrypted", &self.encrypted);
|
133 + | /* StructureGenerator.kt:121 */
|
96 134 | formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
|
135 + | /* StructureGenerator.kt:121 */
|
97 136 | formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
|
137 + | /* StructureGenerator.kt:121 */
|
98 138 | formatter.field("description", &self.description);
|
139 + | /* StructureGenerator.kt:126 */
|
99 140 | formatter.finish()
|
141 + | /* StructureGenerator.kt:105 */
|
100 142 | }
|
143 + | /* StructureGenerator.kt:101 */
|
101 144 | }
|
145 + | /* ServerCodegenVisitor.kt:345 */
|
102 146 | impl StartSnapshotInput {
|
103 - | /// Creates a new builder-style object to manufacture [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
147 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
148 + | /* ServerBuilderGenerator.kt:295 */
|
104 149 | pub fn builder() -> crate::input::start_snapshot_input::Builder {
|
150 + | /* ServerBuilderGenerator.kt:296 */
|
105 151 | crate::input::start_snapshot_input::Builder::default()
|
152 + | /* ServerBuilderGenerator.kt:295 */
|
106 153 | }
|
154 + | /* ServerCodegenVisitor.kt:345 */
|
107 155 | }
|
156 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
108 157 | impl crate::constrained::Constrained for crate::input::StartSnapshotInput {
|
109 158 | type Unconstrained = crate::input::start_snapshot_input::Builder;
|
110 159 | }
|
111 160 |
|
161 + | /* StructureGenerator.kt:197 */
|
112 162 | #[allow(missing_docs)] // documentation missing in model
|
113 - | pub struct PutSnapshotBlockInput {
|
114 - | /// <p>The ID of the snapshot.</p>
|
163 + | pub /* StructureGenerator.kt:201 */ struct PutSnapshotBlockInput {
|
164 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
115 165 | pub snapshot_id: crate::model::SnapshotId,
|
116 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
166 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
117 167 | pub block_index: crate::model::BlockIndex,
|
118 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
168 + | /// /* StructureGenerator.kt:231 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
119 169 | pub checksum: crate::model::Checksum,
|
120 - | /// <p>The progress of the write process, as a percentage.</p>
|
170 + | /// /* StructureGenerator.kt:231 */<p>The progress of the write process, as a percentage.</p>
|
121 171 | pub progress: ::std::option::Option<crate::model::Progress>,
|
122 - | /// <p>The data to write to the block.</p>
|
172 + | /// /* StructureGenerator.kt:231 */<p>The data to write to the block.</p>
|
123 173 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
124 174 | pub block_data: ::aws_smithy_types::byte_stream::ByteStream,
|
125 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
175 + | /// /* StructureGenerator.kt:231 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
126 176 | /// <p>Valid values: <code>524288</code></p>
|
127 177 | pub data_length: i32,
|
128 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
178 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
129 179 | pub checksum_algorithm: crate::model::ChecksumAlgorithm,
|
180 + | /* StructureGenerator.kt:201 */
|
130 181 | }
|
182 + | /* StructureGenerator.kt:135 */
|
131 183 | impl PutSnapshotBlockInput {
|
132 - | /// <p>The ID of the snapshot.</p>
|
184 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
185 + | /* StructureGenerator.kt:166 */
|
133 186 | pub fn snapshot_id(&self) -> &crate::model::SnapshotId {
|
187 + | /* StructureGenerator.kt:172 */
|
134 188 | &self.snapshot_id
|
189 + | /* StructureGenerator.kt:166 */
|
135 190 | }
|
136 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
191 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
192 + | /* StructureGenerator.kt:166 */
|
137 193 | pub fn block_index(&self) -> &crate::model::BlockIndex {
|
194 + | /* StructureGenerator.kt:172 */
|
138 195 | &self.block_index
|
196 + | /* StructureGenerator.kt:166 */
|
139 197 | }
|
140 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
198 + | /// /* StructureGenerator.kt:231 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
199 + | /* StructureGenerator.kt:166 */
|
141 200 | pub fn checksum(&self) -> &crate::model::Checksum {
|
201 + | /* StructureGenerator.kt:172 */
|
142 202 | &self.checksum
|
203 + | /* StructureGenerator.kt:166 */
|
143 204 | }
|
144 - | /// <p>The progress of the write process, as a percentage.</p>
|
205 + | /// /* StructureGenerator.kt:231 */<p>The progress of the write process, as a percentage.</p>
|
206 + | /* StructureGenerator.kt:166 */
|
145 207 | pub fn progress(&self) -> ::std::option::Option<&crate::model::Progress> {
|
208 + | /* StructureGenerator.kt:170 */
|
146 209 | self.progress.as_ref()
|
210 + | /* StructureGenerator.kt:166 */
|
147 211 | }
|
148 - | /// <p>The data to write to the block.</p>
|
212 + | /// /* StructureGenerator.kt:231 */<p>The data to write to the block.</p>
|
149 213 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
214 + | /* StructureGenerator.kt:166 */
|
150 215 | pub fn block_data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
|
216 + | /* StructureGenerator.kt:172 */
|
151 217 | &self.block_data
|
218 + | /* StructureGenerator.kt:166 */
|
152 219 | }
|
153 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
220 + | /// /* StructureGenerator.kt:231 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
154 221 | /// <p>Valid values: <code>524288</code></p>
|
222 + | /* StructureGenerator.kt:166 */
|
155 223 | pub fn data_length(&self) -> i32 {
|
224 + | /* StructureGenerator.kt:168 */
|
156 225 | self.data_length
|
226 + | /* StructureGenerator.kt:166 */
|
157 227 | }
|
158 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
228 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
229 + | /* StructureGenerator.kt:166 */
|
159 230 | pub fn checksum_algorithm(&self) -> &crate::model::ChecksumAlgorithm {
|
231 + | /* StructureGenerator.kt:172 */
|
160 232 | &self.checksum_algorithm
|
233 + | /* StructureGenerator.kt:166 */
|
161 234 | }
|
235 + | /* StructureGenerator.kt:135 */
|
162 236 | }
|
237 + | /* StructureGenerator.kt:101 */
|
163 238 | impl ::std::fmt::Debug for PutSnapshotBlockInput {
|
239 + | /* StructureGenerator.kt:105 */
|
164 240 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
241 + | /* StructureGenerator.kt:106 */
|
165 242 | let mut formatter = f.debug_struct("PutSnapshotBlockInput");
|
243 + | /* StructureGenerator.kt:121 */
|
166 244 | formatter.field("snapshot_id", &self.snapshot_id);
|
245 + | /* StructureGenerator.kt:121 */
|
167 246 | formatter.field("block_index", &self.block_index);
|
247 + | /* StructureGenerator.kt:121 */
|
168 248 | formatter.field("checksum", &self.checksum);
|
249 + | /* StructureGenerator.kt:121 */
|
169 250 | formatter.field("progress", &self.progress);
|
251 + | /* StructureGenerator.kt:121 */
|
170 252 | formatter.field("block_data", &"*** Sensitive Data Redacted ***");
|
253 + | /* StructureGenerator.kt:121 */
|
171 254 | formatter.field("data_length", &self.data_length);
|
255 + | /* StructureGenerator.kt:121 */
|
172 256 | formatter.field("checksum_algorithm", &self.checksum_algorithm);
|
257 + | /* StructureGenerator.kt:126 */
|
173 258 | formatter.finish()
|
259 + | /* StructureGenerator.kt:105 */
|
174 260 | }
|
261 + | /* StructureGenerator.kt:101 */
|
175 262 | }
|
263 + | /* ServerCodegenVisitor.kt:345 */
|
176 264 | impl PutSnapshotBlockInput {
|
177 - | /// Creates a new builder-style object to manufacture [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
265 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
266 + | /* ServerBuilderGenerator.kt:295 */
|
178 267 | pub fn builder() -> crate::input::put_snapshot_block_input::Builder {
|
268 + | /* ServerBuilderGenerator.kt:296 */
|
179 269 | crate::input::put_snapshot_block_input::Builder::default()
|
270 + | /* ServerBuilderGenerator.kt:295 */
|
180 271 | }
|
272 + | /* ServerCodegenVisitor.kt:345 */
|
181 273 | }
|
274 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
182 275 | impl crate::constrained::Constrained for crate::input::PutSnapshotBlockInput {
|
183 276 | type Unconstrained = crate::input::put_snapshot_block_input::Builder;
|
184 277 | }
|
185 278 |
|
279 + | /* StructureGenerator.kt:197 */
|
186 280 | #[allow(missing_docs)] // documentation missing in model
|
281 + | /* RustType.kt:516 */
|
187 282 | #[derive(
|
188 283 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
189 284 | )]
|
190 - | pub struct ListSnapshotBlocksInput {
|
191 - | /// <p>The number of results to return.</p>
|
285 + | pub /* StructureGenerator.kt:201 */ struct ListSnapshotBlocksInput {
|
286 + | /// /* StructureGenerator.kt:231 */<p>The number of results to return.</p>
|
192 287 | pub max_results: ::std::option::Option<crate::model::MaxResults>,
|
193 - | /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
288 + | /// /* StructureGenerator.kt:231 */<p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
194 289 | pub starting_block_index: ::std::option::Option<crate::model::BlockIndex>,
|
195 - | /// <p>The token to request the next page of results.</p>
|
290 + | /// /* StructureGenerator.kt:231 */<p>The token to request the next page of results.</p>
|
196 291 | pub next_token: ::std::option::Option<crate::model::PageToken>,
|
197 - | /// <p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
292 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
198 293 | pub snapshot_id: crate::model::SnapshotId,
|
294 + | /* StructureGenerator.kt:201 */
|
199 295 | }
|
296 + | /* StructureGenerator.kt:135 */
|
200 297 | impl ListSnapshotBlocksInput {
|
201 - | /// <p>The number of results to return.</p>
|
298 + | /// /* StructureGenerator.kt:231 */<p>The number of results to return.</p>
|
299 + | /* StructureGenerator.kt:166 */
|
202 300 | pub fn max_results(&self) -> ::std::option::Option<&crate::model::MaxResults> {
|
301 + | /* StructureGenerator.kt:170 */
|
203 302 | self.max_results.as_ref()
|
303 + | /* StructureGenerator.kt:166 */
|
204 304 | }
|
205 - | /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
305 + | /// /* StructureGenerator.kt:231 */<p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
306 + | /* StructureGenerator.kt:166 */
|
206 307 | pub fn starting_block_index(&self) -> ::std::option::Option<&crate::model::BlockIndex> {
|
308 + | /* StructureGenerator.kt:170 */
|
207 309 | self.starting_block_index.as_ref()
|
310 + | /* StructureGenerator.kt:166 */
|
208 311 | }
|
209 - | /// <p>The token to request the next page of results.</p>
|
312 + | /// /* StructureGenerator.kt:231 */<p>The token to request the next page of results.</p>
|
313 + | /* StructureGenerator.kt:166 */
|
210 314 | pub fn next_token(&self) -> ::std::option::Option<&crate::model::PageToken> {
|
315 + | /* StructureGenerator.kt:170 */
|
211 316 | self.next_token.as_ref()
|
317 + | /* StructureGenerator.kt:166 */
|
212 318 | }
|
213 - | /// <p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
319 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
320 + | /* StructureGenerator.kt:166 */
|
214 321 | pub fn snapshot_id(&self) -> &crate::model::SnapshotId {
|
322 + | /* StructureGenerator.kt:172 */
|
215 323 | &self.snapshot_id
|
324 + | /* StructureGenerator.kt:166 */
|
216 325 | }
|
326 + | /* StructureGenerator.kt:135 */
|
217 327 | }
|
328 + | /* ServerCodegenVisitor.kt:345 */
|
218 329 | impl ListSnapshotBlocksInput {
|
219 - | /// Creates a new builder-style object to manufacture [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
330 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
331 + | /* ServerBuilderGenerator.kt:295 */
|
220 332 | pub fn builder() -> crate::input::list_snapshot_blocks_input::Builder {
|
333 + | /* ServerBuilderGenerator.kt:296 */
|
221 334 | crate::input::list_snapshot_blocks_input::Builder::default()
|
335 + | /* ServerBuilderGenerator.kt:295 */
|
222 336 | }
|
337 + | /* ServerCodegenVisitor.kt:345 */
|
223 338 | }
|
339 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
224 340 | impl crate::constrained::Constrained for crate::input::ListSnapshotBlocksInput {
|
225 341 | type Unconstrained = crate::input::list_snapshot_blocks_input::Builder;
|
226 342 | }
|
227 343 |
|
344 + | /* StructureGenerator.kt:197 */
|
228 345 | #[allow(missing_docs)] // documentation missing in model
|
346 + | /* RustType.kt:516 */
|
229 347 | #[derive(
|
230 348 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
231 349 | )]
|
232 - | pub struct ListChangedBlocksInput {
|
233 - | /// <p>The ID of the second snapshot to use for the comparison.</p><important>
|
350 + | pub /* StructureGenerator.kt:201 */ struct ListChangedBlocksInput {
|
351 + | /// /* StructureGenerator.kt:231 */<p>The ID of the second snapshot to use for the comparison.</p><important>
|
234 352 | /// <p>The <code>SecondSnapshotId</code> parameter must be specified with a <code>FirstSnapshotID</code> parameter; otherwise, an error occurs.</p>
|
235 353 | /// </important>
|
236 354 | pub second_snapshot_id: crate::model::SnapshotId,
|
237 - | /// <p>The ID of the first snapshot to use for the comparison.</p><important>
|
355 + | /// /* StructureGenerator.kt:231 */<p>The ID of the first snapshot to use for the comparison.</p><important>
|
238 356 | /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
|
239 357 | /// </important>
|
240 358 | pub first_snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
|
241 - | /// <p>The token to request the next page of results.</p>
|
359 + | /// /* StructureGenerator.kt:231 */<p>The token to request the next page of results.</p>
|
242 360 | pub next_token: ::std::option::Option<crate::model::PageToken>,
|
243 - | /// <p>The number of results to return.</p>
|
361 + | /// /* StructureGenerator.kt:231 */<p>The number of results to return.</p>
|
244 362 | pub max_results: ::std::option::Option<crate::model::MaxResults>,
|
245 - | /// <p>The block index from which the comparison should start.</p>
|
363 + | /// /* StructureGenerator.kt:231 */<p>The block index from which the comparison should start.</p>
|
246 364 | /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
|
247 365 | pub starting_block_index: ::std::option::Option<crate::model::BlockIndex>,
|
366 + | /* StructureGenerator.kt:201 */
|
248 367 | }
|
368 + | /* StructureGenerator.kt:135 */
|
249 369 | impl ListChangedBlocksInput {
|
250 - | /// <p>The ID of the second snapshot to use for the comparison.</p><important>
|
370 + | /// /* StructureGenerator.kt:231 */<p>The ID of the second snapshot to use for the comparison.</p><important>
|
251 371 | /// <p>The <code>SecondSnapshotId</code> parameter must be specified with a <code>FirstSnapshotID</code> parameter; otherwise, an error occurs.</p>
|
252 372 | /// </important>
|
373 + | /* StructureGenerator.kt:166 */
|
253 374 | pub fn second_snapshot_id(&self) -> &crate::model::SnapshotId {
|
375 + | /* StructureGenerator.kt:172 */
|
254 376 | &self.second_snapshot_id
|
377 + | /* StructureGenerator.kt:166 */
|
255 378 | }
|
256 - | /// <p>The ID of the first snapshot to use for the comparison.</p><important>
|
379 + | /// /* StructureGenerator.kt:231 */<p>The ID of the first snapshot to use for the comparison.</p><important>
|
257 380 | /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
|
258 381 | /// </important>
|
382 + | /* StructureGenerator.kt:166 */
|
259 383 | pub fn first_snapshot_id(&self) -> ::std::option::Option<&crate::model::SnapshotId> {
|
384 + | /* StructureGenerator.kt:170 */
|
260 385 | self.first_snapshot_id.as_ref()
|
386 + | /* StructureGenerator.kt:166 */
|
261 387 | }
|
262 - | /// <p>The token to request the next page of results.</p>
|
388 + | /// /* StructureGenerator.kt:231 */<p>The token to request the next page of results.</p>
|
389 + | /* StructureGenerator.kt:166 */
|
263 390 | pub fn next_token(&self) -> ::std::option::Option<&crate::model::PageToken> {
|
391 + | /* StructureGenerator.kt:170 */
|
264 392 | self.next_token.as_ref()
|
393 + | /* StructureGenerator.kt:166 */
|
265 394 | }
|
266 - | /// <p>The number of results to return.</p>
|
395 + | /// /* StructureGenerator.kt:231 */<p>The number of results to return.</p>
|
396 + | /* StructureGenerator.kt:166 */
|
267 397 | pub fn max_results(&self) -> ::std::option::Option<&crate::model::MaxResults> {
|
398 + | /* StructureGenerator.kt:170 */
|
268 399 | self.max_results.as_ref()
|
400 + | /* StructureGenerator.kt:166 */
|
269 401 | }
|
270 - | /// <p>The block index from which the comparison should start.</p>
|
402 + | /// /* StructureGenerator.kt:231 */<p>The block index from which the comparison should start.</p>
|
271 403 | /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
|
404 + | /* StructureGenerator.kt:166 */
|
272 405 | pub fn starting_block_index(&self) -> ::std::option::Option<&crate::model::BlockIndex> {
|
406 + | /* StructureGenerator.kt:170 */
|
273 407 | self.starting_block_index.as_ref()
|
408 + | /* StructureGenerator.kt:166 */
|
274 409 | }
|
410 + | /* StructureGenerator.kt:135 */
|
275 411 | }
|
412 + | /* ServerCodegenVisitor.kt:345 */
|
276 413 | impl ListChangedBlocksInput {
|
277 - | /// Creates a new builder-style object to manufacture [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
414 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
415 + | /* ServerBuilderGenerator.kt:295 */
|
278 416 | pub fn builder() -> crate::input::list_changed_blocks_input::Builder {
|
417 + | /* ServerBuilderGenerator.kt:296 */
|
279 418 | crate::input::list_changed_blocks_input::Builder::default()
|
419 + | /* ServerBuilderGenerator.kt:295 */
|
280 420 | }
|
421 + | /* ServerCodegenVisitor.kt:345 */
|
281 422 | }
|
423 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
282 424 | impl crate::constrained::Constrained for crate::input::ListChangedBlocksInput {
|
283 425 | type Unconstrained = crate::input::list_changed_blocks_input::Builder;
|
284 426 | }
|
285 427 |
|
428 + | /* StructureGenerator.kt:197 */
|
286 429 | #[allow(missing_docs)] // documentation missing in model
|
430 + | /* RustType.kt:516 */
|
287 431 | #[derive(
|
288 432 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
289 433 | )]
|
290 - | pub struct GetSnapshotBlockInput {
|
291 - | /// <p>The ID of the snapshot containing the block from which to get data.</p>
|
434 + | pub /* StructureGenerator.kt:201 */ struct GetSnapshotBlockInput {
|
435 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot containing the block from which to get data.</p>
|
292 436 | pub snapshot_id: crate::model::SnapshotId,
|
293 - | /// <p>The block token of the block from which to get data.</p>
|
437 + | /// /* StructureGenerator.kt:231 */<p>The block token of the block from which to get data.</p>
|
294 438 | /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
295 439 | pub block_token: crate::model::BlockToken,
|
296 - | /// <p>The block index of the block from which to get data.</p>
|
440 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block from which to get data.</p>
|
297 441 | /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
298 442 | pub block_index: crate::model::BlockIndex,
|
443 + | /* StructureGenerator.kt:201 */
|
299 444 | }
|
445 + | /* StructureGenerator.kt:135 */
|
300 446 | impl GetSnapshotBlockInput {
|
301 - | /// <p>The ID of the snapshot containing the block from which to get data.</p>
|
447 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot containing the block from which to get data.</p>
|
448 + | /* StructureGenerator.kt:166 */
|
302 449 | pub fn snapshot_id(&self) -> &crate::model::SnapshotId {
|
450 + | /* StructureGenerator.kt:172 */
|
303 451 | &self.snapshot_id
|
452 + | /* StructureGenerator.kt:166 */
|
304 453 | }
|
305 - | /// <p>The block token of the block from which to get data.</p>
|
454 + | /// /* StructureGenerator.kt:231 */<p>The block token of the block from which to get data.</p>
|
306 455 | /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
456 + | /* StructureGenerator.kt:166 */
|
307 457 | pub fn block_token(&self) -> &crate::model::BlockToken {
|
458 + | /* StructureGenerator.kt:172 */
|
308 459 | &self.block_token
|
460 + | /* StructureGenerator.kt:166 */
|
309 461 | }
|
310 - | /// <p>The block index of the block from which to get data.</p>
|
462 + | /// /* StructureGenerator.kt:231 */<p>The block index of the block from which to get data.</p>
|
311 463 | /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
464 + | /* StructureGenerator.kt:166 */
|
312 465 | pub fn block_index(&self) -> &crate::model::BlockIndex {
|
466 + | /* StructureGenerator.kt:172 */
|
313 467 | &self.block_index
|
468 + | /* StructureGenerator.kt:166 */
|
314 469 | }
|
470 + | /* StructureGenerator.kt:135 */
|
315 471 | }
|
472 + | /* ServerCodegenVisitor.kt:345 */
|
316 473 | impl GetSnapshotBlockInput {
|
317 - | /// Creates a new builder-style object to manufacture [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
474 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
475 + | /* ServerBuilderGenerator.kt:295 */
|
318 476 | pub fn builder() -> crate::input::get_snapshot_block_input::Builder {
|
477 + | /* ServerBuilderGenerator.kt:296 */
|
319 478 | crate::input::get_snapshot_block_input::Builder::default()
|
479 + | /* ServerBuilderGenerator.kt:295 */
|
320 480 | }
|
481 + | /* ServerCodegenVisitor.kt:345 */
|
321 482 | }
|
483 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
322 484 | impl crate::constrained::Constrained for crate::input::GetSnapshotBlockInput {
|
323 485 | type Unconstrained = crate::input::get_snapshot_block_input::Builder;
|
324 486 | }
|
325 487 |
|
488 + | /* StructureGenerator.kt:197 */
|
326 489 | #[allow(missing_docs)] // documentation missing in model
|
490 + | /* RustType.kt:516 */
|
327 491 | #[derive(
|
328 492 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
329 493 | )]
|
330 - | pub struct CompleteSnapshotInput {
|
331 - | /// <p>The number of blocks that were written to the snapshot.</p>
|
494 + | pub /* StructureGenerator.kt:201 */ struct CompleteSnapshotInput {
|
495 + | /// /* StructureGenerator.kt:231 */<p>The number of blocks that were written to the snapshot.</p>
|
332 496 | pub changed_blocks_count: crate::model::ChangedBlocksCount,
|
333 - | /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
497 + | /// /* StructureGenerator.kt:231 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
334 498 | pub checksum_aggregation_method: ::std::option::Option<crate::model::ChecksumAggregationMethod>,
|
335 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
499 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
336 500 | pub checksum_algorithm: ::std::option::Option<crate::model::ChecksumAlgorithm>,
|
337 - | /// <p>The ID of the snapshot.</p>
|
501 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
338 502 | pub snapshot_id: crate::model::SnapshotId,
|
339 - | /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
503 + | /// /* StructureGenerator.kt:231 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
340 504 | /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
|
341 505 | pub checksum: ::std::option::Option<crate::model::Checksum>,
|
506 + | /* StructureGenerator.kt:201 */
|
342 507 | }
|
508 + | /* StructureGenerator.kt:135 */
|
343 509 | impl CompleteSnapshotInput {
|
344 - | /// <p>The number of blocks that were written to the snapshot.</p>
|
510 + | /// /* StructureGenerator.kt:231 */<p>The number of blocks that were written to the snapshot.</p>
|
511 + | /* StructureGenerator.kt:166 */
|
345 512 | pub fn changed_blocks_count(&self) -> &crate::model::ChangedBlocksCount {
|
513 + | /* StructureGenerator.kt:172 */
|
346 514 | &self.changed_blocks_count
|
515 + | /* StructureGenerator.kt:166 */
|
347 516 | }
|
348 - | /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
517 + | /// /* StructureGenerator.kt:231 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
518 + | /* StructureGenerator.kt:166 */
|
349 519 | pub fn checksum_aggregation_method(
|
350 520 | &self,
|
351 521 | ) -> ::std::option::Option<&crate::model::ChecksumAggregationMethod> {
|
522 + | /* StructureGenerator.kt:170 */
|
352 523 | self.checksum_aggregation_method.as_ref()
|
524 + | /* StructureGenerator.kt:166 */
|
353 525 | }
|
354 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
526 + | /// /* StructureGenerator.kt:231 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
527 + | /* StructureGenerator.kt:166 */
|
355 528 | pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::model::ChecksumAlgorithm> {
|
529 + | /* StructureGenerator.kt:170 */
|
356 530 | self.checksum_algorithm.as_ref()
|
531 + | /* StructureGenerator.kt:166 */
|
357 532 | }
|
358 - | /// <p>The ID of the snapshot.</p>
|
533 + | /// /* StructureGenerator.kt:231 */<p>The ID of the snapshot.</p>
|
534 + | /* StructureGenerator.kt:166 */
|
359 535 | pub fn snapshot_id(&self) -> &crate::model::SnapshotId {
|
536 + | /* StructureGenerator.kt:172 */
|
360 537 | &self.snapshot_id
|
538 + | /* StructureGenerator.kt:166 */
|
361 539 | }
|
362 - | /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
540 + | /// /* StructureGenerator.kt:231 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
363 541 | /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
|
542 + | /* StructureGenerator.kt:166 */
|
364 543 | pub fn checksum(&self) -> ::std::option::Option<&crate::model::Checksum> {
|
544 + | /* StructureGenerator.kt:170 */
|
365 545 | self.checksum.as_ref()
|
546 + | /* StructureGenerator.kt:166 */
|
366 547 | }
|
548 + | /* StructureGenerator.kt:135 */
|
367 549 | }
|
550 + | /* ServerCodegenVisitor.kt:345 */
|
368 551 | impl CompleteSnapshotInput {
|
369 - | /// Creates a new builder-style object to manufacture [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
552 + | /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
553 + | /* ServerBuilderGenerator.kt:295 */
|
370 554 | pub fn builder() -> crate::input::complete_snapshot_input::Builder {
|
555 + | /* ServerBuilderGenerator.kt:296 */
|
371 556 | crate::input::complete_snapshot_input::Builder::default()
|
557 + | /* ServerBuilderGenerator.kt:295 */
|
372 558 | }
|
559 + | /* ServerCodegenVisitor.kt:345 */
|
373 560 | }
|
561 + | /* ServerStructureConstrainedTraitImpl.kt:21 */
|
374 562 | impl crate::constrained::Constrained for crate::input::CompleteSnapshotInput {
|
375 563 | type Unconstrained = crate::input::complete_snapshot_input::Builder;
|
376 564 | }
|
377 - | /// See [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
565 + | /// /* ServerBuilderGenerator.kt:171 */See [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
378 566 | pub mod start_snapshot_input {
|
379 567 |
|
568 + | /* RustType.kt:516 */
|
380 569 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
381 - | /// Holds one variant for each of the ways the builder can fail.
|
570 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
571 + | /* RustType.kt:516 */
|
382 572 | #[non_exhaustive]
|
573 + | /* ServerBuilderConstraintViolations.kt:75 */
|
383 574 | #[allow(clippy::enum_variant_names)]
|
384 575 | pub enum ConstraintViolation {
|
385 - | /// Constraint violation occurred building member `timeout` when building `StartSnapshotInput`.
|
576 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `timeout` when building `StartSnapshotInput`.
|
577 + | /* RustType.kt:516 */
|
386 578 | #[doc(hidden)]
|
579 + | /* ServerBuilderConstraintViolations.kt:164 */
|
387 580 | Timeout(crate::model::timeout::ConstraintViolation),
|
388 - | /// Constraint violation occurred building member `client_token` when building `StartSnapshotInput`.
|
581 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `client_token` when building `StartSnapshotInput`.
|
582 + | /* RustType.kt:516 */
|
389 583 | #[doc(hidden)]
|
584 + | /* ServerBuilderConstraintViolations.kt:164 */
|
390 585 | ClientToken(crate::model::idempotency_token::ConstraintViolation),
|
391 - | /// `volume_size` was not provided but it is required when building `StartSnapshotInput`.
|
586 + | /// /* ServerBuilderConstraintViolations.kt:138 */`volume_size` was not provided but it is required when building `StartSnapshotInput`.
|
587 + | /* ServerBuilderConstraintViolations.kt:143 */
|
392 588 | MissingVolumeSize,
|
393 - | /// Constraint violation occurred building member `volume_size` when building `StartSnapshotInput`.
|
589 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `volume_size` when building `StartSnapshotInput`.
|
590 + | /* RustType.kt:516 */
|
394 591 | #[doc(hidden)]
|
592 + | /* ServerBuilderConstraintViolations.kt:164 */
|
395 593 | VolumeSize(crate::model::volume_size::ConstraintViolation),
|
396 - | /// Constraint violation occurred building member `tags` when building `StartSnapshotInput`.
|
594 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `tags` when building `StartSnapshotInput`.
|
595 + | /* RustType.kt:516 */
|
397 596 | #[doc(hidden)]
|
597 + | /* ServerBuilderConstraintViolations.kt:164 */
|
398 598 | Tags(crate::model::tags::ConstraintViolation),
|
399 - | /// Constraint violation occurred building member `kms_key_arn` when building `StartSnapshotInput`.
|
599 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `kms_key_arn` when building `StartSnapshotInput`.
|
600 + | /* RustType.kt:516 */
|
400 601 | #[doc(hidden)]
|
602 + | /* ServerBuilderConstraintViolations.kt:164 */
|
401 603 | KmsKeyArn(crate::model::kms_key_arn::ConstraintViolation),
|
402 - | /// Constraint violation occurred building member `parent_snapshot_id` when building `StartSnapshotInput`.
|
604 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `parent_snapshot_id` when building `StartSnapshotInput`.
|
605 + | /* RustType.kt:516 */
|
403 606 | #[doc(hidden)]
|
607 + | /* ServerBuilderConstraintViolations.kt:164 */
|
404 608 | ParentSnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
405 - | /// Constraint violation occurred building member `description` when building `StartSnapshotInput`.
|
609 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `description` when building `StartSnapshotInput`.
|
610 + | /* RustType.kt:516 */
|
406 611 | #[doc(hidden)]
|
612 + | /* ServerBuilderConstraintViolations.kt:164 */
|
407 613 | Description(crate::model::description::ConstraintViolation),
|
614 + | /* ServerBuilderConstraintViolations.kt:75 */
|
408 615 | }
|
616 + | /* ServerBuilderConstraintViolations.kt:117 */
|
409 617 | impl ::std::fmt::Display for ConstraintViolation {
|
618 + | /* ServerBuilderConstraintViolations.kt:118 */
|
410 619 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
620 + | /* ServerBuilderConstraintViolations.kt:119 */
|
411 621 | match self {
|
412 - | ConstraintViolation::Timeout(_) => write!(f, "constraint violation occurred building member `timeout` when building `StartSnapshotInput`"),
|
413 - | ConstraintViolation::ClientToken(_) => write!(f, "constraint violation occurred building member `client_token` when building `StartSnapshotInput`"),
|
414 - | ConstraintViolation::MissingVolumeSize => write!(f, "`volume_size` was not provided but it is required when building `StartSnapshotInput`"),
|
415 - | ConstraintViolation::VolumeSize(_) => write!(f, "constraint violation occurred building member `volume_size` when building `StartSnapshotInput`"),
|
416 - | ConstraintViolation::Tags(_) => write!(f, "constraint violation occurred building member `tags` when building `StartSnapshotInput`"),
|
417 - | ConstraintViolation::KmsKeyArn(_) => write!(f, "constraint violation occurred building member `kms_key_arn` when building `StartSnapshotInput`"),
|
418 - | ConstraintViolation::ParentSnapshotId(_) => write!(f, "constraint violation occurred building member `parent_snapshot_id` when building `StartSnapshotInput`"),
|
419 - | ConstraintViolation::Description(_) => write!(f, "constraint violation occurred building member `description` when building `StartSnapshotInput`"),
|
420 - | }
|
421 - | }
|
422 - | }
|
622 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Timeout(_) => write!(f, "constraint violation occurred building member `timeout` when building `StartSnapshotInput`"),
|
623 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ClientToken(_) => write!(f, "constraint violation occurred building member `client_token` when building `StartSnapshotInput`"),
|
624 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingVolumeSize => write!(f, "`volume_size` was not provided but it is required when building `StartSnapshotInput`"),
|
625 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::VolumeSize(_) => write!(f, "constraint violation occurred building member `volume_size` when building `StartSnapshotInput`"),
|
626 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Tags(_) => write!(f, "constraint violation occurred building member `tags` when building `StartSnapshotInput`"),
|
627 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::KmsKeyArn(_) => write!(f, "constraint violation occurred building member `kms_key_arn` when building `StartSnapshotInput`"),
|
628 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ParentSnapshotId(_) => write!(f, "constraint violation occurred building member `parent_snapshot_id` when building `StartSnapshotInput`"),
|
629 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Description(_) => write!(f, "constraint violation occurred building member `description` when building `StartSnapshotInput`"),
|
630 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
631 + | /* ServerBuilderConstraintViolations.kt:118 */
|
632 + | }
|
633 + | /* ServerBuilderConstraintViolations.kt:117 */
|
634 + | }
|
635 + | /* ServerBuilderConstraintViolations.kt:84 */
|
423 636 | impl ::std::error::Error for ConstraintViolation {}
|
637 + | /* ServerBuilderConstraintViolations.kt:171 */
|
424 638 | impl ConstraintViolation {
|
425 639 | pub(crate) fn as_validation_exception_field(
|
426 640 | self,
|
427 641 | path: ::std::string::String,
|
428 642 | ) -> crate::model::ValidationExceptionField {
|
429 643 | match self {
|
430 644 | ConstraintViolation::Timeout(inner) => inner.as_validation_exception_field(path + "/Timeout"),
|
431 645 | ConstraintViolation::ClientToken(inner) => inner.as_validation_exception_field(path + "/ClientToken"),
|
432 646 | ConstraintViolation::MissingVolumeSize => crate::model::ValidationExceptionField {
|
433 647 | message: format!("Value at '{}/VolumeSize' failed to satisfy constraint: Member must not be null", path),
|
434 648 | path: path + "/VolumeSize",
|
435 649 | },
|
436 650 | ConstraintViolation::VolumeSize(inner) => inner.as_validation_exception_field(path + "/VolumeSize"),
|
437 651 | ConstraintViolation::Tags(inner) => inner.as_validation_exception_field(path + "/Tags"),
|
438 652 | ConstraintViolation::KmsKeyArn(inner) => inner.as_validation_exception_field(path + "/KmsKeyArn"),
|
439 653 | ConstraintViolation::ParentSnapshotId(inner) => inner.as_validation_exception_field(path + "/ParentSnapshotId"),
|
440 654 | ConstraintViolation::Description(inner) => inner.as_validation_exception_field(path + "/Description"),
|
441 655 | }
|
442 656 | }
|
443 657 | }
|
658 + | /* ServerBuilderGenerator.kt:234 */
|
444 659 | impl ::std::convert::From<ConstraintViolation>
|
445 660 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
446 661 | {
|
447 662 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
448 663 | let first_validation_exception_field =
|
449 664 | constraint_violation.as_validation_exception_field("".to_owned());
|
450 665 | let validation_exception = crate::error::ValidationException {
|
451 666 | message: format!(
|
452 667 | "1 validation error detected. {}",
|
453 668 | &first_validation_exception_field.message
|
454 669 | ),
|
455 670 | field_list: Some(vec![first_validation_exception_field]),
|
456 671 | };
|
457 672 | Self::ConstraintViolation(
|
458 673 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
459 674 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
460 675 | )
|
461 676 | }
|
462 677 | }
|
678 + | /* ServerBuilderGenerator.kt:244 */
|
463 679 | impl ::std::convert::From<Builder>
|
464 680 | for crate::constrained::MaybeConstrained<crate::input::StartSnapshotInput>
|
465 681 | {
|
466 682 | fn from(builder: Builder) -> Self {
|
467 683 | Self::Unconstrained(builder)
|
468 684 | }
|
469 685 | }
|
686 + | /* ServerBuilderGenerator.kt:446 */
|
470 687 | impl ::std::convert::TryFrom<Builder> for crate::input::StartSnapshotInput {
|
471 688 | type Error = ConstraintViolation;
|
472 689 |
|
473 690 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
474 691 | builder.build()
|
475 692 | }
|
476 693 | }
|
477 - | /// A builder for [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
694 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
695 + | /* RustType.kt:516 */
|
478 696 | #[derive(::std::clone::Clone, ::std::default::Default)]
|
697 + | /* ServerBuilderGenerator.kt:211 */
|
479 698 | pub struct Builder {
|
699 + | /* ServerBuilderGenerator.kt:308 */
|
480 700 | pub(crate) timeout:
|
481 701 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Timeout>>,
|
702 + | /* ServerBuilderGenerator.kt:308 */
|
482 703 | pub(crate) client_token: ::std::option::Option<
|
483 704 | crate::constrained::MaybeConstrained<crate::model::IdempotencyToken>,
|
484 705 | >,
|
706 + | /* ServerBuilderGenerator.kt:308 */
|
485 707 | pub(crate) volume_size:
|
486 708 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::VolumeSize>>,
|
709 + | /* ServerBuilderGenerator.kt:308 */
|
487 710 | pub(crate) tags: ::std::option::Option<
|
488 711 | crate::constrained::MaybeConstrained<
|
489 712 | crate::constrained::tags_constrained::TagsConstrained,
|
490 713 | >,
|
491 714 | >,
|
715 + | /* ServerBuilderGenerator.kt:308 */
|
492 716 | pub(crate) encrypted: ::std::option::Option<bool>,
|
717 + | /* ServerBuilderGenerator.kt:308 */
|
493 718 | pub(crate) kms_key_arn:
|
494 719 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::KmsKeyArn>>,
|
720 + | /* ServerBuilderGenerator.kt:308 */
|
495 721 | pub(crate) parent_snapshot_id:
|
496 722 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
723 + | /* ServerBuilderGenerator.kt:308 */
|
497 724 | pub(crate) description:
|
498 725 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Description>>,
|
726 + | /* ServerBuilderGenerator.kt:211 */
|
499 727 | }
|
728 + | /* ServerBuilderGenerator.kt:215 */
|
500 729 | impl Builder {
|
501 - | /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
730 + | /// /* ServerBuilderGenerator.kt:331 */<p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
502 731 | /// <ul>
|
503 732 | /// <li>
|
504 733 | /// <p>No blocks are written to the snapshot.</p></li>
|
505 734 | /// <li>
|
506 735 | /// <p>The snapshot is not completed after writing the last block of data.</p></li>
|
507 736 | /// </ul>
|
508 737 | /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
|
738 + | /* ServerBuilderGenerator.kt:343 */
|
509 739 | pub fn timeout(mut self, input: ::std::option::Option<crate::model::Timeout>) -> Self {
|
510 - | self.timeout = input.map(
|
511 - | #[allow(clippy::redundant_closure)]
|
512 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
513 - | );
|
740 + | /* ServerBuilderGenerator.kt:344 */
|
741 + | self.timeout =
|
742 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
743 + | /* ServerBuilderGenerator.kt:344 */;
|
514 744 | self
|
745 + | /* ServerBuilderGenerator.kt:343 */
|
515 746 | }
|
516 - | /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
747 + | /// /* ServerBuilderGenerator.kt:426 */<p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
517 748 | /// <ul>
|
518 749 | /// <li>
|
519 750 | /// <p>No blocks are written to the snapshot.</p></li>
|
520 751 | /// <li>
|
521 752 | /// <p>The snapshot is not completed after writing the last block of data.</p></li>
|
522 753 | /// </ul>
|
523 754 | /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
|
755 + | /* ServerBuilderGenerator.kt:428 */
|
524 756 | pub(crate) fn set_timeout(
|
525 757 | mut self,
|
526 758 | input: Option<
|
527 759 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Timeout>>,
|
528 760 | >,
|
529 761 | ) -> Self {
|
762 + | /* ServerBuilderGenerator.kt:429 */
|
530 763 | self.timeout = input.map(|v| v.into());
|
531 764 | self
|
765 + | /* ServerBuilderGenerator.kt:428 */
|
532 766 | }
|
533 - | /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
767 + | /// /* ServerBuilderGenerator.kt:331 */<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
534 768 | /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
|
535 769 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
770 + | /* ServerBuilderGenerator.kt:343 */
|
536 771 | pub fn client_token(
|
537 772 | mut self,
|
538 773 | input: ::std::option::Option<crate::model::IdempotencyToken>,
|
539 774 | ) -> Self {
|
540 - | self.client_token = input.map(
|
541 - | #[allow(clippy::redundant_closure)]
|
542 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
543 - | );
|
775 + | /* ServerBuilderGenerator.kt:344 */
|
776 + | self.client_token =
|
777 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
778 + | /* ServerBuilderGenerator.kt:344 */;
|
544 779 | self
|
780 + | /* ServerBuilderGenerator.kt:343 */
|
545 781 | }
|
546 - | /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
782 + | /// /* ServerBuilderGenerator.kt:426 */<p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
547 783 | /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
|
548 784 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
785 + | /* ServerBuilderGenerator.kt:428 */
|
549 786 | pub(crate) fn set_client_token(
|
550 787 | mut self,
|
551 788 | input: Option<
|
552 789 | impl ::std::convert::Into<
|
553 790 | crate::constrained::MaybeConstrained<crate::model::IdempotencyToken>,
|
554 791 | >,
|
555 792 | >,
|
556 793 | ) -> Self {
|
794 + | /* ServerBuilderGenerator.kt:429 */
|
557 795 | self.client_token = input.map(|v| v.into());
|
558 796 | self
|
797 + | /* ServerBuilderGenerator.kt:428 */
|
559 798 | }
|
560 - | /// <p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
799 + | /// /* ServerBuilderGenerator.kt:331 */<p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
800 + | /* ServerBuilderGenerator.kt:343 */
|
561 801 | pub fn volume_size(mut self, input: crate::model::VolumeSize) -> Self {
|
562 - | self.volume_size = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
802 + | /* ServerBuilderGenerator.kt:344 */
|
803 + | self.volume_size =
|
804 + | /* ServerBuilderGenerator.kt:345 */Some(
|
805 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
806 + | /* ServerBuilderGenerator.kt:345 */)
|
807 + | /* ServerBuilderGenerator.kt:344 */;
|
563 808 | self
|
809 + | /* ServerBuilderGenerator.kt:343 */
|
564 810 | }
|
565 - | /// <p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
811 + | /// /* ServerBuilderGenerator.kt:426 */<p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
812 + | /* ServerBuilderGenerator.kt:428 */
|
566 813 | pub(crate) fn set_volume_size(
|
567 814 | mut self,
|
568 815 | input: impl ::std::convert::Into<
|
569 816 | crate::constrained::MaybeConstrained<crate::model::VolumeSize>,
|
570 817 | >,
|
571 818 | ) -> Self {
|
819 + | /* ServerBuilderGenerator.kt:429 */
|
572 820 | self.volume_size = Some(input.into());
|
573 821 | self
|
822 + | /* ServerBuilderGenerator.kt:428 */
|
574 823 | }
|
575 - | /// <p>The tags to apply to the snapshot.</p>
|
824 + | /// /* ServerBuilderGenerator.kt:331 */<p>The tags to apply to the snapshot.</p>
|
825 + | /* ServerBuilderGenerator.kt:343 */
|
576 826 | pub fn tags(
|
577 827 | mut self,
|
578 828 | input: ::std::option::Option<::std::vec::Vec<crate::model::Tag>>,
|
579 829 | ) -> Self {
|
580 - | self.tags = input.map(
|
581 - | #[allow(clippy::redundant_closure)]
|
582 - | |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
|
583 - | );
|
830 + | /* ServerBuilderGenerator.kt:344 */
|
831 + | self.tags =
|
832 + | /* ServerBuilderGenerator.kt:369 */input.map(#[allow(clippy::redundant_closure)] |v|
|
833 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained((v).into())
|
834 + | /* ServerBuilderGenerator.kt:369 */)
|
835 + | /* ServerBuilderGenerator.kt:344 */;
|
584 836 | self
|
837 + | /* ServerBuilderGenerator.kt:343 */
|
585 838 | }
|
586 - | /// <p>The tags to apply to the snapshot.</p>
|
839 + | /// /* ServerBuilderGenerator.kt:426 */<p>The tags to apply to the snapshot.</p>
|
840 + | /* ServerBuilderGenerator.kt:428 */
|
587 841 | pub(crate) fn set_tags(
|
588 842 | mut self,
|
589 843 | input: Option<
|
590 844 | impl ::std::convert::Into<
|
591 845 | crate::constrained::MaybeConstrained<
|
592 846 | crate::constrained::tags_constrained::TagsConstrained,
|
593 847 | >,
|
594 848 | >,
|
595 849 | >,
|
596 850 | ) -> Self {
|
851 + | /* ServerBuilderGenerator.kt:429 */
|
597 852 | self.tags = input.map(|v| v.into());
|
598 853 | self
|
854 + | /* ServerBuilderGenerator.kt:428 */
|
599 855 | }
|
600 - | /// <p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
856 + | /// /* ServerBuilderGenerator.kt:331 */<p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
601 857 | /// <p>If you specify a value for <b>ParentSnapshotId</b>, omit this parameter.</p>
|
602 858 | /// <p>If you specify <code>true</code>, the snapshot is encrypted using the CMK specified using the <b>KmsKeyArn</b> parameter. If no value is specified for <b>KmsKeyArn</b>, the default CMK for your account is used. If no default CMK has been specified for your account, the AWS managed CMK is used. To set a default CMK for your account, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html"> ModifyEbsDefaultKmsKeyId</a>.</p>
|
603 859 | /// <p>If your account is enabled for encryption by default, you cannot set this parameter to <code>false</code>. In this case, you can omit this parameter.</p>
|
604 860 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
861 + | /* ServerBuilderGenerator.kt:343 */
|
605 862 | pub fn encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
|
606 - | self.encrypted = input;
|
863 + | /* ServerBuilderGenerator.kt:344 */
|
864 + | self.encrypted =
|
865 + | /* ServerBuilderGenerator.kt:376 */input
|
866 + | /* ServerBuilderGenerator.kt:344 */;
|
607 867 | self
|
868 + | /* ServerBuilderGenerator.kt:343 */
|
608 869 | }
|
609 - | /// <p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
870 + | /// /* ServerBuilderGenerator.kt:426 */<p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
610 871 | /// <p>If you specify a value for <b>ParentSnapshotId</b>, omit this parameter.</p>
|
611 872 | /// <p>If you specify <code>true</code>, the snapshot is encrypted using the CMK specified using the <b>KmsKeyArn</b> parameter. If no value is specified for <b>KmsKeyArn</b>, the default CMK for your account is used. If no default CMK has been specified for your account, the AWS managed CMK is used. To set a default CMK for your account, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html"> ModifyEbsDefaultKmsKeyId</a>.</p>
|
612 873 | /// <p>If your account is enabled for encryption by default, you cannot set this parameter to <code>false</code>. In this case, you can omit this parameter.</p>
|
613 874 | /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
875 + | /* ServerBuilderGenerator.kt:428 */
|
614 876 | pub(crate) fn set_encrypted(
|
615 877 | mut self,
|
616 878 | input: Option<impl ::std::convert::Into<bool>>,
|
617 879 | ) -> Self {
|
880 + | /* ServerBuilderGenerator.kt:429 */
|
618 881 | self.encrypted = input.map(|v| v.into());
|
619 882 | self
|
883 + | /* ServerBuilderGenerator.kt:428 */
|
620 884 | }
|
621 - | /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
885 + | /// /* ServerBuilderGenerator.kt:331 */<p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
622 886 | /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
|
623 887 | /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
|
888 + | /* ServerBuilderGenerator.kt:343 */
|
624 889 | pub fn kms_key_arn(
|
625 890 | mut self,
|
626 891 | input: ::std::option::Option<crate::model::KmsKeyArn>,
|
627 892 | ) -> Self {
|
628 - | self.kms_key_arn = input.map(
|
629 - | #[allow(clippy::redundant_closure)]
|
630 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
631 - | );
|
893 + | /* ServerBuilderGenerator.kt:344 */
|
894 + | self.kms_key_arn =
|
895 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
896 + | /* ServerBuilderGenerator.kt:344 */;
|
632 897 | self
|
898 + | /* ServerBuilderGenerator.kt:343 */
|
633 899 | }
|
634 - | /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
900 + | /// /* ServerBuilderGenerator.kt:426 */<p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
635 901 | /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
|
636 902 | /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
|
903 + | /* ServerBuilderGenerator.kt:428 */
|
637 904 | pub(crate) fn set_kms_key_arn(
|
638 905 | mut self,
|
639 906 | input: Option<
|
640 907 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::KmsKeyArn>>,
|
641 908 | >,
|
642 909 | ) -> Self {
|
910 + | /* ServerBuilderGenerator.kt:429 */
|
643 911 | self.kms_key_arn = input.map(|v| v.into());
|
644 912 | self
|
913 + | /* ServerBuilderGenerator.kt:428 */
|
645 914 | }
|
646 - | /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
915 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
647 916 | /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
|
917 + | /* ServerBuilderGenerator.kt:343 */
|
648 918 | pub fn parent_snapshot_id(
|
649 919 | mut self,
|
650 920 | input: ::std::option::Option<crate::model::SnapshotId>,
|
651 921 | ) -> Self {
|
652 - | self.parent_snapshot_id = input.map(
|
653 - | #[allow(clippy::redundant_closure)]
|
654 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
655 - | );
|
922 + | /* ServerBuilderGenerator.kt:344 */
|
923 + | self.parent_snapshot_id =
|
924 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
925 + | /* ServerBuilderGenerator.kt:344 */;
|
656 926 | self
|
927 + | /* ServerBuilderGenerator.kt:343 */
|
657 928 | }
|
658 - | /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
929 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
659 930 | /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
|
931 + | /* ServerBuilderGenerator.kt:428 */
|
660 932 | pub(crate) fn set_parent_snapshot_id(
|
661 933 | mut self,
|
662 934 | input: Option<
|
663 935 | impl ::std::convert::Into<
|
664 936 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
665 937 | >,
|
666 938 | >,
|
667 939 | ) -> Self {
|
940 + | /* ServerBuilderGenerator.kt:429 */
|
668 941 | self.parent_snapshot_id = input.map(|v| v.into());
|
669 942 | self
|
943 + | /* ServerBuilderGenerator.kt:428 */
|
670 944 | }
|
671 - | /// <p>A description for the snapshot.</p>
|
945 + | /// /* ServerBuilderGenerator.kt:331 */<p>A description for the snapshot.</p>
|
946 + | /* ServerBuilderGenerator.kt:343 */
|
672 947 | pub fn description(
|
673 948 | mut self,
|
674 949 | input: ::std::option::Option<crate::model::Description>,
|
675 950 | ) -> Self {
|
676 - | self.description = input.map(
|
677 - | #[allow(clippy::redundant_closure)]
|
678 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
679 - | );
|
951 + | /* ServerBuilderGenerator.kt:344 */
|
952 + | self.description =
|
953 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
954 + | /* ServerBuilderGenerator.kt:344 */;
|
680 955 | self
|
956 + | /* ServerBuilderGenerator.kt:343 */
|
681 957 | }
|
682 - | /// <p>A description for the snapshot.</p>
|
958 + | /// /* ServerBuilderGenerator.kt:426 */<p>A description for the snapshot.</p>
|
959 + | /* ServerBuilderGenerator.kt:428 */
|
683 960 | pub(crate) fn set_description(
|
684 961 | mut self,
|
685 962 | input: Option<
|
686 963 | impl ::std::convert::Into<
|
687 964 | crate::constrained::MaybeConstrained<crate::model::Description>,
|
688 965 | >,
|
689 966 | >,
|
690 967 | ) -> Self {
|
968 + | /* ServerBuilderGenerator.kt:429 */
|
691 969 | self.description = input.map(|v| v.into());
|
692 970 | self
|
971 + | /* ServerBuilderGenerator.kt:428 */
|
693 972 | }
|
694 - | /// Consumes the builder and constructs a [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
695 - | ///
|
973 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StartSnapshotInput`](crate::input::StartSnapshotInput).
|
974 + | /// /* ServerBuilderGenerator.kt:260 */
|
696 975 | /// The builder fails to construct a [`StartSnapshotInput`](crate::input::StartSnapshotInput) if a [`ConstraintViolation`] occurs.
|
697 976 | ///
|
698 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
977 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
978 + | /* ServerBuilderGenerator.kt:271 */
|
699 979 | pub fn build(self) -> Result<crate::input::StartSnapshotInput, ConstraintViolation> {
|
700 980 | self.build_enforcing_all_constraints()
|
701 981 | }
|
982 + | /* ServerBuilderGenerator.kt:283 */
|
702 983 | fn build_enforcing_all_constraints(
|
703 984 | self,
|
704 985 | ) -> Result<crate::input::StartSnapshotInput, ConstraintViolation> {
|
705 - | Ok(crate::input::StartSnapshotInput {
|
706 - | timeout: self
|
707 - | .timeout
|
708 - | .map(|v| match v {
|
709 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
710 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
711 - | })
|
712 - | .map(|res| res.map_err(ConstraintViolation::Timeout))
|
713 - | .transpose()?,
|
714 - | client_token: self
|
715 - | .client_token
|
716 - | .map(|v| match v {
|
717 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
718 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
719 - | })
|
720 - | .map(|res| res.map_err(ConstraintViolation::ClientToken))
|
721 - | .transpose()?,
|
722 - | volume_size: self
|
723 - | .volume_size
|
724 - | .map(|v| match v {
|
725 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
726 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
727 - | })
|
728 - | .map(|res| res.map_err(ConstraintViolation::VolumeSize))
|
729 - | .transpose()?
|
730 - | .ok_or(ConstraintViolation::MissingVolumeSize)?,
|
731 - | tags: self
|
732 - | .tags
|
733 - | .map(|v| match v {
|
734 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
735 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
736 - | })
|
737 - | .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Tags))
|
738 - | .transpose()?,
|
739 - | encrypted: self.encrypted,
|
740 - | kms_key_arn: self
|
741 - | .kms_key_arn
|
742 - | .map(|v| match v {
|
743 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
744 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
745 - | })
|
746 - | .map(|res| res.map_err(ConstraintViolation::KmsKeyArn))
|
747 - | .transpose()?,
|
748 - | parent_snapshot_id: self
|
749 - | .parent_snapshot_id
|
750 - | .map(|v| match v {
|
751 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
752 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
753 - | })
|
754 - | .map(|res| res.map_err(ConstraintViolation::ParentSnapshotId))
|
755 - | .transpose()?,
|
756 - | description: self
|
757 - | .description
|
758 - | .map(|v| match v {
|
759 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
760 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
761 - | })
|
762 - | .map(|res| res.map_err(ConstraintViolation::Description))
|
763 - | .transpose()?,
|
764 - | })
|
765 - | }
|
766 - | }
|
986 + | /* ServerBuilderGenerator.kt:287 */
|
987 + | Ok(
|
988 + | /* ServerBuilderGenerator.kt:542 */
|
989 + | crate::input::StartSnapshotInput {
|
990 + | /* ServerBuilderGenerator.kt:546 */
|
991 + | timeout: self
|
992 + | .timeout
|
993 + | /* ServerBuilderGenerator.kt:602 */
|
994 + | .map(|v| match v {
|
995 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
996 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
997 + | })
|
998 + | /* ServerBuilderGenerator.kt:614 */
|
999 + | .map(|res| res.map_err(ConstraintViolation::Timeout))
|
1000 + | .transpose()?,
|
1001 + | /* ServerBuilderGenerator.kt:546 */
|
1002 + | client_token: self
|
1003 + | .client_token
|
1004 + | /* ServerBuilderGenerator.kt:602 */
|
1005 + | .map(|v| match v {
|
1006 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1007 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1008 + | })
|
1009 + | /* ServerBuilderGenerator.kt:614 */
|
1010 + | .map(|res| res.map_err(ConstraintViolation::ClientToken))
|
1011 + | .transpose()?,
|
1012 + | /* ServerBuilderGenerator.kt:546 */
|
1013 + | volume_size: self
|
1014 + | .volume_size
|
1015 + | /* ServerBuilderGenerator.kt:602 */
|
1016 + | .map(|v| match v {
|
1017 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1018 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1019 + | })
|
1020 + | /* ServerBuilderGenerator.kt:614 */
|
1021 + | .map(|res| res.map_err(ConstraintViolation::VolumeSize))
|
1022 + | .transpose()?
|
1023 + | /* ServerBuilderGenerator.kt:569 */
|
1024 + | .ok_or(ConstraintViolation::MissingVolumeSize)?,
|
1025 + | /* ServerBuilderGenerator.kt:546 */
|
1026 + | tags: self
|
1027 + | .tags
|
1028 + | /* ServerBuilderGenerator.kt:602 */
|
1029 + | .map(|v| match v {
|
1030 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1031 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1032 + | })
|
1033 + | /* ServerBuilderGenerator.kt:614 */
|
1034 + | .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Tags))
|
1035 + | .transpose()?,
|
1036 + | /* ServerBuilderGenerator.kt:546 */
|
1037 + | encrypted: self.encrypted,
|
1038 + | /* ServerBuilderGenerator.kt:546 */
|
1039 + | kms_key_arn: self
|
1040 + | .kms_key_arn
|
1041 + | /* ServerBuilderGenerator.kt:602 */
|
1042 + | .map(|v| match v {
|
1043 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1044 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1045 + | })
|
1046 + | /* ServerBuilderGenerator.kt:614 */
|
1047 + | .map(|res| res.map_err(ConstraintViolation::KmsKeyArn))
|
1048 + | .transpose()?,
|
1049 + | /* ServerBuilderGenerator.kt:546 */
|
1050 + | parent_snapshot_id: self
|
1051 + | .parent_snapshot_id
|
1052 + | /* ServerBuilderGenerator.kt:602 */
|
1053 + | .map(|v| match v {
|
1054 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1055 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1056 + | })
|
1057 + | /* ServerBuilderGenerator.kt:614 */
|
1058 + | .map(|res| res.map_err(ConstraintViolation::ParentSnapshotId))
|
1059 + | .transpose()?,
|
1060 + | /* ServerBuilderGenerator.kt:546 */
|
1061 + | description: self
|
1062 + | .description
|
1063 + | /* ServerBuilderGenerator.kt:602 */
|
1064 + | .map(|v| match v {
|
1065 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1066 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1067 + | })
|
1068 + | /* ServerBuilderGenerator.kt:614 */
|
1069 + | .map(|res| res.map_err(ConstraintViolation::Description))
|
1070 + | .transpose()?,
|
1071 + | /* ServerBuilderGenerator.kt:542 */
|
1072 + | }, /* ServerBuilderGenerator.kt:287 */
|
1073 + | )
|
1074 + | /* ServerBuilderGenerator.kt:283 */
|
1075 + | }
|
1076 + | /* ServerBuilderGenerator.kt:215 */
|
1077 + | }
|
1078 + | /* ServerBuilderGenerator.kt:474 */
|
767 1079 | impl ::std::fmt::Debug for Builder {
|
1080 + | /* ServerBuilderGenerator.kt:475 */
|
768 1081 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1082 + | /* ServerBuilderGenerator.kt:476 */
|
769 1083 | let mut formatter = f.debug_struct("Builder");
|
1084 + | /* ServerBuilderGenerator.kt:481 */
|
770 1085 | formatter.field("timeout", &self.timeout);
|
1086 + | /* ServerBuilderGenerator.kt:481 */
|
771 1087 | formatter.field("client_token", &self.client_token);
|
1088 + | /* ServerBuilderGenerator.kt:481 */
|
772 1089 | formatter.field("volume_size", &self.volume_size);
|
1090 + | /* ServerBuilderGenerator.kt:481 */
|
773 1091 | formatter.field("tags", &self.tags);
|
1092 + | /* ServerBuilderGenerator.kt:481 */
|
774 1093 | formatter.field("encrypted", &self.encrypted);
|
1094 + | /* ServerBuilderGenerator.kt:481 */
|
775 1095 | formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
|
1096 + | /* ServerBuilderGenerator.kt:481 */
|
776 1097 | formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
|
1098 + | /* ServerBuilderGenerator.kt:481 */
|
777 1099 | formatter.field("description", &self.description);
|
1100 + | /* ServerBuilderGenerator.kt:485 */
|
778 1101 | formatter.finish()
|
1102 + | /* ServerBuilderGenerator.kt:475 */
|
779 1103 | }
|
1104 + | /* ServerBuilderGenerator.kt:474 */
|
780 1105 | }
|
1106 + |
|
1107 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
781 1108 | }
|
782 - | /// See [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
1109 + | /// /* ServerBuilderGenerator.kt:171 */See [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
783 1110 | pub mod put_snapshot_block_input {
|
784 1111 |
|
1112 + | /* RustType.kt:516 */
|
785 1113 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
786 - | /// Holds one variant for each of the ways the builder can fail.
|
1114 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1115 + | /* RustType.kt:516 */
|
787 1116 | #[non_exhaustive]
|
1117 + | /* ServerBuilderConstraintViolations.kt:75 */
|
788 1118 | #[allow(clippy::enum_variant_names)]
|
789 1119 | pub enum ConstraintViolation {
|
790 - | /// `snapshot_id` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1120 + | /// /* ServerBuilderConstraintViolations.kt:138 */`snapshot_id` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1121 + | /* ServerBuilderConstraintViolations.kt:143 */
|
791 1122 | MissingSnapshotId,
|
792 - | /// Constraint violation occurred building member `snapshot_id` when building `PutSnapshotBlockInput`.
|
1123 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `snapshot_id` when building `PutSnapshotBlockInput`.
|
1124 + | /* RustType.kt:516 */
|
793 1125 | #[doc(hidden)]
|
1126 + | /* ServerBuilderConstraintViolations.kt:164 */
|
794 1127 | SnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
795 - | /// `block_index` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1128 + | /// /* ServerBuilderConstraintViolations.kt:138 */`block_index` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1129 + | /* ServerBuilderConstraintViolations.kt:143 */
|
796 1130 | MissingBlockIndex,
|
797 - | /// Constraint violation occurred building member `block_index` when building `PutSnapshotBlockInput`.
|
1131 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `block_index` when building `PutSnapshotBlockInput`.
|
1132 + | /* RustType.kt:516 */
|
798 1133 | #[doc(hidden)]
|
1134 + | /* ServerBuilderConstraintViolations.kt:164 */
|
799 1135 | BlockIndex(crate::model::block_index::ConstraintViolation),
|
800 - | /// `checksum` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1136 + | /// /* ServerBuilderConstraintViolations.kt:138 */`checksum` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1137 + | /* ServerBuilderConstraintViolations.kt:143 */
|
801 1138 | MissingChecksum,
|
802 - | /// Constraint violation occurred building member `checksum` when building `PutSnapshotBlockInput`.
|
1139 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `checksum` when building `PutSnapshotBlockInput`.
|
1140 + | /* RustType.kt:516 */
|
803 1141 | #[doc(hidden)]
|
1142 + | /* ServerBuilderConstraintViolations.kt:164 */
|
804 1143 | Checksum(crate::model::checksum::ConstraintViolation),
|
805 - | /// Constraint violation occurred building member `progress` when building `PutSnapshotBlockInput`.
|
1144 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `progress` when building `PutSnapshotBlockInput`.
|
1145 + | /* RustType.kt:516 */
|
806 1146 | #[doc(hidden)]
|
1147 + | /* ServerBuilderConstraintViolations.kt:164 */
|
807 1148 | Progress(crate::model::progress::ConstraintViolation),
|
808 - | /// `block_data` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1149 + | /// /* ServerBuilderConstraintViolations.kt:138 */`block_data` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1150 + | /* ServerBuilderConstraintViolations.kt:143 */
|
809 1151 | MissingBlockData,
|
810 - | /// `data_length` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1152 + | /// /* ServerBuilderConstraintViolations.kt:138 */`data_length` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1153 + | /* ServerBuilderConstraintViolations.kt:143 */
|
811 1154 | MissingDataLength,
|
812 - | /// `checksum_algorithm` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1155 + | /// /* ServerBuilderConstraintViolations.kt:138 */`checksum_algorithm` was not provided but it is required when building `PutSnapshotBlockInput`.
|
1156 + | /* ServerBuilderConstraintViolations.kt:143 */
|
813 1157 | MissingChecksumAlgorithm,
|
814 - | /// Constraint violation occurred building member `checksum_algorithm` when building `PutSnapshotBlockInput`.
|
1158 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `checksum_algorithm` when building `PutSnapshotBlockInput`.
|
1159 + | /* RustType.kt:516 */
|
815 1160 | #[doc(hidden)]
|
1161 + | /* ServerBuilderConstraintViolations.kt:164 */
|
816 1162 | ChecksumAlgorithm(crate::model::checksum_algorithm::ConstraintViolation),
|
1163 + | /* ServerBuilderConstraintViolations.kt:75 */
|
817 1164 | }
|
1165 + | /* ServerBuilderConstraintViolations.kt:117 */
|
818 1166 | impl ::std::fmt::Display for ConstraintViolation {
|
1167 + | /* ServerBuilderConstraintViolations.kt:118 */
|
819 1168 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1169 + | /* ServerBuilderConstraintViolations.kt:119 */
|
820 1170 | match self {
|
821 - | ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
822 - | ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `PutSnapshotBlockInput`"),
|
823 - | ConstraintViolation::MissingBlockIndex => write!(f, "`block_index` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
824 - | ConstraintViolation::BlockIndex(_) => write!(f, "constraint violation occurred building member `block_index` when building `PutSnapshotBlockInput`"),
|
825 - | ConstraintViolation::MissingChecksum => write!(f, "`checksum` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
826 - | ConstraintViolation::Checksum(_) => write!(f, "constraint violation occurred building member `checksum` when building `PutSnapshotBlockInput`"),
|
827 - | ConstraintViolation::Progress(_) => write!(f, "constraint violation occurred building member `progress` when building `PutSnapshotBlockInput`"),
|
828 - | ConstraintViolation::MissingBlockData => write!(f, "`block_data` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
829 - | ConstraintViolation::MissingDataLength => write!(f, "`data_length` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
830 - | ConstraintViolation::MissingChecksumAlgorithm => write!(f, "`checksum_algorithm` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
831 - | ConstraintViolation::ChecksumAlgorithm(_) => write!(f, "constraint violation occurred building member `checksum_algorithm` when building `PutSnapshotBlockInput`"),
|
832 - | }
|
833 - | }
|
834 - | }
|
1171 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1172 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `PutSnapshotBlockInput`"),
|
1173 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBlockIndex => write!(f, "`block_index` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1174 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::BlockIndex(_) => write!(f, "constraint violation occurred building member `block_index` when building `PutSnapshotBlockInput`"),
|
1175 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingChecksum => write!(f, "`checksum` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1176 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Checksum(_) => write!(f, "constraint violation occurred building member `checksum` when building `PutSnapshotBlockInput`"),
|
1177 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Progress(_) => write!(f, "constraint violation occurred building member `progress` when building `PutSnapshotBlockInput`"),
|
1178 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBlockData => write!(f, "`block_data` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1179 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingDataLength => write!(f, "`data_length` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1180 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingChecksumAlgorithm => write!(f, "`checksum_algorithm` was not provided but it is required when building `PutSnapshotBlockInput`"),
|
1181 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ChecksumAlgorithm(_) => write!(f, "constraint violation occurred building member `checksum_algorithm` when building `PutSnapshotBlockInput`"),
|
1182 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1183 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1184 + | }
|
1185 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1186 + | }
|
1187 + | /* ServerBuilderConstraintViolations.kt:84 */
|
835 1188 | impl ::std::error::Error for ConstraintViolation {}
|
1189 + | /* ServerBuilderConstraintViolations.kt:171 */
|
836 1190 | impl ConstraintViolation {
|
837 1191 | pub(crate) fn as_validation_exception_field(
|
838 1192 | self,
|
839 1193 | path: ::std::string::String,
|
840 1194 | ) -> crate::model::ValidationExceptionField {
|
841 1195 | match self {
|
842 1196 | ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
|
843 1197 | message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
|
844 1198 | path: path + "/SnapshotId",
|
845 1199 | },
|
846 1200 | ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
|
847 1201 | ConstraintViolation::MissingBlockIndex => crate::model::ValidationExceptionField {
|
848 1202 | message: format!("Value at '{}/BlockIndex' failed to satisfy constraint: Member must not be null", path),
|
849 1203 | path: path + "/BlockIndex",
|
850 1204 | },
|
851 1205 | ConstraintViolation::BlockIndex(inner) => inner.as_validation_exception_field(path + "/BlockIndex"),
|
852 1206 | ConstraintViolation::MissingChecksum => crate::model::ValidationExceptionField {
|
853 1207 | message: format!("Value at '{}/Checksum' failed to satisfy constraint: Member must not be null", path),
|
854 1208 | path: path + "/Checksum",
|
855 1209 | },
|
856 1210 | ConstraintViolation::Checksum(inner) => inner.as_validation_exception_field(path + "/Checksum"),
|
857 1211 | ConstraintViolation::Progress(inner) => inner.as_validation_exception_field(path + "/Progress"),
|
858 1212 | ConstraintViolation::MissingBlockData => crate::model::ValidationExceptionField {
|
859 1213 | message: format!("Value at '{}/BlockData' failed to satisfy constraint: Member must not be null", path),
|
860 1214 | path: path + "/BlockData",
|
861 1215 | },
|
862 1216 | ConstraintViolation::MissingDataLength => crate::model::ValidationExceptionField {
|
863 1217 | message: format!("Value at '{}/DataLength' failed to satisfy constraint: Member must not be null", path),
|
864 1218 | path: path + "/DataLength",
|
865 1219 | },
|
866 1220 | ConstraintViolation::MissingChecksumAlgorithm => crate::model::ValidationExceptionField {
|
867 1221 | message: format!("Value at '{}/ChecksumAlgorithm' failed to satisfy constraint: Member must not be null", path),
|
868 1222 | path: path + "/ChecksumAlgorithm",
|
869 1223 | },
|
870 1224 | ConstraintViolation::ChecksumAlgorithm(inner) => inner.as_validation_exception_field(path + "/ChecksumAlgorithm"),
|
871 1225 | }
|
872 1226 | }
|
873 1227 | }
|
1228 + | /* ServerBuilderGenerator.kt:234 */
|
874 1229 | impl ::std::convert::From<ConstraintViolation>
|
875 1230 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
876 1231 | {
|
877 1232 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
878 1233 | let first_validation_exception_field =
|
879 1234 | constraint_violation.as_validation_exception_field("".to_owned());
|
880 1235 | let validation_exception = crate::error::ValidationException {
|
881 1236 | message: format!(
|
882 1237 | "1 validation error detected. {}",
|
883 1238 | &first_validation_exception_field.message
|
884 1239 | ),
|
885 1240 | field_list: Some(vec![first_validation_exception_field]),
|
886 1241 | };
|
887 1242 | Self::ConstraintViolation(
|
888 1243 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
889 1244 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
890 1245 | )
|
891 1246 | }
|
892 1247 | }
|
1248 + | /* ServerBuilderGenerator.kt:244 */
|
893 1249 | impl ::std::convert::From<Builder>
|
894 1250 | for crate::constrained::MaybeConstrained<crate::input::PutSnapshotBlockInput>
|
895 1251 | {
|
896 1252 | fn from(builder: Builder) -> Self {
|
897 1253 | Self::Unconstrained(builder)
|
898 1254 | }
|
899 1255 | }
|
1256 + | /* ServerBuilderGenerator.kt:446 */
|
900 1257 | impl ::std::convert::TryFrom<Builder> for crate::input::PutSnapshotBlockInput {
|
901 1258 | type Error = ConstraintViolation;
|
902 1259 |
|
903 1260 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
904 1261 | builder.build()
|
905 1262 | }
|
906 1263 | }
|
907 - | /// A builder for [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
1264 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
1265 + | /* RustType.kt:516 */
|
908 1266 | #[derive(::std::default::Default)]
|
1267 + | /* ServerBuilderGenerator.kt:211 */
|
909 1268 | pub struct Builder {
|
1269 + | /* ServerBuilderGenerator.kt:308 */
|
910 1270 | pub(crate) snapshot_id:
|
911 1271 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
1272 + | /* ServerBuilderGenerator.kt:308 */
|
912 1273 | pub(crate) block_index:
|
913 1274 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::BlockIndex>>,
|
1275 + | /* ServerBuilderGenerator.kt:308 */
|
914 1276 | pub(crate) checksum:
|
915 1277 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Checksum>>,
|
1278 + | /* ServerBuilderGenerator.kt:308 */
|
916 1279 | pub(crate) progress:
|
917 1280 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Progress>>,
|
1281 + | /* ServerBuilderGenerator.kt:308 */
|
918 1282 | pub(crate) block_data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
1283 + | /* ServerBuilderGenerator.kt:308 */
|
919 1284 | pub(crate) data_length: ::std::option::Option<i32>,
|
1285 + | /* ServerBuilderGenerator.kt:308 */
|
920 1286 | pub(crate) checksum_algorithm: ::std::option::Option<
|
921 1287 | crate::constrained::MaybeConstrained<crate::model::ChecksumAlgorithm>,
|
922 1288 | >,
|
1289 + | /* ServerBuilderGenerator.kt:211 */
|
923 1290 | }
|
1291 + | /* ServerBuilderGenerator.kt:215 */
|
924 1292 | impl Builder {
|
925 - | /// <p>The ID of the snapshot.</p>
|
1293 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the snapshot.</p>
|
1294 + | /* ServerBuilderGenerator.kt:343 */
|
926 1295 | pub fn snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
|
927 - | self.snapshot_id = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1296 + | /* ServerBuilderGenerator.kt:344 */
|
1297 + | self.snapshot_id =
|
1298 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1299 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1300 + | /* ServerBuilderGenerator.kt:345 */)
|
1301 + | /* ServerBuilderGenerator.kt:344 */;
|
928 1302 | self
|
1303 + | /* ServerBuilderGenerator.kt:343 */
|
929 1304 | }
|
930 - | /// <p>The ID of the snapshot.</p>
|
1305 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the snapshot.</p>
|
1306 + | /* ServerBuilderGenerator.kt:428 */
|
931 1307 | pub(crate) fn set_snapshot_id(
|
932 1308 | mut self,
|
933 1309 | input: impl ::std::convert::Into<
|
934 1310 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
935 1311 | >,
|
936 1312 | ) -> Self {
|
1313 + | /* ServerBuilderGenerator.kt:429 */
|
937 1314 | self.snapshot_id = Some(input.into());
|
938 1315 | self
|
1316 + | /* ServerBuilderGenerator.kt:428 */
|
939 1317 | }
|
940 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
1318 + | /// /* ServerBuilderGenerator.kt:331 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
1319 + | /* ServerBuilderGenerator.kt:343 */
|
941 1320 | pub fn block_index(mut self, input: crate::model::BlockIndex) -> Self {
|
942 - | self.block_index = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1321 + | /* ServerBuilderGenerator.kt:344 */
|
1322 + | self.block_index =
|
1323 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1324 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1325 + | /* ServerBuilderGenerator.kt:345 */)
|
1326 + | /* ServerBuilderGenerator.kt:344 */;
|
943 1327 | self
|
1328 + | /* ServerBuilderGenerator.kt:343 */
|
944 1329 | }
|
945 - | /// <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
1330 + | /// /* ServerBuilderGenerator.kt:426 */<p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
1331 + | /* ServerBuilderGenerator.kt:428 */
|
946 1332 | pub(crate) fn set_block_index(
|
947 1333 | mut self,
|
948 1334 | input: impl ::std::convert::Into<
|
949 1335 | crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
|
950 1336 | >,
|
951 1337 | ) -> Self {
|
1338 + | /* ServerBuilderGenerator.kt:429 */
|
952 1339 | self.block_index = Some(input.into());
|
953 1340 | self
|
1341 + | /* ServerBuilderGenerator.kt:428 */
|
954 1342 | }
|
955 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
1343 + | /// /* ServerBuilderGenerator.kt:331 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
1344 + | /* ServerBuilderGenerator.kt:343 */
|
956 1345 | pub fn checksum(mut self, input: crate::model::Checksum) -> Self {
|
957 - | self.checksum = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1346 + | /* ServerBuilderGenerator.kt:344 */
|
1347 + | self.checksum =
|
1348 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1349 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1350 + | /* ServerBuilderGenerator.kt:345 */)
|
1351 + | /* ServerBuilderGenerator.kt:344 */;
|
958 1352 | self
|
1353 + | /* ServerBuilderGenerator.kt:343 */
|
959 1354 | }
|
960 - | /// <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
1355 + | /// /* ServerBuilderGenerator.kt:426 */<p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
1356 + | /* ServerBuilderGenerator.kt:428 */
|
961 1357 | pub(crate) fn set_checksum(
|
962 1358 | mut self,
|
963 1359 | input: impl ::std::convert::Into<
|
964 1360 | crate::constrained::MaybeConstrained<crate::model::Checksum>,
|
965 1361 | >,
|
966 1362 | ) -> Self {
|
1363 + | /* ServerBuilderGenerator.kt:429 */
|
967 1364 | self.checksum = Some(input.into());
|
968 1365 | self
|
1366 + | /* ServerBuilderGenerator.kt:428 */
|
969 1367 | }
|
970 - | /// <p>The progress of the write process, as a percentage.</p>
|
1368 + | /// /* ServerBuilderGenerator.kt:331 */<p>The progress of the write process, as a percentage.</p>
|
1369 + | /* ServerBuilderGenerator.kt:343 */
|
971 1370 | pub fn progress(mut self, input: ::std::option::Option<crate::model::Progress>) -> Self {
|
972 - | self.progress = input.map(
|
973 - | #[allow(clippy::redundant_closure)]
|
974 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
975 - | );
|
1371 + | /* ServerBuilderGenerator.kt:344 */
|
1372 + | self.progress =
|
1373 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1374 + | /* ServerBuilderGenerator.kt:344 */;
|
976 1375 | self
|
1376 + | /* ServerBuilderGenerator.kt:343 */
|
977 1377 | }
|
978 - | /// <p>The progress of the write process, as a percentage.</p>
|
1378 + | /// /* ServerBuilderGenerator.kt:426 */<p>The progress of the write process, as a percentage.</p>
|
1379 + | /* ServerBuilderGenerator.kt:428 */
|
979 1380 | pub(crate) fn set_progress(
|
980 1381 | mut self,
|
981 1382 | input: Option<
|
982 1383 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Progress>>,
|
983 1384 | >,
|
984 1385 | ) -> Self {
|
1386 + | /* ServerBuilderGenerator.kt:429 */
|
985 1387 | self.progress = input.map(|v| v.into());
|
986 1388 | self
|
1389 + | /* ServerBuilderGenerator.kt:428 */
|
987 1390 | }
|
988 - | /// <p>The data to write to the block.</p>
|
1391 + | /// /* ServerBuilderGenerator.kt:331 */<p>The data to write to the block.</p>
|
989 1392 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
1393 + | /* ServerBuilderGenerator.kt:343 */
|
990 1394 | pub fn block_data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
|
991 - | self.block_data = Some(input);
|
1395 + | /* ServerBuilderGenerator.kt:344 */
|
1396 + | self.block_data =
|
1397 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1398 + | /* ServerBuilderGenerator.kt:376 */input
|
1399 + | /* ServerBuilderGenerator.kt:345 */)
|
1400 + | /* ServerBuilderGenerator.kt:344 */;
|
992 1401 | self
|
1402 + | /* ServerBuilderGenerator.kt:343 */
|
993 1403 | }
|
994 - | /// <p>The data to write to the block.</p>
|
1404 + | /// /* ServerBuilderGenerator.kt:426 */<p>The data to write to the block.</p>
|
995 1405 | /// <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
1406 + | /* ServerBuilderGenerator.kt:428 */
|
996 1407 | pub(crate) fn set_block_data(
|
997 1408 | mut self,
|
998 1409 | input: impl ::std::convert::Into<::aws_smithy_types::byte_stream::ByteStream>,
|
999 1410 | ) -> Self {
|
1411 + | /* ServerBuilderGenerator.kt:429 */
|
1000 1412 | self.block_data = Some(input.into());
|
1001 1413 | self
|
1414 + | /* ServerBuilderGenerator.kt:428 */
|
1002 1415 | }
|
1003 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
1416 + | /// /* ServerBuilderGenerator.kt:331 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
1004 1417 | /// <p>Valid values: <code>524288</code></p>
|
1418 + | /* ServerBuilderGenerator.kt:343 */
|
1005 1419 | pub fn data_length(mut self, input: i32) -> Self {
|
1006 - | self.data_length = Some(input);
|
1420 + | /* ServerBuilderGenerator.kt:344 */
|
1421 + | self.data_length =
|
1422 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1423 + | /* ServerBuilderGenerator.kt:376 */input
|
1424 + | /* ServerBuilderGenerator.kt:345 */)
|
1425 + | /* ServerBuilderGenerator.kt:344 */;
|
1007 1426 | self
|
1427 + | /* ServerBuilderGenerator.kt:343 */
|
1008 1428 | }
|
1009 - | /// <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
1429 + | /// /* ServerBuilderGenerator.kt:426 */<p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
1010 1430 | /// <p>Valid values: <code>524288</code></p>
|
1431 + | /* ServerBuilderGenerator.kt:428 */
|
1011 1432 | pub(crate) fn set_data_length(mut self, input: impl ::std::convert::Into<i32>) -> Self {
|
1433 + | /* ServerBuilderGenerator.kt:429 */
|
1012 1434 | self.data_length = Some(input.into());
|
1013 1435 | self
|
1436 + | /* ServerBuilderGenerator.kt:428 */
|
1014 1437 | }
|
1015 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
1438 + | /// /* ServerBuilderGenerator.kt:331 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
1439 + | /* ServerBuilderGenerator.kt:343 */
|
1016 1440 | pub fn checksum_algorithm(mut self, input: crate::model::ChecksumAlgorithm) -> Self {
|
1441 + | /* ServerBuilderGenerator.kt:344 */
|
1017 1442 | self.checksum_algorithm =
|
1018 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1443 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1444 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1445 + | /* ServerBuilderGenerator.kt:345 */)
|
1446 + | /* ServerBuilderGenerator.kt:344 */;
|
1019 1447 | self
|
1448 + | /* ServerBuilderGenerator.kt:343 */
|
1020 1449 | }
|
1021 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
1450 + | /// /* ServerBuilderGenerator.kt:426 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
1451 + | /* ServerBuilderGenerator.kt:428 */
|
1022 1452 | pub(crate) fn set_checksum_algorithm(
|
1023 1453 | mut self,
|
1024 1454 | input: impl ::std::convert::Into<
|
1025 1455 | crate::constrained::MaybeConstrained<crate::model::ChecksumAlgorithm>,
|
1026 1456 | >,
|
1027 1457 | ) -> Self {
|
1458 + | /* ServerBuilderGenerator.kt:429 */
|
1028 1459 | self.checksum_algorithm = Some(input.into());
|
1029 1460 | self
|
1461 + | /* ServerBuilderGenerator.kt:428 */
|
1030 1462 | }
|
1031 - | /// Consumes the builder and constructs a [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
1032 - | ///
|
1463 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput).
|
1464 + | /// /* ServerBuilderGenerator.kt:260 */
|
1033 1465 | /// The builder fails to construct a [`PutSnapshotBlockInput`](crate::input::PutSnapshotBlockInput) if a [`ConstraintViolation`] occurs.
|
1034 1466 | ///
|
1035 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1467 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1468 + | /* ServerBuilderGenerator.kt:271 */
|
1036 1469 | pub fn build(self) -> Result<crate::input::PutSnapshotBlockInput, ConstraintViolation> {
|
1037 1470 | self.build_enforcing_all_constraints()
|
1038 1471 | }
|
1472 + | /* ServerBuilderGenerator.kt:283 */
|
1039 1473 | fn build_enforcing_all_constraints(
|
1040 1474 | self,
|
1041 1475 | ) -> Result<crate::input::PutSnapshotBlockInput, ConstraintViolation> {
|
1042 - | Ok(crate::input::PutSnapshotBlockInput {
|
1043 - | snapshot_id: self
|
1044 - | .snapshot_id
|
1045 - | .map(|v| match v {
|
1046 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1047 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1048 - | })
|
1049 - | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
1050 - | .transpose()?
|
1051 - | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
1052 - | block_index: self
|
1053 - | .block_index
|
1054 - | .map(|v| match v {
|
1055 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1056 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1057 - | })
|
1058 - | .map(|res| res.map_err(ConstraintViolation::BlockIndex))
|
1059 - | .transpose()?
|
1060 - | .ok_or(ConstraintViolation::MissingBlockIndex)?,
|
1061 - | checksum: self
|
1062 - | .checksum
|
1063 - | .map(|v| match v {
|
1064 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1065 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1066 - | })
|
1067 - | .map(|res| res.map_err(ConstraintViolation::Checksum))
|
1068 - | .transpose()?
|
1069 - | .ok_or(ConstraintViolation::MissingChecksum)?,
|
1070 - | progress: self
|
1071 - | .progress
|
1072 - | .map(|v| match v {
|
1073 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1074 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1075 - | })
|
1076 - | .map(|res| res.map_err(ConstraintViolation::Progress))
|
1077 - | .transpose()?,
|
1078 - | block_data: self
|
1079 - | .block_data
|
1080 - | .ok_or(ConstraintViolation::MissingBlockData)?,
|
1081 - | data_length: self
|
1082 - | .data_length
|
1083 - | .ok_or(ConstraintViolation::MissingDataLength)?,
|
1084 - | checksum_algorithm: self
|
1085 - | .checksum_algorithm
|
1086 - | .map(|v| match v {
|
1087 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1088 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1089 - | })
|
1090 - | .map(|res| res.map_err(ConstraintViolation::ChecksumAlgorithm))
|
1091 - | .transpose()?
|
1092 - | .ok_or(ConstraintViolation::MissingChecksumAlgorithm)?,
|
1093 - | })
|
1094 - | }
|
1095 - | }
|
1476 + | /* ServerBuilderGenerator.kt:287 */
|
1477 + | Ok(
|
1478 + | /* ServerBuilderGenerator.kt:542 */
|
1479 + | crate::input::PutSnapshotBlockInput {
|
1480 + | /* ServerBuilderGenerator.kt:546 */
|
1481 + | snapshot_id: self
|
1482 + | .snapshot_id
|
1483 + | /* ServerBuilderGenerator.kt:602 */
|
1484 + | .map(|v| match v {
|
1485 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1486 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1487 + | })
|
1488 + | /* ServerBuilderGenerator.kt:614 */
|
1489 + | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
1490 + | .transpose()?
|
1491 + | /* ServerBuilderGenerator.kt:569 */
|
1492 + | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
1493 + | /* ServerBuilderGenerator.kt:546 */
|
1494 + | block_index: self
|
1495 + | .block_index
|
1496 + | /* ServerBuilderGenerator.kt:602 */
|
1497 + | .map(|v| match v {
|
1498 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1499 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1500 + | })
|
1501 + | /* ServerBuilderGenerator.kt:614 */
|
1502 + | .map(|res| res.map_err(ConstraintViolation::BlockIndex))
|
1503 + | .transpose()?
|
1504 + | /* ServerBuilderGenerator.kt:569 */
|
1505 + | .ok_or(ConstraintViolation::MissingBlockIndex)?,
|
1506 + | /* ServerBuilderGenerator.kt:546 */
|
1507 + | checksum: self
|
1508 + | .checksum
|
1509 + | /* ServerBuilderGenerator.kt:602 */
|
1510 + | .map(|v| match v {
|
1511 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1512 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1513 + | })
|
1514 + | /* ServerBuilderGenerator.kt:614 */
|
1515 + | .map(|res| res.map_err(ConstraintViolation::Checksum))
|
1516 + | .transpose()?
|
1517 + | /* ServerBuilderGenerator.kt:569 */
|
1518 + | .ok_or(ConstraintViolation::MissingChecksum)?,
|
1519 + | /* ServerBuilderGenerator.kt:546 */
|
1520 + | progress: self
|
1521 + | .progress
|
1522 + | /* ServerBuilderGenerator.kt:602 */
|
1523 + | .map(|v| match v {
|
1524 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1525 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1526 + | })
|
1527 + | /* ServerBuilderGenerator.kt:614 */
|
1528 + | .map(|res| res.map_err(ConstraintViolation::Progress))
|
1529 + | .transpose()?,
|
1530 + | /* ServerBuilderGenerator.kt:546 */
|
1531 + | block_data: self
|
1532 + | .block_data
|
1533 + | /* ServerBuilderGenerator.kt:569 */
|
1534 + | .ok_or(ConstraintViolation::MissingBlockData)?,
|
1535 + | /* ServerBuilderGenerator.kt:546 */
|
1536 + | data_length: self
|
1537 + | .data_length
|
1538 + | /* ServerBuilderGenerator.kt:569 */
|
1539 + | .ok_or(ConstraintViolation::MissingDataLength)?,
|
1540 + | /* ServerBuilderGenerator.kt:546 */
|
1541 + | checksum_algorithm: self
|
1542 + | .checksum_algorithm
|
1543 + | /* ServerBuilderGenerator.kt:602 */
|
1544 + | .map(|v| match v {
|
1545 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1546 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1547 + | })
|
1548 + | /* ServerBuilderGenerator.kt:614 */
|
1549 + | .map(|res| res.map_err(ConstraintViolation::ChecksumAlgorithm))
|
1550 + | .transpose()?
|
1551 + | /* ServerBuilderGenerator.kt:569 */
|
1552 + | .ok_or(ConstraintViolation::MissingChecksumAlgorithm)?,
|
1553 + | /* ServerBuilderGenerator.kt:542 */
|
1554 + | }, /* ServerBuilderGenerator.kt:287 */
|
1555 + | )
|
1556 + | /* ServerBuilderGenerator.kt:283 */
|
1557 + | }
|
1558 + | /* ServerBuilderGenerator.kt:215 */
|
1559 + | }
|
1560 + | /* ServerBuilderGenerator.kt:474 */
|
1096 1561 | impl ::std::fmt::Debug for Builder {
|
1562 + | /* ServerBuilderGenerator.kt:475 */
|
1097 1563 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1564 + | /* ServerBuilderGenerator.kt:476 */
|
1098 1565 | let mut formatter = f.debug_struct("Builder");
|
1566 + | /* ServerBuilderGenerator.kt:481 */
|
1099 1567 | formatter.field("snapshot_id", &self.snapshot_id);
|
1568 + | /* ServerBuilderGenerator.kt:481 */
|
1100 1569 | formatter.field("block_index", &self.block_index);
|
1570 + | /* ServerBuilderGenerator.kt:481 */
|
1101 1571 | formatter.field("checksum", &self.checksum);
|
1572 + | /* ServerBuilderGenerator.kt:481 */
|
1102 1573 | formatter.field("progress", &self.progress);
|
1574 + | /* ServerBuilderGenerator.kt:481 */
|
1103 1575 | formatter.field("block_data", &"*** Sensitive Data Redacted ***");
|
1576 + | /* ServerBuilderGenerator.kt:481 */
|
1104 1577 | formatter.field("data_length", &self.data_length);
|
1578 + | /* ServerBuilderGenerator.kt:481 */
|
1105 1579 | formatter.field("checksum_algorithm", &self.checksum_algorithm);
|
1580 + | /* ServerBuilderGenerator.kt:485 */
|
1106 1581 | formatter.finish()
|
1582 + | /* ServerBuilderGenerator.kt:475 */
|
1107 1583 | }
|
1584 + | /* ServerBuilderGenerator.kt:474 */
|
1108 1585 | }
|
1586 + |
|
1587 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1109 1588 | }
|
1110 - | /// See [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1589 + | /// /* ServerBuilderGenerator.kt:171 */See [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1111 1590 | pub mod list_snapshot_blocks_input {
|
1112 1591 |
|
1592 + | /* RustType.kt:516 */
|
1113 1593 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1114 - | /// Holds one variant for each of the ways the builder can fail.
|
1594 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1595 + | /* RustType.kt:516 */
|
1115 1596 | #[non_exhaustive]
|
1597 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1116 1598 | #[allow(clippy::enum_variant_names)]
|
1117 1599 | pub enum ConstraintViolation {
|
1118 - | /// Constraint violation occurred building member `max_results` when building `ListSnapshotBlocksInput`.
|
1600 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `max_results` when building `ListSnapshotBlocksInput`.
|
1601 + | /* RustType.kt:516 */
|
1119 1602 | #[doc(hidden)]
|
1603 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1120 1604 | MaxResults(crate::model::max_results::ConstraintViolation),
|
1121 - | /// Constraint violation occurred building member `starting_block_index` when building `ListSnapshotBlocksInput`.
|
1605 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `starting_block_index` when building `ListSnapshotBlocksInput`.
|
1606 + | /* RustType.kt:516 */
|
1122 1607 | #[doc(hidden)]
|
1608 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1123 1609 | StartingBlockIndex(crate::model::block_index::ConstraintViolation),
|
1124 - | /// Constraint violation occurred building member `next_token` when building `ListSnapshotBlocksInput`.
|
1610 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `next_token` when building `ListSnapshotBlocksInput`.
|
1611 + | /* RustType.kt:516 */
|
1125 1612 | #[doc(hidden)]
|
1613 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1126 1614 | NextToken(crate::model::page_token::ConstraintViolation),
|
1127 - | /// `snapshot_id` was not provided but it is required when building `ListSnapshotBlocksInput`.
|
1615 + | /// /* ServerBuilderConstraintViolations.kt:138 */`snapshot_id` was not provided but it is required when building `ListSnapshotBlocksInput`.
|
1616 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1128 1617 | MissingSnapshotId,
|
1129 - | /// Constraint violation occurred building member `snapshot_id` when building `ListSnapshotBlocksInput`.
|
1618 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `snapshot_id` when building `ListSnapshotBlocksInput`.
|
1619 + | /* RustType.kt:516 */
|
1130 1620 | #[doc(hidden)]
|
1621 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1131 1622 | SnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
1623 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1132 1624 | }
|
1625 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1133 1626 | impl ::std::fmt::Display for ConstraintViolation {
|
1627 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1134 1628 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1629 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1135 1630 | match self {
|
1136 - | ConstraintViolation::MaxResults(_) => write!(f, "constraint violation occurred building member `max_results` when building `ListSnapshotBlocksInput`"),
|
1137 - | ConstraintViolation::StartingBlockIndex(_) => write!(f, "constraint violation occurred building member `starting_block_index` when building `ListSnapshotBlocksInput`"),
|
1138 - | ConstraintViolation::NextToken(_) => write!(f, "constraint violation occurred building member `next_token` when building `ListSnapshotBlocksInput`"),
|
1139 - | ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `ListSnapshotBlocksInput`"),
|
1140 - | ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `ListSnapshotBlocksInput`"),
|
1141 - | }
|
1631 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MaxResults(_) => write!(f, "constraint violation occurred building member `max_results` when building `ListSnapshotBlocksInput`"),
|
1632 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::StartingBlockIndex(_) => write!(f, "constraint violation occurred building member `starting_block_index` when building `ListSnapshotBlocksInput`"),
|
1633 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::NextToken(_) => write!(f, "constraint violation occurred building member `next_token` when building `ListSnapshotBlocksInput`"),
|
1634 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `ListSnapshotBlocksInput`"),
|
1635 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `ListSnapshotBlocksInput`"),
|
1636 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1637 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1142 1638 | }
|
1639 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1143 1640 | }
|
1641 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1144 1642 | impl ::std::error::Error for ConstraintViolation {}
|
1643 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1145 1644 | impl ConstraintViolation {
|
1146 1645 | pub(crate) fn as_validation_exception_field(
|
1147 1646 | self,
|
1148 1647 | path: ::std::string::String,
|
1149 1648 | ) -> crate::model::ValidationExceptionField {
|
1150 1649 | match self {
|
1151 1650 | ConstraintViolation::MaxResults(inner) => inner.as_validation_exception_field(path + "/MaxResults"),
|
1152 1651 | ConstraintViolation::StartingBlockIndex(inner) => inner.as_validation_exception_field(path + "/StartingBlockIndex"),
|
1153 1652 | ConstraintViolation::NextToken(inner) => inner.as_validation_exception_field(path + "/NextToken"),
|
1154 1653 | ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
|
1155 1654 | message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
|
1156 1655 | path: path + "/SnapshotId",
|
1157 1656 | },
|
1158 1657 | ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
|
1159 1658 | }
|
1160 1659 | }
|
1161 1660 | }
|
1661 + | /* ServerBuilderGenerator.kt:234 */
|
1162 1662 | impl ::std::convert::From<ConstraintViolation>
|
1163 1663 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1164 1664 | {
|
1165 1665 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1166 1666 | let first_validation_exception_field =
|
1167 1667 | constraint_violation.as_validation_exception_field("".to_owned());
|
1168 1668 | let validation_exception = crate::error::ValidationException {
|
1169 1669 | message: format!(
|
1170 1670 | "1 validation error detected. {}",
|
1171 1671 | &first_validation_exception_field.message
|
1172 1672 | ),
|
1173 1673 | field_list: Some(vec![first_validation_exception_field]),
|
1174 1674 | };
|
1175 1675 | Self::ConstraintViolation(
|
1176 1676 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1177 1677 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1178 1678 | )
|
1179 1679 | }
|
1180 1680 | }
|
1681 + | /* ServerBuilderGenerator.kt:244 */
|
1181 1682 | impl ::std::convert::From<Builder>
|
1182 1683 | for crate::constrained::MaybeConstrained<crate::input::ListSnapshotBlocksInput>
|
1183 1684 | {
|
1184 1685 | fn from(builder: Builder) -> Self {
|
1185 1686 | Self::Unconstrained(builder)
|
1186 1687 | }
|
1187 1688 | }
|
1689 + | /* ServerBuilderGenerator.kt:446 */
|
1188 1690 | impl ::std::convert::TryFrom<Builder> for crate::input::ListSnapshotBlocksInput {
|
1189 1691 | type Error = ConstraintViolation;
|
1190 1692 |
|
1191 1693 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1192 1694 | builder.build()
|
1193 1695 | }
|
1194 1696 | }
|
1195 - | /// A builder for [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1697 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1698 + | /* RustType.kt:516 */
|
1196 1699 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1700 + | /* ServerBuilderGenerator.kt:211 */
|
1197 1701 | pub struct Builder {
|
1702 + | /* ServerBuilderGenerator.kt:308 */
|
1198 1703 | pub(crate) max_results:
|
1199 1704 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MaxResults>>,
|
1705 + | /* ServerBuilderGenerator.kt:308 */
|
1200 1706 | pub(crate) starting_block_index:
|
1201 1707 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::BlockIndex>>,
|
1708 + | /* ServerBuilderGenerator.kt:308 */
|
1202 1709 | pub(crate) next_token:
|
1203 1710 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
|
1711 + | /* ServerBuilderGenerator.kt:308 */
|
1204 1712 | pub(crate) snapshot_id:
|
1205 1713 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
1714 + | /* ServerBuilderGenerator.kt:211 */
|
1206 1715 | }
|
1716 + | /* ServerBuilderGenerator.kt:215 */
|
1207 1717 | impl Builder {
|
1208 - | /// <p>The number of results to return.</p>
|
1718 + | /// /* ServerBuilderGenerator.kt:331 */<p>The number of results to return.</p>
|
1719 + | /* ServerBuilderGenerator.kt:343 */
|
1209 1720 | pub fn max_results(
|
1210 1721 | mut self,
|
1211 1722 | input: ::std::option::Option<crate::model::MaxResults>,
|
1212 1723 | ) -> Self {
|
1213 - | self.max_results = input.map(
|
1214 - | #[allow(clippy::redundant_closure)]
|
1215 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1216 - | );
|
1724 + | /* ServerBuilderGenerator.kt:344 */
|
1725 + | self.max_results =
|
1726 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1727 + | /* ServerBuilderGenerator.kt:344 */;
|
1217 1728 | self
|
1729 + | /* ServerBuilderGenerator.kt:343 */
|
1218 1730 | }
|
1219 - | /// <p>The number of results to return.</p>
|
1731 + | /// /* ServerBuilderGenerator.kt:426 */<p>The number of results to return.</p>
|
1732 + | /* ServerBuilderGenerator.kt:428 */
|
1220 1733 | pub(crate) fn set_max_results(
|
1221 1734 | mut self,
|
1222 1735 | input: Option<
|
1223 1736 | impl ::std::convert::Into<
|
1224 1737 | crate::constrained::MaybeConstrained<crate::model::MaxResults>,
|
1225 1738 | >,
|
1226 1739 | >,
|
1227 1740 | ) -> Self {
|
1741 + | /* ServerBuilderGenerator.kt:429 */
|
1228 1742 | self.max_results = input.map(|v| v.into());
|
1229 1743 | self
|
1744 + | /* ServerBuilderGenerator.kt:428 */
|
1230 1745 | }
|
1231 - | /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
1746 + | /// /* ServerBuilderGenerator.kt:331 */<p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
1747 + | /* ServerBuilderGenerator.kt:343 */
|
1232 1748 | pub fn starting_block_index(
|
1233 1749 | mut self,
|
1234 1750 | input: ::std::option::Option<crate::model::BlockIndex>,
|
1235 1751 | ) -> Self {
|
1236 - | self.starting_block_index = input.map(
|
1237 - | #[allow(clippy::redundant_closure)]
|
1238 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1239 - | );
|
1752 + | /* ServerBuilderGenerator.kt:344 */
|
1753 + | self.starting_block_index =
|
1754 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1755 + | /* ServerBuilderGenerator.kt:344 */;
|
1240 1756 | self
|
1757 + | /* ServerBuilderGenerator.kt:343 */
|
1241 1758 | }
|
1242 - | /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
1759 + | /// /* ServerBuilderGenerator.kt:426 */<p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
1760 + | /* ServerBuilderGenerator.kt:428 */
|
1243 1761 | pub(crate) fn set_starting_block_index(
|
1244 1762 | mut self,
|
1245 1763 | input: Option<
|
1246 1764 | impl ::std::convert::Into<
|
1247 1765 | crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
|
1248 1766 | >,
|
1249 1767 | >,
|
1250 1768 | ) -> Self {
|
1769 + | /* ServerBuilderGenerator.kt:429 */
|
1251 1770 | self.starting_block_index = input.map(|v| v.into());
|
1252 1771 | self
|
1772 + | /* ServerBuilderGenerator.kt:428 */
|
1253 1773 | }
|
1254 - | /// <p>The token to request the next page of results.</p>
|
1774 + | /// /* ServerBuilderGenerator.kt:331 */<p>The token to request the next page of results.</p>
|
1775 + | /* ServerBuilderGenerator.kt:343 */
|
1255 1776 | pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
|
1256 - | self.next_token = input.map(
|
1257 - | #[allow(clippy::redundant_closure)]
|
1258 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1259 - | );
|
1777 + | /* ServerBuilderGenerator.kt:344 */
|
1778 + | self.next_token =
|
1779 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
1780 + | /* ServerBuilderGenerator.kt:344 */;
|
1260 1781 | self
|
1782 + | /* ServerBuilderGenerator.kt:343 */
|
1261 1783 | }
|
1262 - | /// <p>The token to request the next page of results.</p>
|
1784 + | /// /* ServerBuilderGenerator.kt:426 */<p>The token to request the next page of results.</p>
|
1785 + | /* ServerBuilderGenerator.kt:428 */
|
1263 1786 | pub(crate) fn set_next_token(
|
1264 1787 | mut self,
|
1265 1788 | input: Option<
|
1266 1789 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
|
1267 1790 | >,
|
1268 1791 | ) -> Self {
|
1792 + | /* ServerBuilderGenerator.kt:429 */
|
1269 1793 | self.next_token = input.map(|v| v.into());
|
1270 1794 | self
|
1795 + | /* ServerBuilderGenerator.kt:428 */
|
1271 1796 | }
|
1272 - | /// <p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
1797 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
1798 + | /* ServerBuilderGenerator.kt:343 */
|
1273 1799 | pub fn snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
|
1274 - | self.snapshot_id = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
1800 + | /* ServerBuilderGenerator.kt:344 */
|
1801 + | self.snapshot_id =
|
1802 + | /* ServerBuilderGenerator.kt:345 */Some(
|
1803 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
1804 + | /* ServerBuilderGenerator.kt:345 */)
|
1805 + | /* ServerBuilderGenerator.kt:344 */;
|
1275 1806 | self
|
1807 + | /* ServerBuilderGenerator.kt:343 */
|
1276 1808 | }
|
1277 - | /// <p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
1809 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
1810 + | /* ServerBuilderGenerator.kt:428 */
|
1278 1811 | pub(crate) fn set_snapshot_id(
|
1279 1812 | mut self,
|
1280 1813 | input: impl ::std::convert::Into<
|
1281 1814 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
1282 1815 | >,
|
1283 1816 | ) -> Self {
|
1817 + | /* ServerBuilderGenerator.kt:429 */
|
1284 1818 | self.snapshot_id = Some(input.into());
|
1285 1819 | self
|
1820 + | /* ServerBuilderGenerator.kt:428 */
|
1286 1821 | }
|
1287 - | /// Consumes the builder and constructs a [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1288 - | ///
|
1822 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput).
|
1823 + | /// /* ServerBuilderGenerator.kt:260 */
|
1289 1824 | /// The builder fails to construct a [`ListSnapshotBlocksInput`](crate::input::ListSnapshotBlocksInput) if a [`ConstraintViolation`] occurs.
|
1290 1825 | ///
|
1291 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1826 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1827 + | /* ServerBuilderGenerator.kt:271 */
|
1292 1828 | pub fn build(self) -> Result<crate::input::ListSnapshotBlocksInput, ConstraintViolation> {
|
1293 1829 | self.build_enforcing_all_constraints()
|
1294 1830 | }
|
1831 + | /* ServerBuilderGenerator.kt:283 */
|
1295 1832 | fn build_enforcing_all_constraints(
|
1296 1833 | self,
|
1297 1834 | ) -> Result<crate::input::ListSnapshotBlocksInput, ConstraintViolation> {
|
1298 - | Ok(crate::input::ListSnapshotBlocksInput {
|
1299 - | max_results: self
|
1300 - | .max_results
|
1301 - | .map(|v| match v {
|
1302 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1303 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1304 - | })
|
1305 - | .map(|res| res.map_err(ConstraintViolation::MaxResults))
|
1306 - | .transpose()?,
|
1307 - | starting_block_index: self
|
1308 - | .starting_block_index
|
1309 - | .map(|v| match v {
|
1310 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1311 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1312 - | })
|
1313 - | .map(|res| res.map_err(ConstraintViolation::StartingBlockIndex))
|
1314 - | .transpose()?,
|
1315 - | next_token: self
|
1316 - | .next_token
|
1317 - | .map(|v| match v {
|
1318 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1319 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1320 - | })
|
1321 - | .map(|res| res.map_err(ConstraintViolation::NextToken))
|
1322 - | .transpose()?,
|
1323 - | snapshot_id: self
|
1324 - | .snapshot_id
|
1325 - | .map(|v| match v {
|
1326 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1327 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1328 - | })
|
1329 - | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
1330 - | .transpose()?
|
1331 - | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
1332 - | })
|
1333 - | }
|
1835 + | /* ServerBuilderGenerator.kt:287 */
|
1836 + | Ok(
|
1837 + | /* ServerBuilderGenerator.kt:542 */
|
1838 + | crate::input::ListSnapshotBlocksInput {
|
1839 + | /* ServerBuilderGenerator.kt:546 */
|
1840 + | max_results: self
|
1841 + | .max_results
|
1842 + | /* ServerBuilderGenerator.kt:602 */
|
1843 + | .map(|v| match v {
|
1844 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1845 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1846 + | })
|
1847 + | /* ServerBuilderGenerator.kt:614 */
|
1848 + | .map(|res| res.map_err(ConstraintViolation::MaxResults))
|
1849 + | .transpose()?,
|
1850 + | /* ServerBuilderGenerator.kt:546 */
|
1851 + | starting_block_index: self
|
1852 + | .starting_block_index
|
1853 + | /* ServerBuilderGenerator.kt:602 */
|
1854 + | .map(|v| match v {
|
1855 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1856 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1857 + | })
|
1858 + | /* ServerBuilderGenerator.kt:614 */
|
1859 + | .map(|res| res.map_err(ConstraintViolation::StartingBlockIndex))
|
1860 + | .transpose()?,
|
1861 + | /* ServerBuilderGenerator.kt:546 */
|
1862 + | next_token: self
|
1863 + | .next_token
|
1864 + | /* ServerBuilderGenerator.kt:602 */
|
1865 + | .map(|v| match v {
|
1866 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1867 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1868 + | })
|
1869 + | /* ServerBuilderGenerator.kt:614 */
|
1870 + | .map(|res| res.map_err(ConstraintViolation::NextToken))
|
1871 + | .transpose()?,
|
1872 + | /* ServerBuilderGenerator.kt:546 */
|
1873 + | snapshot_id: self
|
1874 + | .snapshot_id
|
1875 + | /* ServerBuilderGenerator.kt:602 */
|
1876 + | .map(|v| match v {
|
1877 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1878 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1879 + | })
|
1880 + | /* ServerBuilderGenerator.kt:614 */
|
1881 + | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
1882 + | .transpose()?
|
1883 + | /* ServerBuilderGenerator.kt:569 */
|
1884 + | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
1885 + | /* ServerBuilderGenerator.kt:542 */
|
1886 + | }, /* ServerBuilderGenerator.kt:287 */
|
1887 + | )
|
1888 + | /* ServerBuilderGenerator.kt:283 */
|
1889 + | }
|
1890 + | /* ServerBuilderGenerator.kt:215 */
|
1334 1891 | }
|
1892 + |
|
1893 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1335 1894 | }
|
1336 - | /// See [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
1895 + | /// /* ServerBuilderGenerator.kt:171 */See [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
1337 1896 | pub mod list_changed_blocks_input {
|
1338 1897 |
|
1898 + | /* RustType.kt:516 */
|
1339 1899 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1340 - | /// Holds one variant for each of the ways the builder can fail.
|
1900 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
1901 + | /* RustType.kt:516 */
|
1341 1902 | #[non_exhaustive]
|
1903 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1342 1904 | #[allow(clippy::enum_variant_names)]
|
1343 1905 | pub enum ConstraintViolation {
|
1344 - | /// `second_snapshot_id` was not provided but it is required when building `ListChangedBlocksInput`.
|
1906 + | /// /* ServerBuilderConstraintViolations.kt:138 */`second_snapshot_id` was not provided but it is required when building `ListChangedBlocksInput`.
|
1907 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1345 1908 | MissingSecondSnapshotId,
|
1346 - | /// Constraint violation occurred building member `second_snapshot_id` when building `ListChangedBlocksInput`.
|
1909 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `second_snapshot_id` when building `ListChangedBlocksInput`.
|
1910 + | /* RustType.kt:516 */
|
1347 1911 | #[doc(hidden)]
|
1912 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1348 1913 | SecondSnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
1349 - | /// Constraint violation occurred building member `first_snapshot_id` when building `ListChangedBlocksInput`.
|
1914 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `first_snapshot_id` when building `ListChangedBlocksInput`.
|
1915 + | /* RustType.kt:516 */
|
1350 1916 | #[doc(hidden)]
|
1917 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1351 1918 | FirstSnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
1352 - | /// Constraint violation occurred building member `next_token` when building `ListChangedBlocksInput`.
|
1919 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `next_token` when building `ListChangedBlocksInput`.
|
1920 + | /* RustType.kt:516 */
|
1353 1921 | #[doc(hidden)]
|
1922 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1354 1923 | NextToken(crate::model::page_token::ConstraintViolation),
|
1355 - | /// Constraint violation occurred building member `max_results` when building `ListChangedBlocksInput`.
|
1924 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `max_results` when building `ListChangedBlocksInput`.
|
1925 + | /* RustType.kt:516 */
|
1356 1926 | #[doc(hidden)]
|
1927 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1357 1928 | MaxResults(crate::model::max_results::ConstraintViolation),
|
1358 - | /// Constraint violation occurred building member `starting_block_index` when building `ListChangedBlocksInput`.
|
1929 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `starting_block_index` when building `ListChangedBlocksInput`.
|
1930 + | /* RustType.kt:516 */
|
1359 1931 | #[doc(hidden)]
|
1932 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1360 1933 | StartingBlockIndex(crate::model::block_index::ConstraintViolation),
|
1934 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1361 1935 | }
|
1936 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1362 1937 | impl ::std::fmt::Display for ConstraintViolation {
|
1938 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1363 1939 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1940 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1364 1941 | match self {
|
1365 - | ConstraintViolation::MissingSecondSnapshotId => write!(f, "`second_snapshot_id` was not provided but it is required when building `ListChangedBlocksInput`"),
|
1366 - | ConstraintViolation::SecondSnapshotId(_) => write!(f, "constraint violation occurred building member `second_snapshot_id` when building `ListChangedBlocksInput`"),
|
1367 - | ConstraintViolation::FirstSnapshotId(_) => write!(f, "constraint violation occurred building member `first_snapshot_id` when building `ListChangedBlocksInput`"),
|
1368 - | ConstraintViolation::NextToken(_) => write!(f, "constraint violation occurred building member `next_token` when building `ListChangedBlocksInput`"),
|
1369 - | ConstraintViolation::MaxResults(_) => write!(f, "constraint violation occurred building member `max_results` when building `ListChangedBlocksInput`"),
|
1370 - | ConstraintViolation::StartingBlockIndex(_) => write!(f, "constraint violation occurred building member `starting_block_index` when building `ListChangedBlocksInput`"),
|
1371 - | }
|
1372 - | }
|
1373 - | }
|
1942 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingSecondSnapshotId => write!(f, "`second_snapshot_id` was not provided but it is required when building `ListChangedBlocksInput`"),
|
1943 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::SecondSnapshotId(_) => write!(f, "constraint violation occurred building member `second_snapshot_id` when building `ListChangedBlocksInput`"),
|
1944 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::FirstSnapshotId(_) => write!(f, "constraint violation occurred building member `first_snapshot_id` when building `ListChangedBlocksInput`"),
|
1945 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::NextToken(_) => write!(f, "constraint violation occurred building member `next_token` when building `ListChangedBlocksInput`"),
|
1946 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MaxResults(_) => write!(f, "constraint violation occurred building member `max_results` when building `ListChangedBlocksInput`"),
|
1947 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::StartingBlockIndex(_) => write!(f, "constraint violation occurred building member `starting_block_index` when building `ListChangedBlocksInput`"),
|
1948 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
1949 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1950 + | }
|
1951 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1952 + | }
|
1953 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1374 1954 | impl ::std::error::Error for ConstraintViolation {}
|
1955 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1375 1956 | impl ConstraintViolation {
|
1376 1957 | pub(crate) fn as_validation_exception_field(
|
1377 1958 | self,
|
1378 1959 | path: ::std::string::String,
|
1379 1960 | ) -> crate::model::ValidationExceptionField {
|
1380 1961 | match self {
|
1381 1962 | ConstraintViolation::MissingSecondSnapshotId => crate::model::ValidationExceptionField {
|
1382 1963 | message: format!("Value at '{}/SecondSnapshotId' failed to satisfy constraint: Member must not be null", path),
|
1383 1964 | path: path + "/SecondSnapshotId",
|
1384 1965 | },
|
1385 1966 | ConstraintViolation::SecondSnapshotId(inner) => inner.as_validation_exception_field(path + "/SecondSnapshotId"),
|
1386 1967 | ConstraintViolation::FirstSnapshotId(inner) => inner.as_validation_exception_field(path + "/FirstSnapshotId"),
|
1387 1968 | ConstraintViolation::NextToken(inner) => inner.as_validation_exception_field(path + "/NextToken"),
|
1388 1969 | ConstraintViolation::MaxResults(inner) => inner.as_validation_exception_field(path + "/MaxResults"),
|
1389 1970 | ConstraintViolation::StartingBlockIndex(inner) => inner.as_validation_exception_field(path + "/StartingBlockIndex"),
|
1390 1971 | }
|
1391 1972 | }
|
1392 1973 | }
|
1974 + | /* ServerBuilderGenerator.kt:234 */
|
1393 1975 | impl ::std::convert::From<ConstraintViolation>
|
1394 1976 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1395 1977 | {
|
1396 1978 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1397 1979 | let first_validation_exception_field =
|
1398 1980 | constraint_violation.as_validation_exception_field("".to_owned());
|
1399 1981 | let validation_exception = crate::error::ValidationException {
|
1400 1982 | message: format!(
|
1401 1983 | "1 validation error detected. {}",
|
1402 1984 | &first_validation_exception_field.message
|
1403 1985 | ),
|
1404 1986 | field_list: Some(vec![first_validation_exception_field]),
|
1405 1987 | };
|
1406 1988 | Self::ConstraintViolation(
|
1407 1989 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1408 1990 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1409 1991 | )
|
1410 1992 | }
|
1411 1993 | }
|
1994 + | /* ServerBuilderGenerator.kt:244 */
|
1412 1995 | impl ::std::convert::From<Builder>
|
1413 1996 | for crate::constrained::MaybeConstrained<crate::input::ListChangedBlocksInput>
|
1414 1997 | {
|
1415 1998 | fn from(builder: Builder) -> Self {
|
1416 1999 | Self::Unconstrained(builder)
|
1417 2000 | }
|
1418 2001 | }
|
2002 + | /* ServerBuilderGenerator.kt:446 */
|
1419 2003 | impl ::std::convert::TryFrom<Builder> for crate::input::ListChangedBlocksInput {
|
1420 2004 | type Error = ConstraintViolation;
|
1421 2005 |
|
1422 2006 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1423 2007 | builder.build()
|
1424 2008 | }
|
1425 2009 | }
|
1426 - | /// A builder for [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
2010 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
2011 + | /* RustType.kt:516 */
|
1427 2012 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2013 + | /* ServerBuilderGenerator.kt:211 */
|
1428 2014 | pub struct Builder {
|
2015 + | /* ServerBuilderGenerator.kt:308 */
|
1429 2016 | pub(crate) second_snapshot_id:
|
1430 2017 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
2018 + | /* ServerBuilderGenerator.kt:308 */
|
1431 2019 | pub(crate) first_snapshot_id:
|
1432 2020 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
2021 + | /* ServerBuilderGenerator.kt:308 */
|
1433 2022 | pub(crate) next_token:
|
1434 2023 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
|
2024 + | /* ServerBuilderGenerator.kt:308 */
|
1435 2025 | pub(crate) max_results:
|
1436 2026 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MaxResults>>,
|
2027 + | /* ServerBuilderGenerator.kt:308 */
|
1437 2028 | pub(crate) starting_block_index:
|
1438 2029 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::BlockIndex>>,
|
2030 + | /* ServerBuilderGenerator.kt:211 */
|
1439 2031 | }
|
2032 + | /* ServerBuilderGenerator.kt:215 */
|
1440 2033 | impl Builder {
|
1441 - | /// <p>The ID of the second snapshot to use for the comparison.</p><important>
|
2034 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the second snapshot to use for the comparison.</p><important>
|
1442 2035 | /// <p>The <code>SecondSnapshotId</code> parameter must be specified with a <code>FirstSnapshotID</code> parameter; otherwise, an error occurs.</p>
|
1443 2036 | /// </important>
|
2037 + | /* ServerBuilderGenerator.kt:343 */
|
1444 2038 | pub fn second_snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
|
2039 + | /* ServerBuilderGenerator.kt:344 */
|
1445 2040 | self.second_snapshot_id =
|
1446 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2041 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2042 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2043 + | /* ServerBuilderGenerator.kt:345 */)
|
2044 + | /* ServerBuilderGenerator.kt:344 */;
|
1447 2045 | self
|
2046 + | /* ServerBuilderGenerator.kt:343 */
|
1448 2047 | }
|
1449 - | /// <p>The ID of the second snapshot to use for the comparison.</p><important>
|
2048 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the second snapshot to use for the comparison.</p><important>
|
1450 2049 | /// <p>The <code>SecondSnapshotId</code> parameter must be specified with a <code>FirstSnapshotID</code> parameter; otherwise, an error occurs.</p>
|
1451 2050 | /// </important>
|
2051 + | /* ServerBuilderGenerator.kt:428 */
|
1452 2052 | pub(crate) fn set_second_snapshot_id(
|
1453 2053 | mut self,
|
1454 2054 | input: impl ::std::convert::Into<
|
1455 2055 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
1456 2056 | >,
|
1457 2057 | ) -> Self {
|
2058 + | /* ServerBuilderGenerator.kt:429 */
|
1458 2059 | self.second_snapshot_id = Some(input.into());
|
1459 2060 | self
|
2061 + | /* ServerBuilderGenerator.kt:428 */
|
1460 2062 | }
|
1461 - | /// <p>The ID of the first snapshot to use for the comparison.</p><important>
|
2063 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the first snapshot to use for the comparison.</p><important>
|
1462 2064 | /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
|
1463 2065 | /// </important>
|
2066 + | /* ServerBuilderGenerator.kt:343 */
|
1464 2067 | pub fn first_snapshot_id(
|
1465 2068 | mut self,
|
1466 2069 | input: ::std::option::Option<crate::model::SnapshotId>,
|
1467 2070 | ) -> Self {
|
1468 - | self.first_snapshot_id = input.map(
|
1469 - | #[allow(clippy::redundant_closure)]
|
1470 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1471 - | );
|
2071 + | /* ServerBuilderGenerator.kt:344 */
|
2072 + | self.first_snapshot_id =
|
2073 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2074 + | /* ServerBuilderGenerator.kt:344 */;
|
1472 2075 | self
|
2076 + | /* ServerBuilderGenerator.kt:343 */
|
1473 2077 | }
|
1474 - | /// <p>The ID of the first snapshot to use for the comparison.</p><important>
|
2078 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the first snapshot to use for the comparison.</p><important>
|
1475 2079 | /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
|
1476 2080 | /// </important>
|
2081 + | /* ServerBuilderGenerator.kt:428 */
|
1477 2082 | pub(crate) fn set_first_snapshot_id(
|
1478 2083 | mut self,
|
1479 2084 | input: Option<
|
1480 2085 | impl ::std::convert::Into<
|
1481 2086 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
1482 2087 | >,
|
1483 2088 | >,
|
1484 2089 | ) -> Self {
|
2090 + | /* ServerBuilderGenerator.kt:429 */
|
1485 2091 | self.first_snapshot_id = input.map(|v| v.into());
|
1486 2092 | self
|
2093 + | /* ServerBuilderGenerator.kt:428 */
|
1487 2094 | }
|
1488 - | /// <p>The token to request the next page of results.</p>
|
2095 + | /// /* ServerBuilderGenerator.kt:331 */<p>The token to request the next page of results.</p>
|
2096 + | /* ServerBuilderGenerator.kt:343 */
|
1489 2097 | pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
|
1490 - | self.next_token = input.map(
|
1491 - | #[allow(clippy::redundant_closure)]
|
1492 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1493 - | );
|
2098 + | /* ServerBuilderGenerator.kt:344 */
|
2099 + | self.next_token =
|
2100 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2101 + | /* ServerBuilderGenerator.kt:344 */;
|
1494 2102 | self
|
2103 + | /* ServerBuilderGenerator.kt:343 */
|
1495 2104 | }
|
1496 - | /// <p>The token to request the next page of results.</p>
|
2105 + | /// /* ServerBuilderGenerator.kt:426 */<p>The token to request the next page of results.</p>
|
2106 + | /* ServerBuilderGenerator.kt:428 */
|
1497 2107 | pub(crate) fn set_next_token(
|
1498 2108 | mut self,
|
1499 2109 | input: Option<
|
1500 2110 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
|
1501 2111 | >,
|
1502 2112 | ) -> Self {
|
2113 + | /* ServerBuilderGenerator.kt:429 */
|
1503 2114 | self.next_token = input.map(|v| v.into());
|
1504 2115 | self
|
2116 + | /* ServerBuilderGenerator.kt:428 */
|
1505 2117 | }
|
1506 - | /// <p>The number of results to return.</p>
|
2118 + | /// /* ServerBuilderGenerator.kt:331 */<p>The number of results to return.</p>
|
2119 + | /* ServerBuilderGenerator.kt:343 */
|
1507 2120 | pub fn max_results(
|
1508 2121 | mut self,
|
1509 2122 | input: ::std::option::Option<crate::model::MaxResults>,
|
1510 2123 | ) -> Self {
|
1511 - | self.max_results = input.map(
|
1512 - | #[allow(clippy::redundant_closure)]
|
1513 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1514 - | );
|
2124 + | /* ServerBuilderGenerator.kt:344 */
|
2125 + | self.max_results =
|
2126 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2127 + | /* ServerBuilderGenerator.kt:344 */;
|
1515 2128 | self
|
2129 + | /* ServerBuilderGenerator.kt:343 */
|
1516 2130 | }
|
1517 - | /// <p>The number of results to return.</p>
|
2131 + | /// /* ServerBuilderGenerator.kt:426 */<p>The number of results to return.</p>
|
2132 + | /* ServerBuilderGenerator.kt:428 */
|
1518 2133 | pub(crate) fn set_max_results(
|
1519 2134 | mut self,
|
1520 2135 | input: Option<
|
1521 2136 | impl ::std::convert::Into<
|
1522 2137 | crate::constrained::MaybeConstrained<crate::model::MaxResults>,
|
1523 2138 | >,
|
1524 2139 | >,
|
1525 2140 | ) -> Self {
|
2141 + | /* ServerBuilderGenerator.kt:429 */
|
1526 2142 | self.max_results = input.map(|v| v.into());
|
1527 2143 | self
|
2144 + | /* ServerBuilderGenerator.kt:428 */
|
1528 2145 | }
|
1529 - | /// <p>The block index from which the comparison should start.</p>
|
2146 + | /// /* ServerBuilderGenerator.kt:331 */<p>The block index from which the comparison should start.</p>
|
1530 2147 | /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
|
2148 + | /* ServerBuilderGenerator.kt:343 */
|
1531 2149 | pub fn starting_block_index(
|
1532 2150 | mut self,
|
1533 2151 | input: ::std::option::Option<crate::model::BlockIndex>,
|
1534 2152 | ) -> Self {
|
1535 - | self.starting_block_index = input.map(
|
1536 - | #[allow(clippy::redundant_closure)]
|
1537 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1538 - | );
|
2153 + | /* ServerBuilderGenerator.kt:344 */
|
2154 + | self.starting_block_index =
|
2155 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2156 + | /* ServerBuilderGenerator.kt:344 */;
|
1539 2157 | self
|
2158 + | /* ServerBuilderGenerator.kt:343 */
|
1540 2159 | }
|
1541 - | /// <p>The block index from which the comparison should start.</p>
|
2160 + | /// /* ServerBuilderGenerator.kt:426 */<p>The block index from which the comparison should start.</p>
|
1542 2161 | /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
|
2162 + | /* ServerBuilderGenerator.kt:428 */
|
1543 2163 | pub(crate) fn set_starting_block_index(
|
1544 2164 | mut self,
|
1545 2165 | input: Option<
|
1546 2166 | impl ::std::convert::Into<
|
1547 2167 | crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
|
1548 2168 | >,
|
1549 2169 | >,
|
1550 2170 | ) -> Self {
|
2171 + | /* ServerBuilderGenerator.kt:429 */
|
1551 2172 | self.starting_block_index = input.map(|v| v.into());
|
1552 2173 | self
|
2174 + | /* ServerBuilderGenerator.kt:428 */
|
1553 2175 | }
|
1554 - | /// Consumes the builder and constructs a [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
1555 - | ///
|
2176 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput).
|
2177 + | /// /* ServerBuilderGenerator.kt:260 */
|
1556 2178 | /// The builder fails to construct a [`ListChangedBlocksInput`](crate::input::ListChangedBlocksInput) if a [`ConstraintViolation`] occurs.
|
1557 2179 | ///
|
1558 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2180 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2181 + | /* ServerBuilderGenerator.kt:271 */
|
1559 2182 | pub fn build(self) -> Result<crate::input::ListChangedBlocksInput, ConstraintViolation> {
|
1560 2183 | self.build_enforcing_all_constraints()
|
1561 2184 | }
|
2185 + | /* ServerBuilderGenerator.kt:283 */
|
1562 2186 | fn build_enforcing_all_constraints(
|
1563 2187 | self,
|
1564 2188 | ) -> Result<crate::input::ListChangedBlocksInput, ConstraintViolation> {
|
1565 - | Ok(crate::input::ListChangedBlocksInput {
|
1566 - | second_snapshot_id: self
|
1567 - | .second_snapshot_id
|
1568 - | .map(|v| match v {
|
1569 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1570 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1571 - | })
|
1572 - | .map(|res| res.map_err(ConstraintViolation::SecondSnapshotId))
|
1573 - | .transpose()?
|
1574 - | .ok_or(ConstraintViolation::MissingSecondSnapshotId)?,
|
1575 - | first_snapshot_id: self
|
1576 - | .first_snapshot_id
|
1577 - | .map(|v| match v {
|
1578 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1579 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1580 - | })
|
1581 - | .map(|res| res.map_err(ConstraintViolation::FirstSnapshotId))
|
1582 - | .transpose()?,
|
1583 - | next_token: self
|
1584 - | .next_token
|
1585 - | .map(|v| match v {
|
1586 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1587 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1588 - | })
|
1589 - | .map(|res| res.map_err(ConstraintViolation::NextToken))
|
1590 - | .transpose()?,
|
1591 - | max_results: self
|
1592 - | .max_results
|
1593 - | .map(|v| match v {
|
1594 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1595 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1596 - | })
|
1597 - | .map(|res| res.map_err(ConstraintViolation::MaxResults))
|
1598 - | .transpose()?,
|
1599 - | starting_block_index: self
|
1600 - | .starting_block_index
|
1601 - | .map(|v| match v {
|
1602 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1603 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1604 - | })
|
1605 - | .map(|res| res.map_err(ConstraintViolation::StartingBlockIndex))
|
1606 - | .transpose()?,
|
1607 - | })
|
1608 - | }
|
2189 + | /* ServerBuilderGenerator.kt:287 */
|
2190 + | Ok(
|
2191 + | /* ServerBuilderGenerator.kt:542 */
|
2192 + | crate::input::ListChangedBlocksInput {
|
2193 + | /* ServerBuilderGenerator.kt:546 */
|
2194 + | second_snapshot_id: self
|
2195 + | .second_snapshot_id
|
2196 + | /* ServerBuilderGenerator.kt:602 */
|
2197 + | .map(|v| match v {
|
2198 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2199 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2200 + | })
|
2201 + | /* ServerBuilderGenerator.kt:614 */
|
2202 + | .map(|res| res.map_err(ConstraintViolation::SecondSnapshotId))
|
2203 + | .transpose()?
|
2204 + | /* ServerBuilderGenerator.kt:569 */
|
2205 + | .ok_or(ConstraintViolation::MissingSecondSnapshotId)?,
|
2206 + | /* ServerBuilderGenerator.kt:546 */
|
2207 + | first_snapshot_id: self
|
2208 + | .first_snapshot_id
|
2209 + | /* ServerBuilderGenerator.kt:602 */
|
2210 + | .map(|v| match v {
|
2211 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2212 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2213 + | })
|
2214 + | /* ServerBuilderGenerator.kt:614 */
|
2215 + | .map(|res| res.map_err(ConstraintViolation::FirstSnapshotId))
|
2216 + | .transpose()?,
|
2217 + | /* ServerBuilderGenerator.kt:546 */
|
2218 + | next_token: self
|
2219 + | .next_token
|
2220 + | /* ServerBuilderGenerator.kt:602 */
|
2221 + | .map(|v| match v {
|
2222 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2223 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2224 + | })
|
2225 + | /* ServerBuilderGenerator.kt:614 */
|
2226 + | .map(|res| res.map_err(ConstraintViolation::NextToken))
|
2227 + | .transpose()?,
|
2228 + | /* ServerBuilderGenerator.kt:546 */
|
2229 + | max_results: self
|
2230 + | .max_results
|
2231 + | /* ServerBuilderGenerator.kt:602 */
|
2232 + | .map(|v| match v {
|
2233 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2234 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2235 + | })
|
2236 + | /* ServerBuilderGenerator.kt:614 */
|
2237 + | .map(|res| res.map_err(ConstraintViolation::MaxResults))
|
2238 + | .transpose()?,
|
2239 + | /* ServerBuilderGenerator.kt:546 */
|
2240 + | starting_block_index: self
|
2241 + | .starting_block_index
|
2242 + | /* ServerBuilderGenerator.kt:602 */
|
2243 + | .map(|v| match v {
|
2244 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2245 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2246 + | })
|
2247 + | /* ServerBuilderGenerator.kt:614 */
|
2248 + | .map(|res| res.map_err(ConstraintViolation::StartingBlockIndex))
|
2249 + | .transpose()?,
|
2250 + | /* ServerBuilderGenerator.kt:542 */
|
2251 + | }, /* ServerBuilderGenerator.kt:287 */
|
2252 + | )
|
2253 + | /* ServerBuilderGenerator.kt:283 */
|
2254 + | }
|
2255 + | /* ServerBuilderGenerator.kt:215 */
|
1609 2256 | }
|
2257 + |
|
2258 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1610 2259 | }
|
1611 - | /// See [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
2260 + | /// /* ServerBuilderGenerator.kt:171 */See [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
1612 2261 | pub mod get_snapshot_block_input {
|
1613 2262 |
|
2263 + | /* RustType.kt:516 */
|
1614 2264 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1615 - | /// Holds one variant for each of the ways the builder can fail.
|
2265 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2266 + | /* RustType.kt:516 */
|
1616 2267 | #[non_exhaustive]
|
2268 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1617 2269 | #[allow(clippy::enum_variant_names)]
|
1618 2270 | pub enum ConstraintViolation {
|
1619 - | /// `snapshot_id` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2271 + | /// /* ServerBuilderConstraintViolations.kt:138 */`snapshot_id` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2272 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1620 2273 | MissingSnapshotId,
|
1621 - | /// Constraint violation occurred building member `snapshot_id` when building `GetSnapshotBlockInput`.
|
2274 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `snapshot_id` when building `GetSnapshotBlockInput`.
|
2275 + | /* RustType.kt:516 */
|
1622 2276 | #[doc(hidden)]
|
2277 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1623 2278 | SnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
1624 - | /// `block_token` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2279 + | /// /* ServerBuilderConstraintViolations.kt:138 */`block_token` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2280 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1625 2281 | MissingBlockToken,
|
1626 - | /// Constraint violation occurred building member `block_token` when building `GetSnapshotBlockInput`.
|
2282 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `block_token` when building `GetSnapshotBlockInput`.
|
2283 + | /* RustType.kt:516 */
|
1627 2284 | #[doc(hidden)]
|
2285 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1628 2286 | BlockToken(crate::model::block_token::ConstraintViolation),
|
1629 - | /// `block_index` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2287 + | /// /* ServerBuilderConstraintViolations.kt:138 */`block_index` was not provided but it is required when building `GetSnapshotBlockInput`.
|
2288 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1630 2289 | MissingBlockIndex,
|
1631 - | /// Constraint violation occurred building member `block_index` when building `GetSnapshotBlockInput`.
|
2290 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `block_index` when building `GetSnapshotBlockInput`.
|
2291 + | /* RustType.kt:516 */
|
1632 2292 | #[doc(hidden)]
|
2293 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1633 2294 | BlockIndex(crate::model::block_index::ConstraintViolation),
|
2295 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1634 2296 | }
|
2297 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1635 2298 | impl ::std::fmt::Display for ConstraintViolation {
|
2299 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1636 2300 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2301 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1637 2302 | match self {
|
1638 - | ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
1639 - | ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `GetSnapshotBlockInput`"),
|
1640 - | ConstraintViolation::MissingBlockToken => write!(f, "`block_token` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
1641 - | ConstraintViolation::BlockToken(_) => write!(f, "constraint violation occurred building member `block_token` when building `GetSnapshotBlockInput`"),
|
1642 - | ConstraintViolation::MissingBlockIndex => write!(f, "`block_index` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
1643 - | ConstraintViolation::BlockIndex(_) => write!(f, "constraint violation occurred building member `block_index` when building `GetSnapshotBlockInput`"),
|
1644 - | }
|
1645 - | }
|
1646 - | }
|
2303 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
2304 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `GetSnapshotBlockInput`"),
|
2305 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBlockToken => write!(f, "`block_token` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
2306 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::BlockToken(_) => write!(f, "constraint violation occurred building member `block_token` when building `GetSnapshotBlockInput`"),
|
2307 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingBlockIndex => write!(f, "`block_index` was not provided but it is required when building `GetSnapshotBlockInput`"),
|
2308 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::BlockIndex(_) => write!(f, "constraint violation occurred building member `block_index` when building `GetSnapshotBlockInput`"),
|
2309 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2310 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2311 + | }
|
2312 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2313 + | }
|
2314 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1647 2315 | impl ::std::error::Error for ConstraintViolation {}
|
2316 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1648 2317 | impl ConstraintViolation {
|
1649 2318 | pub(crate) fn as_validation_exception_field(
|
1650 2319 | self,
|
1651 2320 | path: ::std::string::String,
|
1652 2321 | ) -> crate::model::ValidationExceptionField {
|
1653 2322 | match self {
|
1654 2323 | ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
|
1655 2324 | message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
|
1656 2325 | path: path + "/SnapshotId",
|
1657 2326 | },
|
1658 2327 | ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
|
1659 2328 | ConstraintViolation::MissingBlockToken => crate::model::ValidationExceptionField {
|
1660 2329 | message: format!("Value at '{}/BlockToken' failed to satisfy constraint: Member must not be null", path),
|
1661 2330 | path: path + "/BlockToken",
|
1662 2331 | },
|
1663 2332 | ConstraintViolation::BlockToken(inner) => inner.as_validation_exception_field(path + "/BlockToken"),
|
1664 2333 | ConstraintViolation::MissingBlockIndex => crate::model::ValidationExceptionField {
|
1665 2334 | message: format!("Value at '{}/BlockIndex' failed to satisfy constraint: Member must not be null", path),
|
1666 2335 | path: path + "/BlockIndex",
|
1667 2336 | },
|
1668 2337 | ConstraintViolation::BlockIndex(inner) => inner.as_validation_exception_field(path + "/BlockIndex"),
|
1669 2338 | }
|
1670 2339 | }
|
1671 2340 | }
|
2341 + | /* ServerBuilderGenerator.kt:234 */
|
1672 2342 | impl ::std::convert::From<ConstraintViolation>
|
1673 2343 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1674 2344 | {
|
1675 2345 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1676 2346 | let first_validation_exception_field =
|
1677 2347 | constraint_violation.as_validation_exception_field("".to_owned());
|
1678 2348 | let validation_exception = crate::error::ValidationException {
|
1679 2349 | message: format!(
|
1680 2350 | "1 validation error detected. {}",
|
1681 2351 | &first_validation_exception_field.message
|
1682 2352 | ),
|
1683 2353 | field_list: Some(vec![first_validation_exception_field]),
|
1684 2354 | };
|
1685 2355 | Self::ConstraintViolation(
|
1686 2356 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1687 2357 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1688 2358 | )
|
1689 2359 | }
|
1690 2360 | }
|
2361 + | /* ServerBuilderGenerator.kt:244 */
|
1691 2362 | impl ::std::convert::From<Builder>
|
1692 2363 | for crate::constrained::MaybeConstrained<crate::input::GetSnapshotBlockInput>
|
1693 2364 | {
|
1694 2365 | fn from(builder: Builder) -> Self {
|
1695 2366 | Self::Unconstrained(builder)
|
1696 2367 | }
|
1697 2368 | }
|
2369 + | /* ServerBuilderGenerator.kt:446 */
|
1698 2370 | impl ::std::convert::TryFrom<Builder> for crate::input::GetSnapshotBlockInput {
|
1699 2371 | type Error = ConstraintViolation;
|
1700 2372 |
|
1701 2373 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1702 2374 | builder.build()
|
1703 2375 | }
|
1704 2376 | }
|
1705 - | /// A builder for [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
2377 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
2378 + | /* RustType.kt:516 */
|
1706 2379 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2380 + | /* ServerBuilderGenerator.kt:211 */
|
1707 2381 | pub struct Builder {
|
2382 + | /* ServerBuilderGenerator.kt:308 */
|
1708 2383 | pub(crate) snapshot_id:
|
1709 2384 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
2385 + | /* ServerBuilderGenerator.kt:308 */
|
1710 2386 | pub(crate) block_token:
|
1711 2387 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::BlockToken>>,
|
2388 + | /* ServerBuilderGenerator.kt:308 */
|
1712 2389 | pub(crate) block_index:
|
1713 2390 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::BlockIndex>>,
|
2391 + | /* ServerBuilderGenerator.kt:211 */
|
1714 2392 | }
|
2393 + | /* ServerBuilderGenerator.kt:215 */
|
1715 2394 | impl Builder {
|
1716 - | /// <p>The ID of the snapshot containing the block from which to get data.</p>
|
2395 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the snapshot containing the block from which to get data.</p>
|
2396 + | /* ServerBuilderGenerator.kt:343 */
|
1717 2397 | pub fn snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
|
1718 - | self.snapshot_id = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2398 + | /* ServerBuilderGenerator.kt:344 */
|
2399 + | self.snapshot_id =
|
2400 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2401 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2402 + | /* ServerBuilderGenerator.kt:345 */)
|
2403 + | /* ServerBuilderGenerator.kt:344 */;
|
1719 2404 | self
|
2405 + | /* ServerBuilderGenerator.kt:343 */
|
1720 2406 | }
|
1721 - | /// <p>The ID of the snapshot containing the block from which to get data.</p>
|
2407 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the snapshot containing the block from which to get data.</p>
|
2408 + | /* ServerBuilderGenerator.kt:428 */
|
1722 2409 | pub(crate) fn set_snapshot_id(
|
1723 2410 | mut self,
|
1724 2411 | input: impl ::std::convert::Into<
|
1725 2412 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
1726 2413 | >,
|
1727 2414 | ) -> Self {
|
2415 + | /* ServerBuilderGenerator.kt:429 */
|
1728 2416 | self.snapshot_id = Some(input.into());
|
1729 2417 | self
|
2418 + | /* ServerBuilderGenerator.kt:428 */
|
1730 2419 | }
|
1731 - | /// <p>The block token of the block from which to get data.</p>
|
2420 + | /// /* ServerBuilderGenerator.kt:331 */<p>The block token of the block from which to get data.</p>
|
1732 2421 | /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
2422 + | /* ServerBuilderGenerator.kt:343 */
|
1733 2423 | pub fn block_token(mut self, input: crate::model::BlockToken) -> Self {
|
1734 - | self.block_token = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2424 + | /* ServerBuilderGenerator.kt:344 */
|
2425 + | self.block_token =
|
2426 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2427 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2428 + | /* ServerBuilderGenerator.kt:345 */)
|
2429 + | /* ServerBuilderGenerator.kt:344 */;
|
1735 2430 | self
|
2431 + | /* ServerBuilderGenerator.kt:343 */
|
1736 2432 | }
|
1737 - | /// <p>The block token of the block from which to get data.</p>
|
2433 + | /// /* ServerBuilderGenerator.kt:426 */<p>The block token of the block from which to get data.</p>
|
1738 2434 | /// <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
2435 + | /* ServerBuilderGenerator.kt:428 */
|
1739 2436 | pub(crate) fn set_block_token(
|
1740 2437 | mut self,
|
1741 2438 | input: impl ::std::convert::Into<
|
1742 2439 | crate::constrained::MaybeConstrained<crate::model::BlockToken>,
|
1743 2440 | >,
|
1744 2441 | ) -> Self {
|
2442 + | /* ServerBuilderGenerator.kt:429 */
|
1745 2443 | self.block_token = Some(input.into());
|
1746 2444 | self
|
2445 + | /* ServerBuilderGenerator.kt:428 */
|
1747 2446 | }
|
1748 - | /// <p>The block index of the block from which to get data.</p>
|
2447 + | /// /* ServerBuilderGenerator.kt:331 */<p>The block index of the block from which to get data.</p>
|
1749 2448 | /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
2449 + | /* ServerBuilderGenerator.kt:343 */
|
1750 2450 | pub fn block_index(mut self, input: crate::model::BlockIndex) -> Self {
|
1751 - | self.block_index = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2451 + | /* ServerBuilderGenerator.kt:344 */
|
2452 + | self.block_index =
|
2453 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2454 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2455 + | /* ServerBuilderGenerator.kt:345 */)
|
2456 + | /* ServerBuilderGenerator.kt:344 */;
|
1752 2457 | self
|
2458 + | /* ServerBuilderGenerator.kt:343 */
|
1753 2459 | }
|
1754 - | /// <p>The block index of the block from which to get data.</p>
|
2460 + | /// /* ServerBuilderGenerator.kt:426 */<p>The block index of the block from which to get data.</p>
|
1755 2461 | /// <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
2462 + | /* ServerBuilderGenerator.kt:428 */
|
1756 2463 | pub(crate) fn set_block_index(
|
1757 2464 | mut self,
|
1758 2465 | input: impl ::std::convert::Into<
|
1759 2466 | crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
|
1760 2467 | >,
|
1761 2468 | ) -> Self {
|
2469 + | /* ServerBuilderGenerator.kt:429 */
|
1762 2470 | self.block_index = Some(input.into());
|
1763 2471 | self
|
2472 + | /* ServerBuilderGenerator.kt:428 */
|
1764 2473 | }
|
1765 - | /// Consumes the builder and constructs a [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
1766 - | ///
|
2474 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput).
|
2475 + | /// /* ServerBuilderGenerator.kt:260 */
|
1767 2476 | /// The builder fails to construct a [`GetSnapshotBlockInput`](crate::input::GetSnapshotBlockInput) if a [`ConstraintViolation`] occurs.
|
1768 2477 | ///
|
1769 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2478 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2479 + | /* ServerBuilderGenerator.kt:271 */
|
1770 2480 | pub fn build(self) -> Result<crate::input::GetSnapshotBlockInput, ConstraintViolation> {
|
1771 2481 | self.build_enforcing_all_constraints()
|
1772 2482 | }
|
2483 + | /* ServerBuilderGenerator.kt:283 */
|
1773 2484 | fn build_enforcing_all_constraints(
|
1774 2485 | self,
|
1775 2486 | ) -> Result<crate::input::GetSnapshotBlockInput, ConstraintViolation> {
|
1776 - | Ok(crate::input::GetSnapshotBlockInput {
|
1777 - | snapshot_id: self
|
1778 - | .snapshot_id
|
1779 - | .map(|v| match v {
|
1780 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1781 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1782 - | })
|
1783 - | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
1784 - | .transpose()?
|
1785 - | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
1786 - | block_token: self
|
1787 - | .block_token
|
1788 - | .map(|v| match v {
|
1789 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1790 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1791 - | })
|
1792 - | .map(|res| res.map_err(ConstraintViolation::BlockToken))
|
1793 - | .transpose()?
|
1794 - | .ok_or(ConstraintViolation::MissingBlockToken)?,
|
1795 - | block_index: self
|
1796 - | .block_index
|
1797 - | .map(|v| match v {
|
1798 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1799 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1800 - | })
|
1801 - | .map(|res| res.map_err(ConstraintViolation::BlockIndex))
|
1802 - | .transpose()?
|
1803 - | .ok_or(ConstraintViolation::MissingBlockIndex)?,
|
1804 - | })
|
1805 - | }
|
2487 + | /* ServerBuilderGenerator.kt:287 */
|
2488 + | Ok(
|
2489 + | /* ServerBuilderGenerator.kt:542 */
|
2490 + | crate::input::GetSnapshotBlockInput {
|
2491 + | /* ServerBuilderGenerator.kt:546 */
|
2492 + | snapshot_id: self
|
2493 + | .snapshot_id
|
2494 + | /* ServerBuilderGenerator.kt:602 */
|
2495 + | .map(|v| match v {
|
2496 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2497 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2498 + | })
|
2499 + | /* ServerBuilderGenerator.kt:614 */
|
2500 + | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
2501 + | .transpose()?
|
2502 + | /* ServerBuilderGenerator.kt:569 */
|
2503 + | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
2504 + | /* ServerBuilderGenerator.kt:546 */
|
2505 + | block_token: self
|
2506 + | .block_token
|
2507 + | /* ServerBuilderGenerator.kt:602 */
|
2508 + | .map(|v| match v {
|
2509 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2510 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2511 + | })
|
2512 + | /* ServerBuilderGenerator.kt:614 */
|
2513 + | .map(|res| res.map_err(ConstraintViolation::BlockToken))
|
2514 + | .transpose()?
|
2515 + | /* ServerBuilderGenerator.kt:569 */
|
2516 + | .ok_or(ConstraintViolation::MissingBlockToken)?,
|
2517 + | /* ServerBuilderGenerator.kt:546 */
|
2518 + | block_index: self
|
2519 + | .block_index
|
2520 + | /* ServerBuilderGenerator.kt:602 */
|
2521 + | .map(|v| match v {
|
2522 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2523 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2524 + | })
|
2525 + | /* ServerBuilderGenerator.kt:614 */
|
2526 + | .map(|res| res.map_err(ConstraintViolation::BlockIndex))
|
2527 + | .transpose()?
|
2528 + | /* ServerBuilderGenerator.kt:569 */
|
2529 + | .ok_or(ConstraintViolation::MissingBlockIndex)?,
|
2530 + | /* ServerBuilderGenerator.kt:542 */
|
2531 + | }, /* ServerBuilderGenerator.kt:287 */
|
2532 + | )
|
2533 + | /* ServerBuilderGenerator.kt:283 */
|
2534 + | }
|
2535 + | /* ServerBuilderGenerator.kt:215 */
|
1806 2536 | }
|
2537 + |
|
2538 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
1807 2539 | }
|
1808 - | /// See [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
2540 + | /// /* ServerBuilderGenerator.kt:171 */See [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
1809 2541 | pub mod complete_snapshot_input {
|
1810 2542 |
|
2543 + | /* RustType.kt:516 */
|
1811 2544 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1812 - | /// Holds one variant for each of the ways the builder can fail.
|
2545 + | /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
|
2546 + | /* RustType.kt:516 */
|
1813 2547 | #[non_exhaustive]
|
2548 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1814 2549 | #[allow(clippy::enum_variant_names)]
|
1815 2550 | pub enum ConstraintViolation {
|
1816 - | /// `changed_blocks_count` was not provided but it is required when building `CompleteSnapshotInput`.
|
2551 + | /// /* ServerBuilderConstraintViolations.kt:138 */`changed_blocks_count` was not provided but it is required when building `CompleteSnapshotInput`.
|
2552 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1817 2553 | MissingChangedBlocksCount,
|
1818 - | /// Constraint violation occurred building member `changed_blocks_count` when building `CompleteSnapshotInput`.
|
2554 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `changed_blocks_count` when building `CompleteSnapshotInput`.
|
2555 + | /* RustType.kt:516 */
|
1819 2556 | #[doc(hidden)]
|
2557 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1820 2558 | ChangedBlocksCount(crate::model::changed_blocks_count::ConstraintViolation),
|
1821 - | /// Constraint violation occurred building member `checksum_aggregation_method` when building `CompleteSnapshotInput`.
|
2559 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `checksum_aggregation_method` when building `CompleteSnapshotInput`.
|
2560 + | /* RustType.kt:516 */
|
1822 2561 | #[doc(hidden)]
|
2562 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1823 2563 | ChecksumAggregationMethod(crate::model::checksum_aggregation_method::ConstraintViolation),
|
1824 - | /// Constraint violation occurred building member `checksum_algorithm` when building `CompleteSnapshotInput`.
|
2564 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `checksum_algorithm` when building `CompleteSnapshotInput`.
|
2565 + | /* RustType.kt:516 */
|
1825 2566 | #[doc(hidden)]
|
2567 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1826 2568 | ChecksumAlgorithm(crate::model::checksum_algorithm::ConstraintViolation),
|
1827 - | /// `snapshot_id` was not provided but it is required when building `CompleteSnapshotInput`.
|
2569 + | /// /* ServerBuilderConstraintViolations.kt:138 */`snapshot_id` was not provided but it is required when building `CompleteSnapshotInput`.
|
2570 + | /* ServerBuilderConstraintViolations.kt:143 */
|
1828 2571 | MissingSnapshotId,
|
1829 - | /// Constraint violation occurred building member `snapshot_id` when building `CompleteSnapshotInput`.
|
2572 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `snapshot_id` when building `CompleteSnapshotInput`.
|
2573 + | /* RustType.kt:516 */
|
1830 2574 | #[doc(hidden)]
|
2575 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1831 2576 | SnapshotId(crate::model::snapshot_id::ConstraintViolation),
|
1832 - | /// Constraint violation occurred building member `checksum` when building `CompleteSnapshotInput`.
|
2577 + | /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `checksum` when building `CompleteSnapshotInput`.
|
2578 + | /* RustType.kt:516 */
|
1833 2579 | #[doc(hidden)]
|
2580 + | /* ServerBuilderConstraintViolations.kt:164 */
|
1834 2581 | Checksum(crate::model::checksum::ConstraintViolation),
|
2582 + | /* ServerBuilderConstraintViolations.kt:75 */
|
1835 2583 | }
|
2584 + | /* ServerBuilderConstraintViolations.kt:117 */
|
1836 2585 | impl ::std::fmt::Display for ConstraintViolation {
|
2586 + | /* ServerBuilderConstraintViolations.kt:118 */
|
1837 2587 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2588 + | /* ServerBuilderConstraintViolations.kt:119 */
|
1838 2589 | match self {
|
1839 - | ConstraintViolation::MissingChangedBlocksCount => write!(f, "`changed_blocks_count` was not provided but it is required when building `CompleteSnapshotInput`"),
|
1840 - | ConstraintViolation::ChangedBlocksCount(_) => write!(f, "constraint violation occurred building member `changed_blocks_count` when building `CompleteSnapshotInput`"),
|
1841 - | ConstraintViolation::ChecksumAggregationMethod(_) => write!(f, "constraint violation occurred building member `checksum_aggregation_method` when building `CompleteSnapshotInput`"),
|
1842 - | ConstraintViolation::ChecksumAlgorithm(_) => write!(f, "constraint violation occurred building member `checksum_algorithm` when building `CompleteSnapshotInput`"),
|
1843 - | ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `CompleteSnapshotInput`"),
|
1844 - | ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `CompleteSnapshotInput`"),
|
1845 - | ConstraintViolation::Checksum(_) => write!(f, "constraint violation occurred building member `checksum` when building `CompleteSnapshotInput`"),
|
1846 - | }
|
1847 - | }
|
1848 - | }
|
2590 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingChangedBlocksCount => write!(f, "`changed_blocks_count` was not provided but it is required when building `CompleteSnapshotInput`"),
|
2591 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ChangedBlocksCount(_) => write!(f, "constraint violation occurred building member `changed_blocks_count` when building `CompleteSnapshotInput`"),
|
2592 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ChecksumAggregationMethod(_) => write!(f, "constraint violation occurred building member `checksum_aggregation_method` when building `CompleteSnapshotInput`"),
|
2593 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::ChecksumAlgorithm(_) => write!(f, "constraint violation occurred building member `checksum_algorithm` when building `CompleteSnapshotInput`"),
|
2594 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingSnapshotId => write!(f, "`snapshot_id` was not provided but it is required when building `CompleteSnapshotInput`"),
|
2595 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::SnapshotId(_) => write!(f, "constraint violation occurred building member `snapshot_id` when building `CompleteSnapshotInput`"),
|
2596 + | /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Checksum(_) => write!(f, "constraint violation occurred building member `checksum` when building `CompleteSnapshotInput`"),
|
2597 + | /* ServerBuilderConstraintViolations.kt:119 */}
|
2598 + | /* ServerBuilderConstraintViolations.kt:118 */
|
2599 + | }
|
2600 + | /* ServerBuilderConstraintViolations.kt:117 */
|
2601 + | }
|
2602 + | /* ServerBuilderConstraintViolations.kt:84 */
|
1849 2603 | impl ::std::error::Error for ConstraintViolation {}
|
2604 + | /* ServerBuilderConstraintViolations.kt:171 */
|
1850 2605 | impl ConstraintViolation {
|
1851 2606 | pub(crate) fn as_validation_exception_field(
|
1852 2607 | self,
|
1853 2608 | path: ::std::string::String,
|
1854 2609 | ) -> crate::model::ValidationExceptionField {
|
1855 2610 | match self {
|
1856 2611 | ConstraintViolation::MissingChangedBlocksCount => crate::model::ValidationExceptionField {
|
1857 2612 | message: format!("Value at '{}/ChangedBlocksCount' failed to satisfy constraint: Member must not be null", path),
|
1858 2613 | path: path + "/ChangedBlocksCount",
|
1859 2614 | },
|
1860 2615 | ConstraintViolation::ChangedBlocksCount(inner) => inner.as_validation_exception_field(path + "/ChangedBlocksCount"),
|
1861 2616 | ConstraintViolation::ChecksumAggregationMethod(inner) => inner.as_validation_exception_field(path + "/ChecksumAggregationMethod"),
|
1862 2617 | ConstraintViolation::ChecksumAlgorithm(inner) => inner.as_validation_exception_field(path + "/ChecksumAlgorithm"),
|
1863 2618 | ConstraintViolation::MissingSnapshotId => crate::model::ValidationExceptionField {
|
1864 2619 | message: format!("Value at '{}/SnapshotId' failed to satisfy constraint: Member must not be null", path),
|
1865 2620 | path: path + "/SnapshotId",
|
1866 2621 | },
|
1867 2622 | ConstraintViolation::SnapshotId(inner) => inner.as_validation_exception_field(path + "/SnapshotId"),
|
1868 2623 | ConstraintViolation::Checksum(inner) => inner.as_validation_exception_field(path + "/Checksum"),
|
1869 2624 | }
|
1870 2625 | }
|
1871 2626 | }
|
2627 + | /* ServerBuilderGenerator.kt:234 */
|
1872 2628 | impl ::std::convert::From<ConstraintViolation>
|
1873 2629 | for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1874 2630 | {
|
1875 2631 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1876 2632 | let first_validation_exception_field =
|
1877 2633 | constraint_violation.as_validation_exception_field("".to_owned());
|
1878 2634 | let validation_exception = crate::error::ValidationException {
|
1879 2635 | message: format!(
|
1880 2636 | "1 validation error detected. {}",
|
1881 2637 | &first_validation_exception_field.message
|
1882 2638 | ),
|
1883 2639 | field_list: Some(vec![first_validation_exception_field]),
|
1884 2640 | };
|
1885 2641 | Self::ConstraintViolation(
|
1886 2642 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1887 2643 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1888 2644 | )
|
1889 2645 | }
|
1890 2646 | }
|
2647 + | /* ServerBuilderGenerator.kt:244 */
|
1891 2648 | impl ::std::convert::From<Builder>
|
1892 2649 | for crate::constrained::MaybeConstrained<crate::input::CompleteSnapshotInput>
|
1893 2650 | {
|
1894 2651 | fn from(builder: Builder) -> Self {
|
1895 2652 | Self::Unconstrained(builder)
|
1896 2653 | }
|
1897 2654 | }
|
2655 + | /* ServerBuilderGenerator.kt:446 */
|
1898 2656 | impl ::std::convert::TryFrom<Builder> for crate::input::CompleteSnapshotInput {
|
1899 2657 | type Error = ConstraintViolation;
|
1900 2658 |
|
1901 2659 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1902 2660 | builder.build()
|
1903 2661 | }
|
1904 2662 | }
|
1905 - | /// A builder for [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
2663 + | /// /* ServerBuilderGenerator.kt:201 */A builder for [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
2664 + | /* RustType.kt:516 */
|
1906 2665 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2666 + | /* ServerBuilderGenerator.kt:211 */
|
1907 2667 | pub struct Builder {
|
2668 + | /* ServerBuilderGenerator.kt:308 */
|
1908 2669 | pub(crate) changed_blocks_count: ::std::option::Option<
|
1909 2670 | crate::constrained::MaybeConstrained<crate::model::ChangedBlocksCount>,
|
1910 2671 | >,
|
2672 + | /* ServerBuilderGenerator.kt:308 */
|
1911 2673 | pub(crate) checksum_aggregation_method: ::std::option::Option<
|
1912 2674 | crate::constrained::MaybeConstrained<crate::model::ChecksumAggregationMethod>,
|
1913 2675 | >,
|
2676 + | /* ServerBuilderGenerator.kt:308 */
|
1914 2677 | pub(crate) checksum_algorithm: ::std::option::Option<
|
1915 2678 | crate::constrained::MaybeConstrained<crate::model::ChecksumAlgorithm>,
|
1916 2679 | >,
|
2680 + | /* ServerBuilderGenerator.kt:308 */
|
1917 2681 | pub(crate) snapshot_id:
|
1918 2682 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
|
2683 + | /* ServerBuilderGenerator.kt:308 */
|
1919 2684 | pub(crate) checksum:
|
1920 2685 | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Checksum>>,
|
2686 + | /* ServerBuilderGenerator.kt:211 */
|
1921 2687 | }
|
2688 + | /* ServerBuilderGenerator.kt:215 */
|
1922 2689 | impl Builder {
|
1923 - | /// <p>The number of blocks that were written to the snapshot.</p>
|
2690 + | /// /* ServerBuilderGenerator.kt:331 */<p>The number of blocks that were written to the snapshot.</p>
|
2691 + | /* ServerBuilderGenerator.kt:343 */
|
1924 2692 | pub fn changed_blocks_count(mut self, input: crate::model::ChangedBlocksCount) -> Self {
|
2693 + | /* ServerBuilderGenerator.kt:344 */
|
1925 2694 | self.changed_blocks_count =
|
1926 - | Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2695 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2696 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2697 + | /* ServerBuilderGenerator.kt:345 */)
|
2698 + | /* ServerBuilderGenerator.kt:344 */;
|
1927 2699 | self
|
2700 + | /* ServerBuilderGenerator.kt:343 */
|
1928 2701 | }
|
1929 - | /// <p>The number of blocks that were written to the snapshot.</p>
|
2702 + | /// /* ServerBuilderGenerator.kt:426 */<p>The number of blocks that were written to the snapshot.</p>
|
2703 + | /* ServerBuilderGenerator.kt:428 */
|
1930 2704 | pub(crate) fn set_changed_blocks_count(
|
1931 2705 | mut self,
|
1932 2706 | input: impl ::std::convert::Into<
|
1933 2707 | crate::constrained::MaybeConstrained<crate::model::ChangedBlocksCount>,
|
1934 2708 | >,
|
1935 2709 | ) -> Self {
|
2710 + | /* ServerBuilderGenerator.kt:429 */
|
1936 2711 | self.changed_blocks_count = Some(input.into());
|
1937 2712 | self
|
2713 + | /* ServerBuilderGenerator.kt:428 */
|
1938 2714 | }
|
1939 - | /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
2715 + | /// /* ServerBuilderGenerator.kt:331 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
2716 + | /* ServerBuilderGenerator.kt:343 */
|
1940 2717 | pub fn checksum_aggregation_method(
|
1941 2718 | mut self,
|
1942 2719 | input: ::std::option::Option<crate::model::ChecksumAggregationMethod>,
|
1943 2720 | ) -> Self {
|
1944 - | self.checksum_aggregation_method = input.map(
|
1945 - | #[allow(clippy::redundant_closure)]
|
1946 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1947 - | );
|
2721 + | /* ServerBuilderGenerator.kt:344 */
|
2722 + | self.checksum_aggregation_method =
|
2723 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2724 + | /* ServerBuilderGenerator.kt:344 */;
|
1948 2725 | self
|
2726 + | /* ServerBuilderGenerator.kt:343 */
|
1949 2727 | }
|
1950 - | /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
2728 + | /// /* ServerBuilderGenerator.kt:426 */<p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
2729 + | /* ServerBuilderGenerator.kt:428 */
|
1951 2730 | pub(crate) fn set_checksum_aggregation_method(
|
1952 2731 | mut self,
|
1953 2732 | input: Option<
|
1954 2733 | impl ::std::convert::Into<
|
1955 2734 | crate::constrained::MaybeConstrained<crate::model::ChecksumAggregationMethod>,
|
1956 2735 | >,
|
1957 2736 | >,
|
1958 2737 | ) -> Self {
|
2738 + | /* ServerBuilderGenerator.kt:429 */
|
1959 2739 | self.checksum_aggregation_method = input.map(|v| v.into());
|
1960 2740 | self
|
2741 + | /* ServerBuilderGenerator.kt:428 */
|
1961 2742 | }
|
1962 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
2743 + | /// /* ServerBuilderGenerator.kt:331 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
2744 + | /* ServerBuilderGenerator.kt:343 */
|
1963 2745 | pub fn checksum_algorithm(
|
1964 2746 | mut self,
|
1965 2747 | input: ::std::option::Option<crate::model::ChecksumAlgorithm>,
|
1966 2748 | ) -> Self {
|
1967 - | self.checksum_algorithm = input.map(
|
1968 - | #[allow(clippy::redundant_closure)]
|
1969 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
1970 - | );
|
2749 + | /* ServerBuilderGenerator.kt:344 */
|
2750 + | self.checksum_algorithm =
|
2751 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2752 + | /* ServerBuilderGenerator.kt:344 */;
|
1971 2753 | self
|
2754 + | /* ServerBuilderGenerator.kt:343 */
|
1972 2755 | }
|
1973 - | /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
2756 + | /// /* ServerBuilderGenerator.kt:426 */<p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
2757 + | /* ServerBuilderGenerator.kt:428 */
|
1974 2758 | pub(crate) fn set_checksum_algorithm(
|
1975 2759 | mut self,
|
1976 2760 | input: Option<
|
1977 2761 | impl ::std::convert::Into<
|
1978 2762 | crate::constrained::MaybeConstrained<crate::model::ChecksumAlgorithm>,
|
1979 2763 | >,
|
1980 2764 | >,
|
1981 2765 | ) -> Self {
|
2766 + | /* ServerBuilderGenerator.kt:429 */
|
1982 2767 | self.checksum_algorithm = input.map(|v| v.into());
|
1983 2768 | self
|
2769 + | /* ServerBuilderGenerator.kt:428 */
|
1984 2770 | }
|
1985 - | /// <p>The ID of the snapshot.</p>
|
2771 + | /// /* ServerBuilderGenerator.kt:331 */<p>The ID of the snapshot.</p>
|
2772 + | /* ServerBuilderGenerator.kt:343 */
|
1986 2773 | pub fn snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
|
1987 - | self.snapshot_id = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
2774 + | /* ServerBuilderGenerator.kt:344 */
|
2775 + | self.snapshot_id =
|
2776 + | /* ServerBuilderGenerator.kt:345 */Some(
|
2777 + | /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
|
2778 + | /* ServerBuilderGenerator.kt:345 */)
|
2779 + | /* ServerBuilderGenerator.kt:344 */;
|
1988 2780 | self
|
2781 + | /* ServerBuilderGenerator.kt:343 */
|
1989 2782 | }
|
1990 - | /// <p>The ID of the snapshot.</p>
|
2783 + | /// /* ServerBuilderGenerator.kt:426 */<p>The ID of the snapshot.</p>
|
2784 + | /* ServerBuilderGenerator.kt:428 */
|
1991 2785 | pub(crate) fn set_snapshot_id(
|
1992 2786 | mut self,
|
1993 2787 | input: impl ::std::convert::Into<
|
1994 2788 | crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
|
1995 2789 | >,
|
1996 2790 | ) -> Self {
|
2791 + | /* ServerBuilderGenerator.kt:429 */
|
1997 2792 | self.snapshot_id = Some(input.into());
|
1998 2793 | self
|
2794 + | /* ServerBuilderGenerator.kt:428 */
|
1999 2795 | }
|
2000 - | /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
2796 + | /// /* ServerBuilderGenerator.kt:331 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
2001 2797 | /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
|
2798 + | /* ServerBuilderGenerator.kt:343 */
|
2002 2799 | pub fn checksum(mut self, input: ::std::option::Option<crate::model::Checksum>) -> Self {
|
2003 - | self.checksum = input.map(
|
2004 - | #[allow(clippy::redundant_closure)]
|
2005 - | |v| crate::constrained::MaybeConstrained::Constrained(v),
|
2006 - | );
|
2800 + | /* ServerBuilderGenerator.kt:344 */
|
2801 + | self.checksum =
|
2802 + | /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
|
2803 + | /* ServerBuilderGenerator.kt:344 */;
|
2007 2804 | self
|
2805 + | /* ServerBuilderGenerator.kt:343 */
|
2008 2806 | }
|
2009 - | /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
2807 + | /// /* ServerBuilderGenerator.kt:426 */<p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
2010 2808 | /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
|
2809 + | /* ServerBuilderGenerator.kt:428 */
|
2011 2810 | pub(crate) fn set_checksum(
|
2012 2811 | mut self,
|
2013 2812 | input: Option<
|
2014 2813 | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Checksum>>,
|
2015 2814 | >,
|
2016 2815 | ) -> Self {
|
2816 + | /* ServerBuilderGenerator.kt:429 */
|
2017 2817 | self.checksum = input.map(|v| v.into());
|
2018 2818 | self
|
2819 + | /* ServerBuilderGenerator.kt:428 */
|
2019 2820 | }
|
2020 - | /// Consumes the builder and constructs a [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
2021 - | ///
|
2821 + | /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput).
|
2822 + | /// /* ServerBuilderGenerator.kt:260 */
|
2022 2823 | /// The builder fails to construct a [`CompleteSnapshotInput`](crate::input::CompleteSnapshotInput) if a [`ConstraintViolation`] occurs.
|
2023 2824 | ///
|
2024 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2825 + | /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2826 + | /* ServerBuilderGenerator.kt:271 */
|
2025 2827 | pub fn build(self) -> Result<crate::input::CompleteSnapshotInput, ConstraintViolation> {
|
2026 2828 | self.build_enforcing_all_constraints()
|
2027 2829 | }
|
2830 + | /* ServerBuilderGenerator.kt:283 */
|
2028 2831 | fn build_enforcing_all_constraints(
|
2029 2832 | self,
|
2030 2833 | ) -> Result<crate::input::CompleteSnapshotInput, ConstraintViolation> {
|
2031 - | Ok(crate::input::CompleteSnapshotInput {
|
2032 - | changed_blocks_count: self
|
2033 - | .changed_blocks_count
|
2034 - | .map(|v| match v {
|
2035 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2036 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2037 - | })
|
2038 - | .map(|res| res.map_err(ConstraintViolation::ChangedBlocksCount))
|
2039 - | .transpose()?
|
2040 - | .ok_or(ConstraintViolation::MissingChangedBlocksCount)?,
|
2041 - | checksum_aggregation_method: self
|
2042 - | .checksum_aggregation_method
|
2043 - | .map(|v| match v {
|
2044 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2045 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2046 - | })
|
2047 - | .map(|res| res.map_err(ConstraintViolation::ChecksumAggregationMethod))
|
2048 - | .transpose()?,
|
2049 - | checksum_algorithm: self
|
2050 - | .checksum_algorithm
|
2051 - | .map(|v| match v {
|
2052 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2053 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2054 - | })
|
2055 - | .map(|res| res.map_err(ConstraintViolation::ChecksumAlgorithm))
|
2056 - | .transpose()?,
|
2057 - | snapshot_id: self
|
2058 - | .snapshot_id
|
2059 - | .map(|v| match v {
|
2060 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2061 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2062 - | })
|
2063 - | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
2064 - | .transpose()?
|
2065 - | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
2066 - | checksum: self
|
2067 - | .checksum
|
2068 - | .map(|v| match v {
|
2069 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2070 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2071 - | })
|
2072 - | .map(|res| res.map_err(ConstraintViolation::Checksum))
|
2073 - | .transpose()?,
|
2074 - | })
|
2075 - | }
|
2834 + | /* ServerBuilderGenerator.kt:287 */
|
2835 + | Ok(
|
2836 + | /* ServerBuilderGenerator.kt:542 */
|
2837 + | crate::input::CompleteSnapshotInput {
|
2838 + | /* ServerBuilderGenerator.kt:546 */
|
2839 + | changed_blocks_count: self
|
2840 + | .changed_blocks_count
|
2841 + | /* ServerBuilderGenerator.kt:602 */
|
2842 + | .map(|v| match v {
|
2843 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2844 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2845 + | })
|
2846 + | /* ServerBuilderGenerator.kt:614 */
|
2847 + | .map(|res| res.map_err(ConstraintViolation::ChangedBlocksCount))
|
2848 + | .transpose()?
|
2849 + | /* ServerBuilderGenerator.kt:569 */
|
2850 + | .ok_or(ConstraintViolation::MissingChangedBlocksCount)?,
|
2851 + | /* ServerBuilderGenerator.kt:546 */
|
2852 + | checksum_aggregation_method: self
|
2853 + | .checksum_aggregation_method
|
2854 + | /* ServerBuilderGenerator.kt:602 */
|
2855 + | .map(|v| match v {
|
2856 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2857 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2858 + | })
|
2859 + | /* ServerBuilderGenerator.kt:614 */
|
2860 + | .map(|res| res.map_err(ConstraintViolation::ChecksumAggregationMethod))
|
2861 + | .transpose()?,
|
2862 + | /* ServerBuilderGenerator.kt:546 */
|
2863 + | checksum_algorithm: self
|
2864 + | .checksum_algorithm
|
2865 + | /* ServerBuilderGenerator.kt:602 */
|
2866 + | .map(|v| match v {
|
2867 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2868 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2869 + | })
|
2870 + | /* ServerBuilderGenerator.kt:614 */
|
2871 + | .map(|res| res.map_err(ConstraintViolation::ChecksumAlgorithm))
|
2872 + | .transpose()?,
|
2873 + | /* ServerBuilderGenerator.kt:546 */
|
2874 + | snapshot_id: self
|
2875 + | .snapshot_id
|
2876 + | /* ServerBuilderGenerator.kt:602 */
|
2877 + | .map(|v| match v {
|
2878 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2879 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2880 + | })
|
2881 + | /* ServerBuilderGenerator.kt:614 */
|
2882 + | .map(|res| res.map_err(ConstraintViolation::SnapshotId))
|
2883 + | .transpose()?
|
2884 + | /* ServerBuilderGenerator.kt:569 */
|
2885 + | .ok_or(ConstraintViolation::MissingSnapshotId)?,
|
2886 + | /* ServerBuilderGenerator.kt:546 */
|
2887 + | checksum: self
|
2888 + | .checksum
|
2889 + | /* ServerBuilderGenerator.kt:602 */
|
2890 + | .map(|v| match v {
|
2891 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2892 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2893 + | })
|
2894 + | /* ServerBuilderGenerator.kt:614 */
|
2895 + | .map(|res| res.map_err(ConstraintViolation::Checksum))
|
2896 + | .transpose()?,
|
2897 + | /* ServerBuilderGenerator.kt:542 */
|
2898 + | }, /* ServerBuilderGenerator.kt:287 */
|
2899 + | )
|
2900 + | /* ServerBuilderGenerator.kt:283 */
|
2901 + | }
|
2902 + | /* ServerBuilderGenerator.kt:215 */
|
2076 2903 | }
|
2904 + |
|
2905 + | /* RustCrateInlineModuleComposingWriter.kt:299 */
|
2077 2906 | }
|