3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 5 | pub struct ActivateKeySigningKeyInput {
|
6 6 | /// <p>A unique string used to identify a hosted zone.</p>
|
7 7 | pub hosted_zone_id: ::std::option::Option<::std::string::String>,
|
8 8 | /// <p>A string used to identify a key-signing key (KSK). <code>Name</code> can include numbers, letters, and underscores (_). <code>Name</code> must be unique for each key-signing key in the same hosted zone.</p>
|
9 9 | pub name: ::std::option::Option<::std::string::String>,
|
10 10 | }
|
11 11 | impl ActivateKeySigningKeyInput {
|
12 12 | /// <p>A unique string used to identify a hosted zone.</p>
|
13 13 | pub fn hosted_zone_id(&self) -> ::std::option::Option<&str> {
|
14 14 | self.hosted_zone_id.as_deref()
|
15 15 | }
|
16 16 | /// <p>A string used to identify a key-signing key (KSK). <code>Name</code> can include numbers, letters, and underscores (_). <code>Name</code> must be unique for each key-signing key in the same hosted zone.</p>
|
17 17 | pub fn name(&self) -> ::std::option::Option<&str> {
|
18 18 | self.name.as_deref()
|
19 19 | }
|
20 20 | }
|
21 21 | static ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA_ID: ::aws_smithy_schema::ShapeId = ::aws_smithy_schema::ShapeId::from_static(
|
22 22 | "com.amazonaws.route53.synthetic#ActivateKeySigningKeyInput",
|
23 23 | "com.amazonaws.route53.synthetic",
|
24 24 | "ActivateKeySigningKeyInput",
|
25 25 | );
|
26 26 | static ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_HOSTED_ZONE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
27 27 | ::aws_smithy_schema::ShapeId::from_static(
|
28 28 | "com.amazonaws.route53.synthetic#ActivateKeySigningKeyInput$HostedZoneId",
|
29 29 | "com.amazonaws.route53.synthetic",
|
30 30 | "ActivateKeySigningKeyInput",
|
31 31 | ),
|
32 32 | ::aws_smithy_schema::ShapeType::String,
|
33 - | "hosted_zone_id",
|
33 + | "HostedZoneId",
|
34 34 | 0,
|
35 35 | )
|
36 36 | .with_http_label();
|
37 37 | static ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
38 38 | ::aws_smithy_schema::ShapeId::from_static(
|
39 39 | "com.amazonaws.route53.synthetic#ActivateKeySigningKeyInput$Name",
|
40 40 | "com.amazonaws.route53.synthetic",
|
41 41 | "ActivateKeySigningKeyInput",
|
42 42 | ),
|
43 43 | ::aws_smithy_schema::ShapeType::String,
|
44 - | "name",
|
44 + | "Name",
|
45 45 | 1,
|
46 46 | )
|
47 47 | .with_http_label();
|
48 48 | static ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
49 49 | ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA_ID,
|
50 50 | ::aws_smithy_schema::ShapeType::Structure,
|
51 51 | &[&ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_HOSTED_ZONE_ID, &ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_NAME],
|
52 - | );
|
52 + | )
|
53 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
54 + | "POST",
|
55 + | "/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate",
|
56 + | None,
|
57 + | ));
|
53 58 | impl ActivateKeySigningKeyInput {
|
54 59 | /// The schema for this shape.
|
55 60 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA;
|
56 61 | }
|
57 62 | impl ::aws_smithy_schema::serde::SerializableStruct for ActivateKeySigningKeyInput {
|
58 63 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
59 64 | fn serialize_members(
|
60 65 | &self,
|
61 66 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
62 67 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
63 68 | if let Some(ref val) = self.hosted_zone_id {
|
64 69 | ser.write_string(&ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_HOSTED_ZONE_ID, val)?;
|
65 70 | }
|
66 71 | if let Some(ref val) = self.name {
|
67 72 | ser.write_string(&ACTIVATEKEYSIGNINGKEYINPUT_MEMBER_NAME, val)?;
|
68 73 | }
|
69 74 | Ok(())
|
70 75 | }
|
71 76 | }
|
72 77 | impl ActivateKeySigningKeyInput {
|
73 78 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
74 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
75 - | deserializer: &mut D,
|
79 + | pub fn deserialize(
|
80 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
76 81 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
77 82 | #[allow(unused_variables, unused_mut)]
|
78 83 | let mut builder = Self::builder();
|
79 84 | #[allow(
|
80 85 | unused_variables,
|
81 86 | unreachable_code,
|
82 87 | clippy::single_match,
|
83 88 | clippy::match_single_binding,
|
84 89 | clippy::diverging_sub_expression
|
85 90 | )]
|
86 - | deserializer.read_struct(&ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA, (), |_, member, deser| {
|
91 + | deserializer.read_struct(&ACTIVATEKEYSIGNINGKEYINPUT_SCHEMA, &mut |member, deser| {
|
87 92 | match member.member_index() {
|
88 93 | Some(0) => {
|
89 94 | builder.hosted_zone_id = Some(deser.read_string(member)?);
|
90 95 | }
|
91 96 | Some(1) => {
|
92 97 | builder.name = Some(deser.read_string(member)?);
|
93 98 | }
|
94 99 | _ => {}
|
95 100 | }
|
96 101 | Ok(())
|
97 102 | })?;
|
103 + | builder.hosted_zone_id = builder.hosted_zone_id.or(Some(String::new()));
|
104 + | builder.name = builder.name.or(Some(String::new()));
|
98 105 | builder
|
99 106 | .build()
|
100 107 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
101 108 | }
|
102 109 | }
|
110 + | impl ActivateKeySigningKeyInput {
|
111 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
112 + | pub fn deserialize_with_response(
|
113 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
114 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
115 + | _status: u16,
|
116 + | _body: &[u8],
|
117 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
118 + | Self::deserialize(deserializer)
|
119 + | }
|
120 + | }
|
103 121 | impl ActivateKeySigningKeyInput {
|
104 122 | /// Creates a new builder-style object to manufacture [`ActivateKeySigningKeyInput`](crate::operation::activate_key_signing_key::ActivateKeySigningKeyInput).
|
105 123 | pub fn builder() -> crate::operation::activate_key_signing_key::builders::ActivateKeySigningKeyInputBuilder {
|
106 124 | crate::operation::activate_key_signing_key::builders::ActivateKeySigningKeyInputBuilder::default()
|
107 125 | }
|
108 126 | }
|
109 127 |
|
110 128 | /// A builder for [`ActivateKeySigningKeyInput`](crate::operation::activate_key_signing_key::ActivateKeySigningKeyInput).
|
111 129 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
112 130 | #[non_exhaustive]
|