aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
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 GetEffectivePoliciesInput {
    /// <p>The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).</p>
    pub principal: ::std::option::Option<::std::string::String>,
    /// <p>The Cognito identity pool ID.</p>
    pub cognito_identity_pool_id: ::std::option::Option<::std::string::String>,
    /// <p>The thing name.</p>
    pub thing_name: ::std::option::Option<::std::string::String>,
}
impl GetEffectivePoliciesInput {
    /// <p>The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).</p>
    pub fn principal(&self) -> ::std::option::Option<&str> {
        self.principal.as_deref()
    }
    /// <p>The Cognito identity pool ID.</p>
    pub fn cognito_identity_pool_id(&self) -> ::std::option::Option<&str> {
        self.cognito_identity_pool_id.as_deref()
    }
    /// <p>The thing name.</p>
    pub fn thing_name(&self) -> ::std::option::Option<&str> {
        self.thing_name.as_deref()
    }
}
impl GetEffectivePoliciesInput {
    /// Creates a new builder-style object to manufacture [`GetEffectivePoliciesInput`](crate::operation::get_effective_policies::GetEffectivePoliciesInput).
    pub fn builder() -> crate::operation::get_effective_policies::builders::GetEffectivePoliciesInputBuilder {
        crate::operation::get_effective_policies::builders::GetEffectivePoliciesInputBuilder::default()
    }
}

/// A builder for [`GetEffectivePoliciesInput`](crate::operation::get_effective_policies::GetEffectivePoliciesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetEffectivePoliciesInputBuilder {
    pub(crate) principal: ::std::option::Option<::std::string::String>,
    pub(crate) cognito_identity_pool_id: ::std::option::Option<::std::string::String>,
    pub(crate) thing_name: ::std::option::Option<::std::string::String>,
}
impl GetEffectivePoliciesInputBuilder {
    /// <p>The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).</p>
    pub fn principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.principal = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).</p>
    pub fn set_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.principal = input;
        self
    }
    /// <p>The principal. Valid principals are CertificateArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:cert/<i>certificateId</i>), thingGroupArn (arn:aws:iot:<i>region</i>:<i>accountId</i>:thinggroup/<i>groupName</i>) and CognitoId (<i>region</i>:<i>id</i>).</p>
    pub fn get_principal(&self) -> &::std::option::Option<::std::string::String> {
        &self.principal
    }
    /// <p>The Cognito identity pool ID.</p>
    pub fn cognito_identity_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cognito_identity_pool_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Cognito identity pool ID.</p>
    pub fn set_cognito_identity_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cognito_identity_pool_id = input;
        self
    }
    /// <p>The Cognito identity pool ID.</p>
    pub fn get_cognito_identity_pool_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.cognito_identity_pool_id
    }
    /// <p>The thing name.</p>
    pub fn thing_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.thing_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The thing name.</p>
    pub fn set_thing_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.thing_name = input;
        self
    }
    /// <p>The thing name.</p>
    pub fn get_thing_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.thing_name
    }
    /// Consumes the builder and constructs a [`GetEffectivePoliciesInput`](crate::operation::get_effective_policies::GetEffectivePoliciesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_effective_policies::GetEffectivePoliciesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_effective_policies::GetEffectivePoliciesInput {
            principal: self.principal,
            cognito_identity_pool_id: self.cognito_identity_pool_id,
            thing_name: self.thing_name,
        })
    }
}