fn check_if_phone_number_is_opted_out(
        &self,
        input: CheckIfPhoneNumberIsOptedOutInput,
    ) -> RusotoFuture<CheckIfPhoneNumberIsOptedOutResponse, CheckIfPhoneNumberIsOptedOutError> {
        let mut request = SignedRequest::new("POST", "sns", &self.region, "/");
        let mut params = Params::new();

        params.put("Action", "CheckIfPhoneNumberIsOptedOut");
        params.put("Version", "2010-03-31");
        CheckIfPhoneNumberIsOptedOutInputSerializer::serialize(&mut params, "", &input);
        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
        request.set_content_type("application/x-www-form-urlencoded".to_owned());

        self.client.sign_and_dispatch(request, |response| {
            if !response.status.is_success() {
                return Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CheckIfPhoneNumberIsOptedOutError::from_response(response))
                }));
            }

            Box::new(response.buffer().from_err().and_then(move |response| {
                let result;

                if response.body.is_empty() {
                    result = CheckIfPhoneNumberIsOptedOutResponse::default();
                } else {
                    let reader = EventReader::new_with_config(
                        response.body.as_ref(),
                        ParserConfig::new().trim_whitespace(true),
                    );
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = peek_at_name(&mut stack)?;
                    start_element(&actual_tag_name, &mut stack)?;
                    result = CheckIfPhoneNumberIsOptedOutResponseDeserializer::deserialize(
                        "CheckIfPhoneNumberIsOptedOutResult",
                        &mut stack,
                    )?;
                    skip_tree(&mut stack);
                    end_element(&actual_tag_name, &mut stack)?;
                }
                // parse non-payload
                Ok(result)
            }))
        })
    }
/// <p>Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.</p> <p>To resume sending messages, you can opt in the number by using the <code>OptInPhoneNumber</code> action.</p>
Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out. To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.
Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account . You cannot send SMS messages to a number that is opted out . To resume sending messages you can opt in the number by using the OptInPhoneNumber action .
fn check_if_phone_number_is_opted_out(
        &self,
        input: CheckIfPhoneNumberIsOptedOutInput,
    ) -> RusotoFuture<CheckIfPhoneNumberIsOptedOutResponse, CheckIfPhoneNumberIsOptedOutError> {
        let mut request = SignedRequest::new("POST", "sns", &self.region, "/");
        let mut params = Params::new();
        params.put("Action", "CheckIfPhoneNumberIsOptedOut");
        params.put("Version", "2010-03-31");
        CheckIfPhoneNumberIsOptedOutInputSerializer::serialize(&mut params, "", &input);
        request.set_payload(Some(serde_urlencoded::to_string(&params).unwrap()));
        request.set_content_type("application/x-www-form-urlencoded".to_owned());
        self.client.sign_and_dispatch(request, |response| {
            if !response.status.is_success() {
                return Box::new(response.buffer().from_err().and_then(|response| {
                    Err(CheckIfPhoneNumberIsOptedOutError::from_response(response))
                }));
            }
            Box::new(response.buffer().from_err().and_then(move |response| {
                let result;
                if response.body.is_empty() {
                    result = CheckIfPhoneNumberIsOptedOutResponse::default();
                } else {
                    let reader = EventReader::new_with_config(
                        response.body.as_ref(),
                        ParserConfig::new().trim_whitespace(true),
                    );
                    let mut stack = XmlResponse::new(reader.into_iter().peekable());
                    let _start_document = stack.next();
                    let actual_tag_name = peek_at_name(&mut stack)?;
                    start_element(&actual_tag_name, &mut stack)?;
                    result = CheckIfPhoneNumberIsOptedOutResponseDeserializer::deserialize(
                        "CheckIfPhoneNumberIsOptedOutResult",
                        &mut stack,
                    )?;
                    skip_tree(&mut stack);
                    end_element(&actual_tag_name, &mut stack)?;
                }
                // parse non-payload
                Ok(result)
            }))
        })
    }
fn check_if_phone_number_is_opted_out ( & self , input : CheckIfPhoneNumberIsOptedOutInput , ) -> RusotoFuture < CheckIfPhoneNumberIsOptedOutResponse , CheckIfPhoneNumberIsOptedOutError > { let mut request = SignedRequest :: new ( " " , " " , & self . region , " " ) ; let mut params = Params :: new ( ) ; params . put ( " " , " " ) ; params . put ( " " , " " ) ; CheckIfPhoneNumberIsOptedOutInputSerializer :: serialize ( & mut params , " " , & input ) ; request . set_payload ( Some ( serde_urlencoded :: to_string ( & params ) . unwrap ( ) ) ) ; request . set_content_type ( " " . to_owned ( ) ) ; self . client . sign_and_dispatch ( request , | response | { if ! response . status . is_success ( ) { return Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( CheckIfPhoneNumberIsOptedOutError :: from_response ( response ) ) } ) ) ; } Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( move | response | { let result ; if response . body . is_empty ( ) { result = CheckIfPhoneNumberIsOptedOutResponse :: default ( ) ; } else { let reader = EventReader :: new_with_config ( response . body . as_ref ( ) , ParserConfig :: new ( ) . trim_whitespace ( true ) , ) ; let mut stack = XmlResponse :: new ( reader . into_iter ( ) . peekable ( ) ) ; let _start_document = stack . next ( ) ; let actual_tag_name = peek_at_name ( & mut stack ) ? ; start_element ( & actual_tag_name , & mut stack ) ? ; result = CheckIfPhoneNumberIsOptedOutResponseDeserializer :: deserialize ( " " , & mut stack , ) ? ; skip_tree ( & mut stack ) ; end_element ( & actual_tag_name , & mut stack ) ? ; } // parse non-payload Ok ( result ) } ) ) } ) }
<p>Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account.
<p > Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account .
&self
input
CheckIfPhoneNumberIsOptedOutInput