fn sample_channel_data(
        &self,
        input: SampleChannelDataRequest,
    ) -> RusotoFuture<SampleChannelDataResponse, SampleChannelDataError> {
        let request_uri = format!(
            "/channels/{channel_name}/sample",
            channel_name = input.channel_name
        );

        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());

        let mut params = Params::new();
        if let Some(ref x) = input.end_time {
            params.put("endTime", x);
        }
        if let Some(ref x) = input.max_messages {
            params.put("maxMessages", x);
        }
        if let Some(ref x) = input.start_time {
            params.put("startTime", x);
        }
        request.set_params(params);

        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }

                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<SampleChannelDataResponse>(&body).unwrap();

                    result
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(SampleChannelDataError::from_response(response))),
                )
            }
        })
    }
/// <p>Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.</p>
Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.
Retrieves a sample of messages from the specified channel ingested during the specified timeframe . Up to 10 messages can be retrieved .
fn sample_channel_data(
        &self,
        input: SampleChannelDataRequest,
    ) -> RusotoFuture<SampleChannelDataResponse, SampleChannelDataError> {
        let request_uri = format!(
            "/channels/{channel_name}/sample",
            channel_name = input.channel_name
        );
        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        let mut params = Params::new();
        if let Some(ref x) = input.end_time {
            params.put("endTime", x);
        }
        if let Some(ref x) = input.max_messages {
            params.put("maxMessages", x);
        }
        if let Some(ref x) = input.start_time {
            params.put("startTime", x);
        }
        request.set_params(params);
        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }
                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<SampleChannelDataResponse>(&body).unwrap();
                    result
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(SampleChannelDataError::from_response(response))),
                )
            }
        })
    }
fn sample_channel_data ( & self , input : SampleChannelDataRequest , ) -> RusotoFuture < SampleChannelDataResponse , SampleChannelDataError > { let request_uri = format ! ( " " channel_name input channel_name ) ; let mut request = SignedRequest :: new ( " " , " " , & self . region , & request_uri ) ; request . set_content_type ( " " . to_owned ( ) ) ; let mut params = Params :: new ( ) ; if let Some ( ref x ) = input . end_time { params . put ( " " , x ) ; } if let Some ( ref x ) = input . max_messages { params . put ( " " , x ) ; } if let Some ( ref x ) = input . start_time { params . put ( " " , x ) ; } request . set_params ( params ) ; self . client . sign_and_dispatch ( request , | response | { if response . status . is_success ( ) { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body == b" " || body . is_empty ( ) { body = b" " . to_vec ( ) ; } debug ! ( " " body ) ; debug ! ( " " response status ) ; let result = serde_json :: from_slice :: < SampleChannelDataResponse > ( & body ) . unwrap ( ) ; result } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | Err ( SampleChannelDataError :: from_response ( response ) ) ) , ) } } ) }
<p>Retrieves a sample of messages from the specified channel ingested during the specified timeframe.
<p > Retrieves a sample of messages from the specified channel ingested during the specified timeframe .
&self
input
SampleChannelDataRequest
&self
input
SampleChannelDataRequest