3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct DeleteNetworkInsightsAccessScopeInput {
|
6 6 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
7 7 | pub dry_run: ::std::option::Option<bool>,
|
8 8 | /// <p>The ID of the Network Access Scope.</p>
|
9 9 | pub network_insights_access_scope_id: ::std::option::Option<::std::string::String>,
|
10 10 | }
|
11 11 | impl DeleteNetworkInsightsAccessScopeInput {
|
12 12 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
13 13 | pub fn dry_run(&self) -> ::std::option::Option<bool> {
|
14 14 | self.dry_run
|
15 15 | }
|
16 16 | /// <p>The ID of the Network Access Scope.</p>
|
17 17 | pub fn network_insights_access_scope_id(&self) -> ::std::option::Option<&str> {
|
18 18 | self.network_insights_access_scope_id.as_deref()
|
19 19 | }
|
20 20 | }
|
21 21 | static DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.ec2.synthetic#DeleteNetworkInsightsAccessScopeInput",
|
23 23 | "com.amazonaws.ec2.synthetic",
|
24 24 | "DeleteNetworkInsightsAccessScopeInput",
|
25 25 | );
|
26 26 | static DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.ec2.synthetic#DeleteNetworkInsightsAccessScopeInput$DryRun",
|
29 29 | "com.amazonaws.ec2.synthetic",
|
30 30 | "DeleteNetworkInsightsAccessScopeInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::Boolean,
|
33 - | "dry_run",
|
33 + | "DryRun",
|
34 34 | 0,
|
35 35 | );
|
36 36 | static DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_NETWORK_INSIGHTS_ACCESS_SCOPE_ID: ::aws_smithy_schema::Schema =
|
37 37 | ::aws_smithy_schema::Schema::new_member(
|
38 38 | ::aws_smithy_schema::ShapeId::from_static(
|
39 39 | "com.amazonaws.ec2.synthetic#DeleteNetworkInsightsAccessScopeInput$NetworkInsightsAccessScopeId",
|
40 40 | "com.amazonaws.ec2.synthetic",
|
41 41 | "DeleteNetworkInsightsAccessScopeInput",
|
42 42 | ),
|
43 43 | ::aws_smithy_schema::ShapeType::String,
|
44 - | "network_insights_access_scope_id",
|
44 + | "NetworkInsightsAccessScopeId",
|
45 45 | 1,
|
46 46 | );
|
47 47 | static DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
48 48 | DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA_ID,
|
49 49 | ::aws_smithy_schema::ShapeType::Structure,
|
50 50 | &[
|
51 51 | &DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_DRY_RUN,
|
52 52 | &DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_NETWORK_INSIGHTS_ACCESS_SCOPE_ID,
|
53 53 | ],
|
54 54 | );
|
55 55 | impl DeleteNetworkInsightsAccessScopeInput {
|
56 56 | /// The schema for this shape.
|
57 57 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA;
|
58 58 | }
|
59 59 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteNetworkInsightsAccessScopeInput {
|
60 60 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
61 61 | fn serialize_members(
|
62 62 | &self,
|
63 63 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
64 64 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
65 65 | if let Some(ref val) = self.dry_run {
|
66 66 | ser.write_boolean(&DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_DRY_RUN, *val)?;
|
67 67 | }
|
68 68 | if let Some(ref val) = self.network_insights_access_scope_id {
|
69 69 | ser.write_string(&DELETENETWORKINSIGHTSACCESSSCOPEINPUT_MEMBER_NETWORK_INSIGHTS_ACCESS_SCOPE_ID, val)?;
|
70 70 | }
|
71 71 | Ok(())
|
72 72 | }
|
73 73 | }
|
74 74 | impl DeleteNetworkInsightsAccessScopeInput {
|
75 75 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
76 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
77 - | deserializer: &mut D,
|
76 + | pub fn deserialize(
|
77 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
78 78 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
79 79 | #[allow(unused_variables, unused_mut)]
|
80 80 | let mut builder = Self::builder();
|
81 81 | #[allow(
|
82 82 | unused_variables,
|
83 83 | unreachable_code,
|
84 84 | clippy::single_match,
|
85 85 | clippy::match_single_binding,
|
86 86 | clippy::diverging_sub_expression
|
87 87 | )]
|
88 - | deserializer.read_struct(&DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA, (), |_, member, deser| {
|
88 + | deserializer.read_struct(&DELETENETWORKINSIGHTSACCESSSCOPEINPUT_SCHEMA, &mut |member, deser| {
|
89 89 | match member.member_index() {
|
90 90 | Some(0) => {
|
91 91 | builder.dry_run = Some(deser.read_boolean(member)?);
|
92 92 | }
|
93 93 | Some(1) => {
|
94 94 | builder.network_insights_access_scope_id = Some(deser.read_string(member)?);
|
95 95 | }
|
96 96 | _ => {}
|
97 97 | }
|
98 98 | Ok(())
|
99 99 | })?;
|
100 + | builder.network_insights_access_scope_id = builder.network_insights_access_scope_id.or(Some(String::new()));
|
100 101 | builder
|
101 102 | .build()
|
102 103 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
103 104 | }
|
104 105 | }
|
106 + | impl DeleteNetworkInsightsAccessScopeInput {
|
107 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
108 + | pub fn deserialize_with_response(
|
109 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
110 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
111 + | _status: u16,
|
112 + | _body: &[u8],
|
113 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
114 + | Self::deserialize(deserializer)
|
115 + | }
|
116 + | }
|
105 117 | impl DeleteNetworkInsightsAccessScopeInput {
|
106 118 | /// Creates a new builder-style object to manufacture [`DeleteNetworkInsightsAccessScopeInput`](crate::operation::delete_network_insights_access_scope::DeleteNetworkInsightsAccessScopeInput).
|
107 119 | pub fn builder() -> crate::operation::delete_network_insights_access_scope::builders::DeleteNetworkInsightsAccessScopeInputBuilder {
|
108 120 | crate::operation::delete_network_insights_access_scope::builders::DeleteNetworkInsightsAccessScopeInputBuilder::default()
|
109 121 | }
|
110 122 | }
|
111 123 |
|
112 124 | /// A builder for [`DeleteNetworkInsightsAccessScopeInput`](crate::operation::delete_network_insights_access_scope::DeleteNetworkInsightsAccessScopeInput).
|
113 125 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
114 126 | #[non_exhaustive]
|
115 127 | pub struct DeleteNetworkInsightsAccessScopeInputBuilder {
|
116 128 | pub(crate) dry_run: ::std::option::Option<bool>,
|
117 129 | pub(crate) network_insights_access_scope_id: ::std::option::Option<::std::string::String>,
|
118 130 | }
|
119 131 | impl DeleteNetworkInsightsAccessScopeInputBuilder {
|
120 132 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
121 133 | pub fn dry_run(mut self, input: bool) -> Self {
|
122 134 | self.dry_run = ::std::option::Option::Some(input);
|
123 135 | self
|
124 136 | }
|
125 137 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
126 138 | pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
|
127 139 | self.dry_run = input;
|
128 140 | self
|
129 141 | }
|
130 142 | /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
|
131 143 | pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
|
132 144 | &self.dry_run
|
133 145 | }
|
134 146 | /// <p>The ID of the Network Access Scope.</p>
|