Struct aws_sdk_iot::operation::ListViolationEvents
source · pub struct ListViolationEvents { /* private fields */ }
Expand description
Operation shape for ListViolationEvents
.
This is usually constructed for you using the the fluent builder returned by
list_violation_events
.
See crate::client::fluent_builders::ListViolationEvents
for more details about the operation.
Implementations§
source§impl ListViolationEvents
impl ListViolationEvents
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ListViolationEventsInput
.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ListViolationEvents
operation.
Examples found in repository?
src/input.rs (line 34925)
34763 34764 34765 34766 34767 34768 34769 34770 34771 34772 34773 34774 34775 34776 34777 34778 34779 34780 34781 34782 34783 34784 34785 34786 34787 34788 34789 34790 34791 34792 34793 34794 34795 34796 34797 34798 34799 34800 34801 34802 34803 34804 34805 34806 34807 34808 34809 34810 34811 34812 34813 34814 34815 34816 34817 34818 34819 34820 34821 34822 34823 34824 34825 34826 34827 34828 34829 34830 34831 34832 34833 34834 34835 34836 34837 34838 34839 34840 34841 34842 34843 34844 34845 34846 34847 34848 34849 34850 34851 34852 34853 34854 34855 34856 34857 34858 34859 34860 34861 34862 34863 34864 34865 34866 34867 34868 34869 34870 34871 34872 34873 34874 34875 34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 34887 34888 34889 34890 34891 34892 34893 34894 34895 34896 34897 34898 34899 34900 34901 34902 34903 34904 34905 34906 34907 34908 34909 34910 34911 34912 34913 34914 34915 34916 34917 34918 34919 34920 34921 34922 34923 34924 34925 34926 34927 34928 34929 34930 34931 34932 34933
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListViolationEvents,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListViolationEventsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/violation-events").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListViolationEventsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_311 = &_input.start_time;
let inner_311 = inner_311.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"start_time",
"cannot be empty or unset",
)
})?;
query.push_kv(
"startTime",
&aws_smithy_http::query::fmt_timestamp(
inner_311,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
let inner_312 = &_input.end_time;
let inner_312 = inner_312.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"end_time",
"cannot be empty or unset",
)
})?;
query.push_kv(
"endTime",
&aws_smithy_http::query::fmt_timestamp(
inner_312,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
if let Some(inner_313) = &_input.thing_name {
{
query.push_kv("thingName", &aws_smithy_http::query::fmt_string(&inner_313));
}
}
if let Some(inner_314) = &_input.security_profile_name {
{
query.push_kv(
"securityProfileName",
&aws_smithy_http::query::fmt_string(&inner_314),
);
}
}
if let Some(inner_315) = &_input.behavior_criteria_type {
{
query.push_kv(
"behaviorCriteriaType",
&aws_smithy_http::query::fmt_string(&inner_315),
);
}
}
if let Some(inner_316) = &_input.list_suppressed_alerts {
if *inner_316 {
query.push_kv(
"listSuppressedAlerts",
aws_smithy_types::primitive::Encoder::from(*inner_316).encode(),
);
}
}
if let Some(inner_317) = &_input.verification_state {
{
query.push_kv(
"verificationState",
&aws_smithy_http::query::fmt_string(&inner_317),
);
}
}
if let Some(inner_318) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_318));
}
}
if let Some(inner_319) = &_input.max_results {
if *inner_319 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_319).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListViolationEventsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListViolationEvents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListViolationEvents",
"iot",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
Trait Implementations§
source§impl Clone for ListViolationEvents
impl Clone for ListViolationEvents
source§fn clone(&self) -> ListViolationEvents
fn clone(&self) -> ListViolationEvents
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ListViolationEvents
impl Debug for ListViolationEvents
source§impl Default for ListViolationEvents
impl Default for ListViolationEvents
source§fn default() -> ListViolationEvents
fn default() -> ListViolationEvents
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ListViolationEvents
impl Send for ListViolationEvents
impl Sync for ListViolationEvents
impl Unpin for ListViolationEvents
impl UnwindSafe for ListViolationEvents
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
§type Output = <T as ParseStrictResponse>::Output
type Output = <T as ParseStrictResponse>::Output
Output type of the HttpResponse. Read more
source§fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
Parse an HTTP request without reading the body. If the body must be provided to proceed,
return
None
Read moresource§fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
Parse an HTTP request from a fully loaded body. This is for standard request/response style
APIs like AwsJson 1.0/1.1 and the error path of most streaming APIs Read more