aws-sdk-iam 1.109.0

AWS SDK for AWS Identity and Access Management
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 RejectDelegationRequestInput {
    /// <p>The unique identifier of the delegation request to reject.</p>
    pub delegation_request_id: ::std::option::Option<::std::string::String>,
    /// <p>Optional notes explaining the reason for rejecting the delegation request.</p>
    pub notes: ::std::option::Option<::std::string::String>,
}
impl RejectDelegationRequestInput {
    /// <p>The unique identifier of the delegation request to reject.</p>
    pub fn delegation_request_id(&self) -> ::std::option::Option<&str> {
        self.delegation_request_id.as_deref()
    }
    /// <p>Optional notes explaining the reason for rejecting the delegation request.</p>
    pub fn notes(&self) -> ::std::option::Option<&str> {
        self.notes.as_deref()
    }
}
impl RejectDelegationRequestInput {
    /// Creates a new builder-style object to manufacture [`RejectDelegationRequestInput`](crate::operation::reject_delegation_request::RejectDelegationRequestInput).
    pub fn builder() -> crate::operation::reject_delegation_request::builders::RejectDelegationRequestInputBuilder {
        crate::operation::reject_delegation_request::builders::RejectDelegationRequestInputBuilder::default()
    }
}

/// A builder for [`RejectDelegationRequestInput`](crate::operation::reject_delegation_request::RejectDelegationRequestInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RejectDelegationRequestInputBuilder {
    pub(crate) delegation_request_id: ::std::option::Option<::std::string::String>,
    pub(crate) notes: ::std::option::Option<::std::string::String>,
}
impl RejectDelegationRequestInputBuilder {
    /// <p>The unique identifier of the delegation request to reject.</p>
    /// This field is required.
    pub fn delegation_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.delegation_request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the delegation request to reject.</p>
    pub fn set_delegation_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.delegation_request_id = input;
        self
    }
    /// <p>The unique identifier of the delegation request to reject.</p>
    pub fn get_delegation_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.delegation_request_id
    }
    /// <p>Optional notes explaining the reason for rejecting the delegation request.</p>
    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notes = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional notes explaining the reason for rejecting the delegation request.</p>
    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notes = input;
        self
    }
    /// <p>Optional notes explaining the reason for rejecting the delegation request.</p>
    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
        &self.notes
    }
    /// Consumes the builder and constructs a [`RejectDelegationRequestInput`](crate::operation::reject_delegation_request::RejectDelegationRequestInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::reject_delegation_request::RejectDelegationRequestInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::reject_delegation_request::RejectDelegationRequestInput {
            delegation_request_id: self.delegation_request_id,
            notes: self.notes,
        })
    }
}