3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct DescribeMultiRegionAccessPointOperationInput {
|
6 6 | /// <p>The Amazon Web Services account ID for the owner of the Multi-Region Access Point.</p>
|
7 7 | pub account_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <p>The request token associated with the request you want to know about. This request token is returned as part of the response when you make an asynchronous request. You provide this token to query about the status of the asynchronous action.</p>
|
9 9 | pub request_token_arn: ::std::option::Option<::std::string::String>,
|
10 10 | }
|
11 11 | impl DescribeMultiRegionAccessPointOperationInput {
|
12 12 | /// <p>The Amazon Web Services account ID for the owner of the Multi-Region Access Point.</p>
|
13 13 | pub fn account_id(&self) -> ::std::option::Option<&str> {
|
14 14 | self.account_id.as_deref()
|
15 15 | }
|
16 16 | /// <p>The request token associated with the request you want to know about. This request token is returned as part of the response when you make an asynchronous request. You provide this token to query about the status of the asynchronous action.</p>
|
17 17 | pub fn request_token_arn(&self) -> ::std::option::Option<&str> {
|
18 18 | self.request_token_arn.as_deref()
|
19 19 | }
|
20 20 | }
|
21 21 | static DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.s3control.synthetic#DescribeMultiRegionAccessPointOperationInput",
|
23 23 | "com.amazonaws.s3control.synthetic",
|
24 24 | "DescribeMultiRegionAccessPointOperationInput",
|
25 25 | );
|
26 26 | static DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_ACCOUNT_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.s3control.synthetic#DescribeMultiRegionAccessPointOperationInput$AccountId",
|
29 29 | "com.amazonaws.s3control.synthetic",
|
30 30 | "DescribeMultiRegionAccessPointOperationInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::String,
|
33 - | "account_id",
|
33 + | "AccountId",
|
34 34 | 0,
|
35 35 | )
|
36 36 | .with_host_label()
|
37 37 | .with_http_header("x-amz-account-id");
|
38 38 | static DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_REQUEST_TOKEN_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
39 39 | ::aws_smithy_schema::ShapeId::from_static(
|
40 40 | "com.amazonaws.s3control.synthetic#DescribeMultiRegionAccessPointOperationInput$RequestTokenARN",
|
41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "DescribeMultiRegionAccessPointOperationInput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::String,
|
45 - | "request_token_arn",
|
45 + | "RequestTokenARN",
|
46 46 | 1,
|
47 47 | )
|
48 48 | .with_http_label();
|
49 49 | static DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
50 50 | DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA_ID,
|
51 51 | ::aws_smithy_schema::ShapeType::Structure,
|
52 52 | &[
|
53 53 | &DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_ACCOUNT_ID,
|
54 54 | &DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_REQUEST_TOKEN_ARN,
|
55 55 | ],
|
56 - | );
|
56 + | )
|
57 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
58 + | "GET",
|
59 + | "/v20180820/async-requests/mrap/{RequestTokenARN+}",
|
60 + | None,
|
61 + | ));
|
57 62 | impl DescribeMultiRegionAccessPointOperationInput {
|
58 63 | /// The schema for this shape.
|
59 64 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA;
|
60 65 | }
|
61 66 | impl ::aws_smithy_schema::serde::SerializableStruct for DescribeMultiRegionAccessPointOperationInput {
|
62 67 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
63 68 | fn serialize_members(
|
64 69 | &self,
|
65 70 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
66 71 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
67 72 | if let Some(ref val) = self.account_id {
|
68 73 | ser.write_string(&DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_ACCOUNT_ID, val)?;
|
69 74 | }
|
70 75 | if let Some(ref val) = self.request_token_arn {
|
71 76 | ser.write_string(&DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_MEMBER_REQUEST_TOKEN_ARN, val)?;
|
72 77 | }
|
73 78 | Ok(())
|
74 79 | }
|
75 80 | }
|
76 81 | impl DescribeMultiRegionAccessPointOperationInput {
|
77 82 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
78 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
79 - | deserializer: &mut D,
|
83 + | pub fn deserialize(
|
84 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
80 85 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
81 86 | #[allow(unused_variables, unused_mut)]
|
82 87 | let mut builder = Self::builder();
|
83 88 | #[allow(
|
84 89 | unused_variables,
|
85 90 | unreachable_code,
|
86 91 | clippy::single_match,
|
87 92 | clippy::match_single_binding,
|
88 93 | clippy::diverging_sub_expression
|
89 94 | )]
|
90 - | deserializer.read_struct(&DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
|
95 + | deserializer.read_struct(&DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA, &mut |member, deser| {
|
91 96 | match member.member_index() {
|
92 97 | Some(0) => {
|
93 98 | builder.account_id = Some(deser.read_string(member)?);
|
94 99 | }
|
95 100 | Some(1) => {
|
96 101 | builder.request_token_arn = Some(deser.read_string(member)?);
|
97 102 | }
|
98 103 | _ => {}
|
99 104 | }
|
100 105 | Ok(())
|
101 106 | })?;
|
107 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
108 + | builder.request_token_arn = builder.request_token_arn.or(Some(String::new()));
|
109 + | builder
|
110 + | .build()
|
111 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
112 + | }
|
113 + | }
|
114 + | impl DescribeMultiRegionAccessPointOperationInput {
|
115 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
116 + | /// Header-bound members are read directly from headers, avoiding runtime
|
117 + | /// member iteration overhead. Body members are read via the deserializer.
|
118 + | pub fn deserialize_with_response(
|
119 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
120 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
121 + | _status: u16,
|
122 + | _body: &[u8],
|
123 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
124 + | #[allow(unused_variables, unused_mut)]
|
125 + | let mut builder = Self::builder();
|
126 + | if let Some(val) = headers.get("x-amz-account-id") {
|
127 + | builder.account_id = Some(val.to_string());
|
128 + | }
|
129 + | #[allow(
|
130 + | unused_variables,
|
131 + | unreachable_code,
|
132 + | clippy::single_match,
|
133 + | clippy::match_single_binding,
|
134 + | clippy::diverging_sub_expression
|
135 + | )]
|
136 + | deserializer.read_struct(&DESCRIBEMULTIREGIONACCESSPOINTOPERATIONINPUT_SCHEMA, &mut |member, deser| {
|
137 + | match member.member_index() {
|
138 + | Some(0) => { /* read from headers above */ }
|
139 + | Some(1) => {
|
140 + | builder.request_token_arn = Some(deser.read_string(member)?);
|
141 + | }
|
142 + | _ => {}
|
143 + | }
|
144 + | Ok(())
|
145 + | })?;
|
102 146 | builder
|
103 147 | .build()
|
104 148 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
105 149 | }
|
106 150 | }
|
107 151 | impl DescribeMultiRegionAccessPointOperationInput {
|
108 152 | /// Creates a new builder-style object to manufacture [`DescribeMultiRegionAccessPointOperationInput`](crate::operation::describe_multi_region_access_point_operation::DescribeMultiRegionAccessPointOperationInput).
|
109 153 | pub fn builder() -> crate::operation::describe_multi_region_access_point_operation::builders::DescribeMultiRegionAccessPointOperationInputBuilder
|
110 154 | {
|
111 155 | crate::operation::describe_multi_region_access_point_operation::builders::DescribeMultiRegionAccessPointOperationInputBuilder::default()
|