aws-sdk-transfer 1.113.0

AWS SDK for AWS Transfer Family
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateHostKeyInput {
    /// <p>The identifier of the server that contains the host key that you are updating.</p>
    pub server_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the host key that you are updating.</p>
    pub host_key_id: ::std::option::Option<::std::string::String>,
    /// <p>An updated description for the host key.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateHostKeyInput {
    /// <p>The identifier of the server that contains the host key that you are updating.</p>
    pub fn server_id(&self) -> ::std::option::Option<&str> {
        self.server_id.as_deref()
    }
    /// <p>The identifier of the host key that you are updating.</p>
    pub fn host_key_id(&self) -> ::std::option::Option<&str> {
        self.host_key_id.as_deref()
    }
    /// <p>An updated description for the host key.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl UpdateHostKeyInput {
    /// Creates a new builder-style object to manufacture [`UpdateHostKeyInput`](crate::operation::update_host_key::UpdateHostKeyInput).
    pub fn builder() -> crate::operation::update_host_key::builders::UpdateHostKeyInputBuilder {
        crate::operation::update_host_key::builders::UpdateHostKeyInputBuilder::default()
    }
}

/// A builder for [`UpdateHostKeyInput`](crate::operation::update_host_key::UpdateHostKeyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateHostKeyInputBuilder {
    pub(crate) server_id: ::std::option::Option<::std::string::String>,
    pub(crate) host_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl UpdateHostKeyInputBuilder {
    /// <p>The identifier of the server that contains the host key that you are updating.</p>
    /// This field is required.
    pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.server_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the server that contains the host key that you are updating.</p>
    pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.server_id = input;
        self
    }
    /// <p>The identifier of the server that contains the host key that you are updating.</p>
    pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.server_id
    }
    /// <p>The identifier of the host key that you are updating.</p>
    /// This field is required.
    pub fn host_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.host_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the host key that you are updating.</p>
    pub fn set_host_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.host_key_id = input;
        self
    }
    /// <p>The identifier of the host key that you are updating.</p>
    pub fn get_host_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.host_key_id
    }
    /// <p>An updated description for the host key.</p>
    /// This field is required.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An updated description for the host key.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>An updated description for the host key.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`UpdateHostKeyInput`](crate::operation::update_host_key::UpdateHostKeyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_host_key::UpdateHostKeyInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_host_key::UpdateHostKeyInput {
            server_id: self.server_id,
            host_key_id: self.host_key_id,
            description: self.description,
        })
    }
}