3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct AssociateAccessGrantsIdentityCenterInput {
|
6 6 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
|
7 7 | pub account_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <p>The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</p>
|
9 9 | pub identity_center_arn: ::std::option::Option<::std::string::String>,
|
10 10 | }
|
11 11 | impl AssociateAccessGrantsIdentityCenterInput {
|
12 12 | /// <p>The Amazon Web Services account ID of the S3 Access Grants instance.</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 Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the <a href="https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ListInstances.html">ListInstances</a> API operation to retrieve a list of your Identity Center instances and their ARNs.</p>
|
17 17 | pub fn identity_center_arn(&self) -> ::std::option::Option<&str> {
|
18 18 | self.identity_center_arn.as_deref()
|
19 19 | }
|
20 20 | }
|
21 21 | static ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.s3control.synthetic#AssociateAccessGrantsIdentityCenterInput",
|
23 23 | "com.amazonaws.s3control.synthetic",
|
24 24 | "AssociateAccessGrantsIdentityCenterInput",
|
25 25 | );
|
26 26 | static ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_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#AssociateAccessGrantsIdentityCenterInput$AccountId",
|
29 29 | "com.amazonaws.s3control.synthetic",
|
30 30 | "AssociateAccessGrantsIdentityCenterInput",
|
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 ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_MEMBER_IDENTITY_CENTER_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#AssociateAccessGrantsIdentityCenterInput$IdentityCenterArn",
|
41 41 | "com.amazonaws.s3control.synthetic",
|
42 42 | "AssociateAccessGrantsIdentityCenterInput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::String,
|
45 - | "identity_center_arn",
|
45 + | "IdentityCenterArn",
|
46 46 | 1,
|
47 47 | );
|
48 48 | static ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
49 49 | ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA_ID,
|
50 50 | ::aws_smithy_schema::ShapeType::Structure,
|
51 51 | &[
|
52 52 | &ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_MEMBER_ACCOUNT_ID,
|
53 53 | &ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_MEMBER_IDENTITY_CENTER_ARN,
|
54 54 | ],
|
55 - | );
|
55 + | )
|
56 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
57 + | "POST",
|
58 + | "/v20180820/accessgrantsinstance/identitycenter",
|
59 + | None,
|
60 + | ));
|
56 61 | impl AssociateAccessGrantsIdentityCenterInput {
|
57 62 | /// The schema for this shape.
|
58 63 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA;
|
59 64 | }
|
60 65 | impl ::aws_smithy_schema::serde::SerializableStruct for AssociateAccessGrantsIdentityCenterInput {
|
61 66 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
62 67 | fn serialize_members(
|
63 68 | &self,
|
64 69 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
65 70 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
66 71 | if let Some(ref val) = self.account_id {
|
67 72 | ser.write_string(&ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_MEMBER_ACCOUNT_ID, val)?;
|
68 73 | }
|
69 74 | if let Some(ref val) = self.identity_center_arn {
|
70 75 | ser.write_string(&ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_MEMBER_IDENTITY_CENTER_ARN, val)?;
|
71 76 | }
|
72 77 | Ok(())
|
73 78 | }
|
74 79 | }
|
75 80 | impl AssociateAccessGrantsIdentityCenterInput {
|
76 81 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
77 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
78 - | deserializer: &mut D,
|
82 + | pub fn deserialize(
|
83 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
79 84 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
80 85 | #[allow(unused_variables, unused_mut)]
|
81 86 | let mut builder = Self::builder();
|
82 87 | #[allow(
|
83 88 | unused_variables,
|
84 89 | unreachable_code,
|
85 90 | clippy::single_match,
|
86 91 | clippy::match_single_binding,
|
87 92 | clippy::diverging_sub_expression
|
88 93 | )]
|
89 - | deserializer.read_struct(&ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA, (), |_, member, deser| {
|
94 + | deserializer.read_struct(&ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA, &mut |member, deser| {
|
90 95 | match member.member_index() {
|
91 96 | Some(0) => {
|
92 97 | builder.account_id = Some(deser.read_string(member)?);
|
93 98 | }
|
94 99 | Some(1) => {
|
95 100 | builder.identity_center_arn = Some(deser.read_string(member)?);
|
96 101 | }
|
97 102 | _ => {}
|
98 103 | }
|
99 104 | Ok(())
|
100 105 | })?;
|
106 + | builder.account_id = builder.account_id.or(Some(String::new()));
|
107 + | builder.identity_center_arn = builder.identity_center_arn.or(Some(String::new()));
|
108 + | builder
|
109 + | .build()
|
110 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
111 + | }
|
112 + | }
|
113 + | impl AssociateAccessGrantsIdentityCenterInput {
|
114 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
115 + | /// Header-bound members are read directly from headers, avoiding runtime
|
116 + | /// member iteration overhead. Body members are read via the deserializer.
|
117 + | pub fn deserialize_with_response(
|
118 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
119 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
120 + | _status: u16,
|
121 + | _body: &[u8],
|
122 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
123 + | #[allow(unused_variables, unused_mut)]
|
124 + | let mut builder = Self::builder();
|
125 + | if let Some(val) = headers.get("x-amz-account-id") {
|
126 + | builder.account_id = Some(val.to_string());
|
127 + | }
|
128 + | #[allow(
|
129 + | unused_variables,
|
130 + | unreachable_code,
|
131 + | clippy::single_match,
|
132 + | clippy::match_single_binding,
|
133 + | clippy::diverging_sub_expression
|
134 + | )]
|
135 + | deserializer.read_struct(&ASSOCIATEACCESSGRANTSIDENTITYCENTERINPUT_SCHEMA, &mut |member, deser| {
|
136 + | match member.member_index() {
|
137 + | Some(0) => { /* read from headers above */ }
|
138 + | Some(1) => {
|
139 + | builder.identity_center_arn = Some(deser.read_string(member)?);
|
140 + | }
|
141 + | _ => {}
|
142 + | }
|
143 + | Ok(())
|
144 + | })?;
|
101 145 | builder
|
102 146 | .build()
|
103 147 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
104 148 | }
|
105 149 | }
|
106 150 | impl AssociateAccessGrantsIdentityCenterInput {
|
107 151 | /// Creates a new builder-style object to manufacture [`AssociateAccessGrantsIdentityCenterInput`](crate::operation::associate_access_grants_identity_center::AssociateAccessGrantsIdentityCenterInput).
|
108 152 | pub fn builder() -> crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder {
|
109 153 | crate::operation::associate_access_grants_identity_center::builders::AssociateAccessGrantsIdentityCenterInputBuilder::default()
|
110 154 | }
|