5 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 6 | pub struct GetHostedZoneLimitOutput {
|
7 7 | /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_RRSETS_BY_ZONE</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of records that you can create in the specified hosted zone.</p>
|
8 8 | pub limit: ::std::option::Option<crate::types::HostedZoneLimit>,
|
9 9 | /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_RRSETS_BY_ZONE</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of records that you have created in the specified hosted zone.</p>
|
10 10 | pub count: i64,
|
11 11 | _request_id: Option<String>,
|
12 12 | }
|
13 13 | impl GetHostedZoneLimitOutput {
|
14 14 | /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_RRSETS_BY_ZONE</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of records that you can create in the specified hosted zone.</p>
|
15 15 | pub fn limit(&self) -> ::std::option::Option<&crate::types::HostedZoneLimit> {
|
16 16 | self.limit.as_ref()
|
17 17 | }
|
18 18 | /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_RRSETS_BY_ZONE</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of records that you have created in the specified hosted zone.</p>
|
19 19 | pub fn count(&self) -> i64 {
|
20 20 | self.count
|
21 21 | }
|
22 22 | }
|
23 23 | static GETHOSTEDZONELIMITOUTPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
24 24 | "com.amazonaws.route53.synthetic#GetHostedZoneLimitOutput",
|
25 25 | "com.amazonaws.route53.synthetic",
|
26 26 | "GetHostedZoneLimitOutput",
|
27 27 | );
|
28 28 | static GETHOSTEDZONELIMITOUTPUT_MEMBER_LIMIT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
29 29 | ::aws_smithy_schema::ShapeId::from_static(
|
30 30 | "com.amazonaws.route53.synthetic#GetHostedZoneLimitOutput$Limit",
|
31 31 | "com.amazonaws.route53.synthetic",
|
32 32 | "GetHostedZoneLimitOutput",
|
33 33 | ),
|
34 34 | ::aws_smithy_schema::ShapeType::Structure,
|
35 - | "limit",
|
35 + | "Limit",
|
36 36 | 0,
|
37 37 | );
|
38 38 | static GETHOSTEDZONELIMITOUTPUT_MEMBER_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
39 39 | ::aws_smithy_schema::ShapeId::from_static(
|
40 40 | "com.amazonaws.route53.synthetic#GetHostedZoneLimitOutput$Count",
|
41 41 | "com.amazonaws.route53.synthetic",
|
42 42 | "GetHostedZoneLimitOutput",
|
43 43 | ),
|
44 44 | ::aws_smithy_schema::ShapeType::Long,
|
45 - | "count",
|
45 + | "Count",
|
46 46 | 1,
|
47 47 | );
|
48 + | static GETHOSTEDZONELIMITOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
49 + | ::aws_smithy_schema::ShapeId::from_static("synthetic#request_id", "synthetic", "request_id"),
|
50 + | ::aws_smithy_schema::ShapeType::String,
|
51 + | "request_id",
|
52 + | 2,
|
53 + | )
|
54 + | .with_http_header("x-amzn-requestid");
|
48 55 | static GETHOSTEDZONELIMITOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
49 56 | GETHOSTEDZONELIMITOUTPUT_SCHEMA_ID,
|
50 57 | ::aws_smithy_schema::ShapeType::Structure,
|
51 - | &[&GETHOSTEDZONELIMITOUTPUT_MEMBER_LIMIT, &GETHOSTEDZONELIMITOUTPUT_MEMBER_COUNT],
|
58 + | &[
|
59 + | &GETHOSTEDZONELIMITOUTPUT_MEMBER_LIMIT,
|
60 + | &GETHOSTEDZONELIMITOUTPUT_MEMBER_COUNT,
|
61 + | &GETHOSTEDZONELIMITOUTPUT_MEMBER__REQUEST_ID,
|
62 + | ],
|
52 63 | );
|
53 64 | impl GetHostedZoneLimitOutput {
|
54 65 | /// The schema for this shape.
|
55 66 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETHOSTEDZONELIMITOUTPUT_SCHEMA;
|
56 67 | }
|
57 68 | impl ::aws_smithy_schema::serde::SerializableStruct for GetHostedZoneLimitOutput {
|
58 69 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
59 70 | fn serialize_members(
|
60 71 | &self,
|
61 72 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
62 73 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
63 74 | if let Some(ref val) = self.limit {
|
64 75 | ser.write_struct(&GETHOSTEDZONELIMITOUTPUT_MEMBER_LIMIT, val)?;
|
65 76 | }
|
66 77 | {
|
67 78 | let val = &self.count;
|
68 79 | ser.write_long(&GETHOSTEDZONELIMITOUTPUT_MEMBER_COUNT, *val)?;
|
69 80 | }
|
70 81 | Ok(())
|
71 82 | }
|
72 83 | }
|
73 84 | impl GetHostedZoneLimitOutput {
|
74 85 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
75 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
76 - | deserializer: &mut D,
|
86 + | pub fn deserialize(
|
87 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
77 88 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
78 89 | #[allow(unused_variables, unused_mut)]
|
79 90 | let mut builder = Self::builder();
|
80 91 | #[allow(
|
81 92 | unused_variables,
|
82 93 | unreachable_code,
|
83 94 | clippy::single_match,
|
84 95 | clippy::match_single_binding,
|
85 96 | clippy::diverging_sub_expression
|
86 97 | )]
|
87 - | deserializer.read_struct(&GETHOSTEDZONELIMITOUTPUT_SCHEMA, (), |_, member, deser| {
|
98 + | deserializer.read_struct(&GETHOSTEDZONELIMITOUTPUT_SCHEMA, &mut |member, deser| {
|
99 + | match member.member_index() {
|
100 + | Some(0) => {
|
101 + | builder.limit = Some(crate::types::HostedZoneLimit::deserialize(deser)?);
|
102 + | }
|
103 + | Some(1) => {
|
104 + | builder.count = Some(deser.read_long(member)?);
|
105 + | }
|
106 + | Some(2) => {
|
107 + | builder._request_id = Some(deser.read_string(member)?);
|
108 + | }
|
109 + | _ => {}
|
110 + | }
|
111 + | Ok(())
|
112 + | })?;
|
113 + | Ok(builder.build())
|
114 + | }
|
115 + | }
|
116 + | impl GetHostedZoneLimitOutput {
|
117 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
118 + | /// Header-bound members are read directly from headers, avoiding runtime
|
119 + | /// member iteration overhead. Body members are read via the deserializer.
|
120 + | pub fn deserialize_with_response(
|
121 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
122 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
123 + | _status: u16,
|
124 + | _body: &[u8],
|
125 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
126 + | #[allow(unused_variables, unused_mut)]
|
127 + | let mut builder = Self::builder();
|
128 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
129 + | builder._request_id = Some(val.to_string());
|
130 + | }
|
131 + | #[allow(
|
132 + | unused_variables,
|
133 + | unreachable_code,
|
134 + | clippy::single_match,
|
135 + | clippy::match_single_binding,
|
136 + | clippy::diverging_sub_expression
|
137 + | )]
|
138 + | deserializer.read_struct(&GETHOSTEDZONELIMITOUTPUT_SCHEMA, &mut |member, deser| {
|
88 139 | match member.member_index() {
|
89 140 | Some(0) => {
|
90 141 | builder.limit = Some(crate::types::HostedZoneLimit::deserialize(deser)?);
|
91 142 | }
|
92 143 | Some(1) => {
|
93 144 | builder.count = Some(deser.read_long(member)?);
|
94 145 | }
|
95 146 | _ => {}
|
96 147 | }
|
97 148 | Ok(())
|