12 12 | pub second_block_token: ::std::option::Option<::std::string::String>,
|
13 13 | }
|
14 14 | impl ChangedBlock {
|
15 15 | /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
|
16 16 | pub fn first_block_token(&self) -> ::std::option::Option<&str> {
|
17 17 | self.first_block_token.as_deref()
|
18 18 | }
|
19 19 | /// <p>The block index.</p>
|
20 20 | pub fn block_index(&self) -> ::std::option::Option<i32> {
|
21 21 | self.block_index
|
22 22 | }
|
23 23 | /// <p>The block token for the block index of the <code>SecondSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation.</p>
|
24 24 | pub fn second_block_token(&self) -> ::std::option::Option<&str> {
|
25 25 | self.second_block_token.as_deref()
|
26 26 | }
|
27 27 | }
|
28 28 | impl ::std::fmt::Debug for ChangedBlock {
|
29 29 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
30 30 | let mut formatter = f.debug_struct("ChangedBlock");
|
31 31 | formatter.field("first_block_token", &"*** Sensitive Data Redacted ***");
|
32 32 | formatter.field("block_index", &"*** Sensitive Data Redacted ***");
|
33 33 | formatter.field("second_block_token", &"*** Sensitive Data Redacted ***");
|
34 34 | formatter.finish()
|
35 35 | }
|
36 36 | }
|
37 37 | static CHANGEDBLOCK_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
38 38 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ebs#ChangedBlock", "com.amazonaws.ebs", "ChangedBlock");
|
39 39 | static CHANGEDBLOCK_MEMBER_FIRST_BLOCK_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
40 40 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ebs#ChangedBlock$FirstBlockToken", "com.amazonaws.ebs", "ChangedBlock"),
|
41 41 | ::aws_smithy_schema::ShapeType::String,
|
42 - | "first_block_token",
|
42 + | "FirstBlockToken",
|
43 43 | 0,
|
44 44 | );
|
45 45 | static CHANGEDBLOCK_MEMBER_BLOCK_INDEX: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
46 46 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ebs#ChangedBlock$BlockIndex", "com.amazonaws.ebs", "ChangedBlock"),
|
47 47 | ::aws_smithy_schema::ShapeType::Integer,
|
48 - | "block_index",
|
48 + | "BlockIndex",
|
49 49 | 1,
|
50 50 | );
|
51 51 | static CHANGEDBLOCK_MEMBER_SECOND_BLOCK_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
52 52 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ebs#ChangedBlock$SecondBlockToken", "com.amazonaws.ebs", "ChangedBlock"),
|
53 53 | ::aws_smithy_schema::ShapeType::String,
|
54 - | "second_block_token",
|
54 + | "SecondBlockToken",
|
55 55 | 2,
|
56 56 | );
|
57 57 | static CHANGEDBLOCK_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
58 58 | CHANGEDBLOCK_SCHEMA_ID,
|
59 59 | ::aws_smithy_schema::ShapeType::Structure,
|
60 60 | &[
|
61 61 | &CHANGEDBLOCK_MEMBER_FIRST_BLOCK_TOKEN,
|
62 62 | &CHANGEDBLOCK_MEMBER_BLOCK_INDEX,
|
63 63 | &CHANGEDBLOCK_MEMBER_SECOND_BLOCK_TOKEN,
|
64 64 | ],
|
65 65 | )
|
66 66 | .with_sensitive();
|
67 67 | impl ChangedBlock {
|
68 68 | /// The schema for this shape.
|
69 69 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CHANGEDBLOCK_SCHEMA;
|
70 70 | }
|
71 71 | impl ::aws_smithy_schema::serde::SerializableStruct for ChangedBlock {
|
72 72 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
73 73 | fn serialize_members(
|
74 74 | &self,
|
75 75 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
76 76 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
77 77 | if let Some(ref val) = self.first_block_token {
|
78 78 | ser.write_string(&CHANGEDBLOCK_MEMBER_FIRST_BLOCK_TOKEN, val)?;
|
79 79 | }
|
80 80 | if let Some(ref val) = self.block_index {
|
81 81 | ser.write_integer(&CHANGEDBLOCK_MEMBER_BLOCK_INDEX, *val)?;
|
82 82 | }
|
83 83 | if let Some(ref val) = self.second_block_token {
|
84 84 | ser.write_string(&CHANGEDBLOCK_MEMBER_SECOND_BLOCK_TOKEN, val)?;
|
85 85 | }
|
86 86 | Ok(())
|
87 87 | }
|
88 88 | }
|
89 89 | impl ChangedBlock {
|
90 90 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
91 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
92 - | deserializer: &mut D,
|
91 + | pub fn deserialize(
|
92 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
93 93 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
94 94 | #[allow(unused_variables, unused_mut)]
|
95 95 | let mut builder = Self::builder();
|
96 96 | #[allow(
|
97 97 | unused_variables,
|
98 98 | unreachable_code,
|
99 99 | clippy::single_match,
|
100 100 | clippy::match_single_binding,
|
101 101 | clippy::diverging_sub_expression
|
102 102 | )]
|
103 - | deserializer.read_struct(&CHANGEDBLOCK_SCHEMA, (), |_, member, deser| {
|
103 + | deserializer.read_struct(&CHANGEDBLOCK_SCHEMA, &mut |member, deser| {
|
104 104 | match member.member_index() {
|
105 105 | Some(0) => {
|
106 106 | builder.first_block_token = Some(deser.read_string(member)?);
|
107 107 | }
|
108 108 | Some(1) => {
|
109 109 | builder.block_index = Some(deser.read_integer(member)?);
|
110 110 | }
|
111 111 | Some(2) => {
|
112 112 | builder.second_block_token = Some(deser.read_string(member)?);
|
113 113 | }
|
114 114 | _ => {}
|
115 115 | }
|
116 116 | Ok(())
|
117 117 | })?;
|
118 118 | Ok(builder.build())
|
119 119 | }
|
120 120 | }
|
121 + | impl ChangedBlock {
|
122 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
123 + | pub fn deserialize_with_response(
|
124 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
125 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
126 + | _status: u16,
|
127 + | _body: &[u8],
|
128 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
129 + | Self::deserialize(deserializer)
|
130 + | }
|
131 + | }
|
121 132 | impl ChangedBlock {
|
122 133 | /// Creates a new builder-style object to manufacture [`ChangedBlock`](crate::types::ChangedBlock).
|
123 134 | pub fn builder() -> crate::types::builders::ChangedBlockBuilder {
|
124 135 | crate::types::builders::ChangedBlockBuilder::default()
|
125 136 | }
|
126 137 | }
|
127 138 |
|
128 139 | /// A builder for [`ChangedBlock`](crate::types::ChangedBlock).
|
129 140 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
130 141 | #[non_exhaustive]
|
131 142 | pub struct ChangedBlockBuilder {
|
132 143 | pub(crate) first_block_token: ::std::option::Option<::std::string::String>,
|
133 144 | pub(crate) block_index: ::std::option::Option<i32>,
|
134 145 | pub(crate) second_block_token: ::std::option::Option<::std::string::String>,
|
135 146 | }
|
136 147 | impl ChangedBlockBuilder {
|
137 148 | /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
|
138 149 | pub fn first_block_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
139 150 | self.first_block_token = ::std::option::Option::Some(input.into());
|
140 151 | self
|
141 152 | }
|
142 153 | /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
|
143 154 | pub fn set_first_block_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
144 155 | self.first_block_token = input;
|
145 156 | self
|
146 157 | }
|
147 158 | /// <p>The block token for the block index of the <code>FirstSnapshotId</code> specified in the <code>ListChangedBlocks</code> operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot.</p>
|
148 159 | pub fn get_first_block_token(&self) -> &::std::option::Option<::std::string::String> {
|
149 160 | &self.first_block_token
|
150 161 | }
|