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