aws_sdk_securityhub/operation/describe_hub/
_describe_hub_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeHubInput {
6    /// <p>The ARN of the Hub resource to retrieve.</p>
7    pub hub_arn: ::std::option::Option<::std::string::String>,
8}
9impl DescribeHubInput {
10    /// <p>The ARN of the Hub resource to retrieve.</p>
11    pub fn hub_arn(&self) -> ::std::option::Option<&str> {
12        self.hub_arn.as_deref()
13    }
14}
15impl DescribeHubInput {
16    /// Creates a new builder-style object to manufacture [`DescribeHubInput`](crate::operation::describe_hub::DescribeHubInput).
17    pub fn builder() -> crate::operation::describe_hub::builders::DescribeHubInputBuilder {
18        crate::operation::describe_hub::builders::DescribeHubInputBuilder::default()
19    }
20}
21
22/// A builder for [`DescribeHubInput`](crate::operation::describe_hub::DescribeHubInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct DescribeHubInputBuilder {
26    pub(crate) hub_arn: ::std::option::Option<::std::string::String>,
27}
28impl DescribeHubInputBuilder {
29    /// <p>The ARN of the Hub resource to retrieve.</p>
30    pub fn hub_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
31        self.hub_arn = ::std::option::Option::Some(input.into());
32        self
33    }
34    /// <p>The ARN of the Hub resource to retrieve.</p>
35    pub fn set_hub_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
36        self.hub_arn = input;
37        self
38    }
39    /// <p>The ARN of the Hub resource to retrieve.</p>
40    pub fn get_hub_arn(&self) -> &::std::option::Option<::std::string::String> {
41        &self.hub_arn
42    }
43    /// Consumes the builder and constructs a [`DescribeHubInput`](crate::operation::describe_hub::DescribeHubInput).
44    pub fn build(self) -> ::std::result::Result<crate::operation::describe_hub::DescribeHubInput, ::aws_smithy_types::error::operation::BuildError> {
45        ::std::result::Result::Ok(crate::operation::describe_hub::DescribeHubInput { hub_arn: self.hub_arn })
46    }
47}