aws_sdk_chimesdkvoice/operation/associate_phone_numbers_with_voice_connector_group/
_associate_phone_numbers_with_voice_connector_group_output.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 AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
6    /// <p>If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.</p>
7    pub phone_number_errors: ::std::option::Option<::std::vec::Vec<crate::types::PhoneNumberError>>,
8    _request_id: Option<String>,
9}
10impl AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
11    /// <p>If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phone_number_errors.is_none()`.
14    pub fn phone_number_errors(&self) -> &[crate::types::PhoneNumberError] {
15        self.phone_number_errors.as_deref().unwrap_or_default()
16    }
17}
18impl ::aws_types::request_id::RequestId for AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
19    fn request_id(&self) -> Option<&str> {
20        self._request_id.as_deref()
21    }
22}
23impl AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
24    /// Creates a new builder-style object to manufacture [`AssociatePhoneNumbersWithVoiceConnectorGroupOutput`](crate::operation::associate_phone_numbers_with_voice_connector_group::AssociatePhoneNumbersWithVoiceConnectorGroupOutput).
25    pub fn builder(
26    ) -> crate::operation::associate_phone_numbers_with_voice_connector_group::builders::AssociatePhoneNumbersWithVoiceConnectorGroupOutputBuilder
27    {
28        crate::operation::associate_phone_numbers_with_voice_connector_group::builders::AssociatePhoneNumbersWithVoiceConnectorGroupOutputBuilder::default()
29    }
30}
31
32/// A builder for [`AssociatePhoneNumbersWithVoiceConnectorGroupOutput`](crate::operation::associate_phone_numbers_with_voice_connector_group::AssociatePhoneNumbersWithVoiceConnectorGroupOutput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct AssociatePhoneNumbersWithVoiceConnectorGroupOutputBuilder {
36    pub(crate) phone_number_errors: ::std::option::Option<::std::vec::Vec<crate::types::PhoneNumberError>>,
37    _request_id: Option<String>,
38}
39impl AssociatePhoneNumbersWithVoiceConnectorGroupOutputBuilder {
40    /// Appends an item to `phone_number_errors`.
41    ///
42    /// To override the contents of this collection use [`set_phone_number_errors`](Self::set_phone_number_errors).
43    ///
44    /// <p>If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.</p>
45    pub fn phone_number_errors(mut self, input: crate::types::PhoneNumberError) -> Self {
46        let mut v = self.phone_number_errors.unwrap_or_default();
47        v.push(input);
48        self.phone_number_errors = ::std::option::Option::Some(v);
49        self
50    }
51    /// <p>If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.</p>
52    pub fn set_phone_number_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PhoneNumberError>>) -> Self {
53        self.phone_number_errors = input;
54        self
55    }
56    /// <p>If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.</p>
57    pub fn get_phone_number_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PhoneNumberError>> {
58        &self.phone_number_errors
59    }
60    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
61        self._request_id = Some(request_id.into());
62        self
63    }
64
65    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
66        self._request_id = request_id;
67        self
68    }
69    /// Consumes the builder and constructs a [`AssociatePhoneNumbersWithVoiceConnectorGroupOutput`](crate::operation::associate_phone_numbers_with_voice_connector_group::AssociatePhoneNumbersWithVoiceConnectorGroupOutput).
70    pub fn build(self) -> crate::operation::associate_phone_numbers_with_voice_connector_group::AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
71        crate::operation::associate_phone_numbers_with_voice_connector_group::AssociatePhoneNumbersWithVoiceConnectorGroupOutput {
72            phone_number_errors: self.phone_number_errors,
73            _request_id: self._request_id,
74        }
75    }
76}