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 GetDelegationRequestOutput {
    /// <p>The delegation request object containing all details about the request.</p>
    pub delegation_request: ::std::option::Option<crate::types::DelegationRequest>,
    /// <p>The status of the permission check for the delegation request.</p>
    /// <p>This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values:</p>
    /// <ul>
    /// <li>
    /// <p><code>IN_PROGRESS</code> : The permission check process has started.</p></li>
    /// <li>
    /// <p><code>COMPLETED</code> : The permission check process has completed. The <code>PermissionCheckResult</code> will include the result.</p></li>
    /// <li>
    /// <p><code>FAILED</code> : The permission check process has failed.</p></li>
    /// </ul>
    pub permission_check_status: ::std::option::Option<crate::types::PermissionCheckStatusType>,
    /// <p>The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result.</p>
    /// <ul>
    /// <li>
    /// <p><code>ALLOWED</code> : The caller has sufficient permissions cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>DENIED</code> : The caller does not have sufficient permissions to cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>UNSURE</code> : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions.</p></li>
    /// </ul>
    pub permission_check_result: ::std::option::Option<crate::types::PermissionCheckResultType>,
    _request_id: Option<String>,
}
impl GetDelegationRequestOutput {
    /// <p>The delegation request object containing all details about the request.</p>
    pub fn delegation_request(&self) -> ::std::option::Option<&crate::types::DelegationRequest> {
        self.delegation_request.as_ref()
    }
    /// <p>The status of the permission check for the delegation request.</p>
    /// <p>This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values:</p>
    /// <ul>
    /// <li>
    /// <p><code>IN_PROGRESS</code> : The permission check process has started.</p></li>
    /// <li>
    /// <p><code>COMPLETED</code> : The permission check process has completed. The <code>PermissionCheckResult</code> will include the result.</p></li>
    /// <li>
    /// <p><code>FAILED</code> : The permission check process has failed.</p></li>
    /// </ul>
    pub fn permission_check_status(&self) -> ::std::option::Option<&crate::types::PermissionCheckStatusType> {
        self.permission_check_status.as_ref()
    }
    /// <p>The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result.</p>
    /// <ul>
    /// <li>
    /// <p><code>ALLOWED</code> : The caller has sufficient permissions cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>DENIED</code> : The caller does not have sufficient permissions to cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>UNSURE</code> : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions.</p></li>
    /// </ul>
    pub fn permission_check_result(&self) -> ::std::option::Option<&crate::types::PermissionCheckResultType> {
        self.permission_check_result.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetDelegationRequestOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetDelegationRequestOutput {
    /// Creates a new builder-style object to manufacture [`GetDelegationRequestOutput`](crate::operation::get_delegation_request::GetDelegationRequestOutput).
    pub fn builder() -> crate::operation::get_delegation_request::builders::GetDelegationRequestOutputBuilder {
        crate::operation::get_delegation_request::builders::GetDelegationRequestOutputBuilder::default()
    }
}

/// A builder for [`GetDelegationRequestOutput`](crate::operation::get_delegation_request::GetDelegationRequestOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDelegationRequestOutputBuilder {
    pub(crate) delegation_request: ::std::option::Option<crate::types::DelegationRequest>,
    pub(crate) permission_check_status: ::std::option::Option<crate::types::PermissionCheckStatusType>,
    pub(crate) permission_check_result: ::std::option::Option<crate::types::PermissionCheckResultType>,
    _request_id: Option<String>,
}
impl GetDelegationRequestOutputBuilder {
    /// <p>The delegation request object containing all details about the request.</p>
    pub fn delegation_request(mut self, input: crate::types::DelegationRequest) -> Self {
        self.delegation_request = ::std::option::Option::Some(input);
        self
    }
    /// <p>The delegation request object containing all details about the request.</p>
    pub fn set_delegation_request(mut self, input: ::std::option::Option<crate::types::DelegationRequest>) -> Self {
        self.delegation_request = input;
        self
    }
    /// <p>The delegation request object containing all details about the request.</p>
    pub fn get_delegation_request(&self) -> &::std::option::Option<crate::types::DelegationRequest> {
        &self.delegation_request
    }
    /// <p>The status of the permission check for the delegation request.</p>
    /// <p>This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values:</p>
    /// <ul>
    /// <li>
    /// <p><code>IN_PROGRESS</code> : The permission check process has started.</p></li>
    /// <li>
    /// <p><code>COMPLETED</code> : The permission check process has completed. The <code>PermissionCheckResult</code> will include the result.</p></li>
    /// <li>
    /// <p><code>FAILED</code> : The permission check process has failed.</p></li>
    /// </ul>
    pub fn permission_check_status(mut self, input: crate::types::PermissionCheckStatusType) -> Self {
        self.permission_check_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the permission check for the delegation request.</p>
    /// <p>This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values:</p>
    /// <ul>
    /// <li>
    /// <p><code>IN_PROGRESS</code> : The permission check process has started.</p></li>
    /// <li>
    /// <p><code>COMPLETED</code> : The permission check process has completed. The <code>PermissionCheckResult</code> will include the result.</p></li>
    /// <li>
    /// <p><code>FAILED</code> : The permission check process has failed.</p></li>
    /// </ul>
    pub fn set_permission_check_status(mut self, input: ::std::option::Option<crate::types::PermissionCheckStatusType>) -> Self {
        self.permission_check_status = input;
        self
    }
    /// <p>The status of the permission check for the delegation request.</p>
    /// <p>This value indicates the status of the process to check whether the caller has sufficient permissions to cover the requested actions in the delegation request. Since this is an asynchronous process, there are three potential values:</p>
    /// <ul>
    /// <li>
    /// <p><code>IN_PROGRESS</code> : The permission check process has started.</p></li>
    /// <li>
    /// <p><code>COMPLETED</code> : The permission check process has completed. The <code>PermissionCheckResult</code> will include the result.</p></li>
    /// <li>
    /// <p><code>FAILED</code> : The permission check process has failed.</p></li>
    /// </ul>
    pub fn get_permission_check_status(&self) -> &::std::option::Option<crate::types::PermissionCheckStatusType> {
        &self.permission_check_status
    }
    /// <p>The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result.</p>
    /// <ul>
    /// <li>
    /// <p><code>ALLOWED</code> : The caller has sufficient permissions cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>DENIED</code> : The caller does not have sufficient permissions to cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>UNSURE</code> : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions.</p></li>
    /// </ul>
    pub fn permission_check_result(mut self, input: crate::types::PermissionCheckResultType) -> Self {
        self.permission_check_result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result.</p>
    /// <ul>
    /// <li>
    /// <p><code>ALLOWED</code> : The caller has sufficient permissions cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>DENIED</code> : The caller does not have sufficient permissions to cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>UNSURE</code> : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions.</p></li>
    /// </ul>
    pub fn set_permission_check_result(mut self, input: ::std::option::Option<crate::types::PermissionCheckResultType>) -> Self {
        self.permission_check_result = input;
        self
    }
    /// <p>The result of the permission check, indicating whether the caller has sufficient permissions to cover the requested permissions. This is an approximate result.</p>
    /// <ul>
    /// <li>
    /// <p><code>ALLOWED</code> : The caller has sufficient permissions cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>DENIED</code> : The caller does not have sufficient permissions to cover all the requested permissions.</p></li>
    /// <li>
    /// <p><code>UNSURE</code> : It is not possible to determine whether the caller has all the permissions needed. This output is most likely for cases when the caller has permissions with conditions.</p></li>
    /// </ul>
    pub fn get_permission_check_result(&self) -> &::std::option::Option<crate::types::PermissionCheckResultType> {
        &self.permission_check_result
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetDelegationRequestOutput`](crate::operation::get_delegation_request::GetDelegationRequestOutput).
    pub fn build(self) -> crate::operation::get_delegation_request::GetDelegationRequestOutput {
        crate::operation::get_delegation_request::GetDelegationRequestOutput {
            delegation_request: self.delegation_request,
            permission_check_status: self.permission_check_status,
            permission_check_result: self.permission_check_result,
            _request_id: self._request_id,
        }
    }
}