aws_sdk_mgn/operation/associate_applications/
_associate_applications_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 AssociateApplicationsInput {
6    /// <p>Wave ID.</p>
7    pub wave_id: ::std::option::Option<::std::string::String>,
8    /// <p>Application IDs list.</p>
9    pub application_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>Account ID.</p>
11    pub account_id: ::std::option::Option<::std::string::String>,
12}
13impl AssociateApplicationsInput {
14    /// <p>Wave ID.</p>
15    pub fn wave_id(&self) -> ::std::option::Option<&str> {
16        self.wave_id.as_deref()
17    }
18    /// <p>Application IDs list.</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 `.application_ids.is_none()`.
21    pub fn application_ids(&self) -> &[::std::string::String] {
22        self.application_ids.as_deref().unwrap_or_default()
23    }
24    /// <p>Account ID.</p>
25    pub fn account_id(&self) -> ::std::option::Option<&str> {
26        self.account_id.as_deref()
27    }
28}
29impl AssociateApplicationsInput {
30    /// Creates a new builder-style object to manufacture [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
31    pub fn builder() -> crate::operation::associate_applications::builders::AssociateApplicationsInputBuilder {
32        crate::operation::associate_applications::builders::AssociateApplicationsInputBuilder::default()
33    }
34}
35
36/// A builder for [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct AssociateApplicationsInputBuilder {
40    pub(crate) wave_id: ::std::option::Option<::std::string::String>,
41    pub(crate) application_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42    pub(crate) account_id: ::std::option::Option<::std::string::String>,
43}
44impl AssociateApplicationsInputBuilder {
45    /// <p>Wave ID.</p>
46    /// This field is required.
47    pub fn wave_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.wave_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>Wave ID.</p>
52    pub fn set_wave_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.wave_id = input;
54        self
55    }
56    /// <p>Wave ID.</p>
57    pub fn get_wave_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.wave_id
59    }
60    /// Appends an item to `application_ids`.
61    ///
62    /// To override the contents of this collection use [`set_application_ids`](Self::set_application_ids).
63    ///
64    /// <p>Application IDs list.</p>
65    pub fn application_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        let mut v = self.application_ids.unwrap_or_default();
67        v.push(input.into());
68        self.application_ids = ::std::option::Option::Some(v);
69        self
70    }
71    /// <p>Application IDs list.</p>
72    pub fn set_application_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
73        self.application_ids = input;
74        self
75    }
76    /// <p>Application IDs list.</p>
77    pub fn get_application_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
78        &self.application_ids
79    }
80    /// <p>Account ID.</p>
81    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.account_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>Account ID.</p>
86    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.account_id = input;
88        self
89    }
90    /// <p>Account ID.</p>
91    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.account_id
93    }
94    /// Consumes the builder and constructs a [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
95    pub fn build(
96        self,
97    ) -> ::std::result::Result<crate::operation::associate_applications::AssociateApplicationsInput, ::aws_smithy_types::error::operation::BuildError>
98    {
99        ::std::result::Result::Ok(crate::operation::associate_applications::AssociateApplicationsInput {
100            wave_id: self.wave_id,
101            application_ids: self.application_ids,
102            account_id: self.account_id,
103        })
104    }
105}