aws_sdk_datasync/operation/generate_recommendations/
_generate_recommendations_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 GenerateRecommendationsInput {
6    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that collects information about your on-premises storage system.</p>
7    pub discovery_job_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Specifies the universally unique identifiers (UUIDs) of the resources in your storage system that you want recommendations on.</p>
9    pub resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>Specifies the type of resource in your storage system that you want recommendations on.</p>
11    pub resource_type: ::std::option::Option<crate::types::DiscoveryResourceType>,
12}
13impl GenerateRecommendationsInput {
14    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that collects information about your on-premises storage system.</p>
15    pub fn discovery_job_arn(&self) -> ::std::option::Option<&str> {
16        self.discovery_job_arn.as_deref()
17    }
18    /// <p>Specifies the universally unique identifiers (UUIDs) of the resources in your storage system that you want recommendations on.</p>
19    ///
20    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_ids.is_none()`.
21    pub fn resource_ids(&self) -> &[::std::string::String] {
22        self.resource_ids.as_deref().unwrap_or_default()
23    }
24    /// <p>Specifies the type of resource in your storage system that you want recommendations on.</p>
25    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::DiscoveryResourceType> {
26        self.resource_type.as_ref()
27    }
28}
29impl GenerateRecommendationsInput {
30    /// Creates a new builder-style object to manufacture [`GenerateRecommendationsInput`](crate::operation::generate_recommendations::GenerateRecommendationsInput).
31    pub fn builder() -> crate::operation::generate_recommendations::builders::GenerateRecommendationsInputBuilder {
32        crate::operation::generate_recommendations::builders::GenerateRecommendationsInputBuilder::default()
33    }
34}
35
36/// A builder for [`GenerateRecommendationsInput`](crate::operation::generate_recommendations::GenerateRecommendationsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct GenerateRecommendationsInputBuilder {
40    pub(crate) discovery_job_arn: ::std::option::Option<::std::string::String>,
41    pub(crate) resource_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42    pub(crate) resource_type: ::std::option::Option<crate::types::DiscoveryResourceType>,
43}
44impl GenerateRecommendationsInputBuilder {
45    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that collects information about your on-premises storage system.</p>
46    /// This field is required.
47    pub fn discovery_job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.discovery_job_arn = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that collects information about your on-premises storage system.</p>
52    pub fn set_discovery_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.discovery_job_arn = input;
54        self
55    }
56    /// <p>Specifies the Amazon Resource Name (ARN) of the discovery job that collects information about your on-premises storage system.</p>
57    pub fn get_discovery_job_arn(&self) -> &::std::option::Option<::std::string::String> {
58        &self.discovery_job_arn
59    }
60    /// Appends an item to `resource_ids`.
61    ///
62    /// To override the contents of this collection use [`set_resource_ids`](Self::set_resource_ids).
63    ///
64    /// <p>Specifies the universally unique identifiers (UUIDs) of the resources in your storage system that you want recommendations on.</p>
65    pub fn resource_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        let mut v = self.resource_ids.unwrap_or_default();
67        v.push(input.into());
68        self.resource_ids = ::std::option::Option::Some(v);
69        self
70    }
71    /// <p>Specifies the universally unique identifiers (UUIDs) of the resources in your storage system that you want recommendations on.</p>
72    pub fn set_resource_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
73        self.resource_ids = input;
74        self
75    }
76    /// <p>Specifies the universally unique identifiers (UUIDs) of the resources in your storage system that you want recommendations on.</p>
77    pub fn get_resource_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
78        &self.resource_ids
79    }
80    /// <p>Specifies the type of resource in your storage system that you want recommendations on.</p>
81    /// This field is required.
82    pub fn resource_type(mut self, input: crate::types::DiscoveryResourceType) -> Self {
83        self.resource_type = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>Specifies the type of resource in your storage system that you want recommendations on.</p>
87    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::DiscoveryResourceType>) -> Self {
88        self.resource_type = input;
89        self
90    }
91    /// <p>Specifies the type of resource in your storage system that you want recommendations on.</p>
92    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::DiscoveryResourceType> {
93        &self.resource_type
94    }
95    /// Consumes the builder and constructs a [`GenerateRecommendationsInput`](crate::operation::generate_recommendations::GenerateRecommendationsInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<
99        crate::operation::generate_recommendations::GenerateRecommendationsInput,
100        ::aws_smithy_types::error::operation::BuildError,
101    > {
102        ::std::result::Result::Ok(crate::operation::generate_recommendations::GenerateRecommendationsInput {
103            discovery_job_arn: self.discovery_job_arn,
104            resource_ids: self.resource_ids,
105            resource_type: self.resource_type,
106        })
107    }
108}