aws_sdk_route53/operation/update_hosted_zone_comment/_update_hosted_zone_comment_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A request to update the comment for a hosted zone.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateHostedZoneCommentInput {
7 /// <p>The ID for the hosted zone that you want to update the comment for.</p>
8 pub id: ::std::option::Option<::std::string::String>,
9 /// <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>
10 pub comment: ::std::option::Option<::std::string::String>,
11}
12impl UpdateHostedZoneCommentInput {
13 /// <p>The ID for the hosted zone that you want to update the comment for.</p>
14 pub fn id(&self) -> ::std::option::Option<&str> {
15 self.id.as_deref()
16 }
17 /// <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>
18 pub fn comment(&self) -> ::std::option::Option<&str> {
19 self.comment.as_deref()
20 }
21}
22impl UpdateHostedZoneCommentInput {
23 /// Creates a new builder-style object to manufacture [`UpdateHostedZoneCommentInput`](crate::operation::update_hosted_zone_comment::UpdateHostedZoneCommentInput).
24 pub fn builder() -> crate::operation::update_hosted_zone_comment::builders::UpdateHostedZoneCommentInputBuilder {
25 crate::operation::update_hosted_zone_comment::builders::UpdateHostedZoneCommentInputBuilder::default()
26 }
27}
28
29/// A builder for [`UpdateHostedZoneCommentInput`](crate::operation::update_hosted_zone_comment::UpdateHostedZoneCommentInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateHostedZoneCommentInputBuilder {
33 pub(crate) id: ::std::option::Option<::std::string::String>,
34 pub(crate) comment: ::std::option::Option<::std::string::String>,
35}
36impl UpdateHostedZoneCommentInputBuilder {
37 /// <p>The ID for the hosted zone that you want to update the comment for.</p>
38 /// This field is required.
39 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.id = ::std::option::Option::Some(input.into());
41 self
42 }
43 /// <p>The ID for the hosted zone that you want to update the comment for.</p>
44 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.id = input;
46 self
47 }
48 /// <p>The ID for the hosted zone that you want to update the comment for.</p>
49 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
50 &self.id
51 }
52 /// <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>
53 pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.comment = ::std::option::Option::Some(input.into());
55 self
56 }
57 /// <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>
58 pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.comment = input;
60 self
61 }
62 /// <p>The new comment for the hosted zone. If you don't specify a value for <code>Comment</code>, Amazon Route 53 deletes the existing value of the <code>Comment</code> element, if any.</p>
63 pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
64 &self.comment
65 }
66 /// Consumes the builder and constructs a [`UpdateHostedZoneCommentInput`](crate::operation::update_hosted_zone_comment::UpdateHostedZoneCommentInput).
67 pub fn build(
68 self,
69 ) -> ::std::result::Result<
70 crate::operation::update_hosted_zone_comment::UpdateHostedZoneCommentInput,
71 ::aws_smithy_types::error::operation::BuildError,
72 > {
73 ::std::result::Result::Ok(crate::operation::update_hosted_zone_comment::UpdateHostedZoneCommentInput {
74 id: self.id,
75 comment: self.comment,
76 })
77 }
78}