Skip to main content

aws_sdk_resourcegroups/types/
_pending_resource.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A structure that identifies a resource that is currently pending addition to the group as a member. Adding a resource to a resource group happens asynchronously as a background task and this one isn't completed yet.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PendingResource {
7    /// <p>The Amazon resource name (ARN) of the resource that's in a pending state.</p>
8    pub resource_arn: ::std::option::Option<::std::string::String>,
9}
10impl PendingResource {
11    /// <p>The Amazon resource name (ARN) of the resource that's in a pending state.</p>
12    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
13        self.resource_arn.as_deref()
14    }
15}
16impl PendingResource {
17    /// Creates a new builder-style object to manufacture [`PendingResource`](crate::types::PendingResource).
18    pub fn builder() -> crate::types::builders::PendingResourceBuilder {
19        crate::types::builders::PendingResourceBuilder::default()
20    }
21}
22
23/// A builder for [`PendingResource`](crate::types::PendingResource).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct PendingResourceBuilder {
27    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
28}
29impl PendingResourceBuilder {
30    /// <p>The Amazon resource name (ARN) of the resource that's in a pending state.</p>
31    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32        self.resource_arn = ::std::option::Option::Some(input.into());
33        self
34    }
35    /// <p>The Amazon resource name (ARN) of the resource that's in a pending state.</p>
36    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37        self.resource_arn = input;
38        self
39    }
40    /// <p>The Amazon resource name (ARN) of the resource that's in a pending state.</p>
41    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
42        &self.resource_arn
43    }
44    /// Consumes the builder and constructs a [`PendingResource`](crate::types::PendingResource).
45    pub fn build(self) -> crate::types::PendingResource {
46        crate::types::PendingResource {
47            resource_arn: self.resource_arn,
48        }
49    }
50}