aws_sdk_transfer/operation/update_profile/
_update_profile_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 UpdateProfileInput {
6    /// <p>The identifier of the profile object that you are updating.</p>
7    pub profile_id: ::std::option::Option<::std::string::String>,
8    /// <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
9    pub certificate_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10}
11impl UpdateProfileInput {
12    /// <p>The identifier of the profile object that you are updating.</p>
13    pub fn profile_id(&self) -> ::std::option::Option<&str> {
14        self.profile_id.as_deref()
15    }
16    /// <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.certificate_ids.is_none()`.
19    pub fn certificate_ids(&self) -> &[::std::string::String] {
20        self.certificate_ids.as_deref().unwrap_or_default()
21    }
22}
23impl UpdateProfileInput {
24    /// Creates a new builder-style object to manufacture [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
25    pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
26        crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
27    }
28}
29
30/// A builder for [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct UpdateProfileInputBuilder {
34    pub(crate) profile_id: ::std::option::Option<::std::string::String>,
35    pub(crate) certificate_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36}
37impl UpdateProfileInputBuilder {
38    /// <p>The identifier of the profile object that you are updating.</p>
39    /// This field is required.
40    pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.profile_id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>The identifier of the profile object that you are updating.</p>
45    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46        self.profile_id = input;
47        self
48    }
49    /// <p>The identifier of the profile object that you are updating.</p>
50    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
51        &self.profile_id
52    }
53    /// Appends an item to `certificate_ids`.
54    ///
55    /// To override the contents of this collection use [`set_certificate_ids`](Self::set_certificate_ids).
56    ///
57    /// <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
58    pub fn certificate_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        let mut v = self.certificate_ids.unwrap_or_default();
60        v.push(input.into());
61        self.certificate_ids = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
65    pub fn set_certificate_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
66        self.certificate_ids = input;
67        self
68    }
69    /// <p>An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.</p>
70    pub fn get_certificate_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
71        &self.certificate_ids
72    }
73    /// Consumes the builder and constructs a [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
74    pub fn build(
75        self,
76    ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
77        ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
78            profile_id: self.profile_id,
79            certificate_ids: self.certificate_ids,
80        })
81    }
82}