use std::fmt::Write;
pub mod associate_aws_account_with_partner_account_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) sidewalk: std::option::Option<crate::model::SidewalkAccountInfo>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn sidewalk(mut self, input: crate::model::SidewalkAccountInfo) -> Self {
self.sidewalk = Some(input);
self
}
pub fn set_sidewalk(
mut self,
input: std::option::Option<crate::model::SidewalkAccountInfo>,
) -> Self {
self.sidewalk = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateAwsAccountWithPartnerAccountInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateAwsAccountWithPartnerAccountInput {
sidewalk: self.sidewalk,
client_request_token: self.client_request_token,
tags: self.tags,
})
}
}
}
impl AssociateAwsAccountWithPartnerAccountInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateAwsAccountWithPartnerAccount,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::AssociateAwsAccountWithPartnerAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/partner-accounts").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateAwsAccountWithPartnerAccountInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_aws_account_with_partner_account(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateAwsAccountWithPartnerAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateAwsAccountWithPartnerAccount",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_aws_account_with_partner_account_input::Builder {
crate::input::associate_aws_account_with_partner_account_input::Builder::default()
}
}
pub mod associate_multicast_group_with_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) multicast_group_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn multicast_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.multicast_group_id = Some(input.into());
self
}
pub fn set_multicast_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.multicast_group_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateMulticastGroupWithFuotaTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateMulticastGroupWithFuotaTaskInput {
id: self.id,
multicast_group_id: self.multicast_group_id,
})
}
}
}
impl AssociateMulticastGroupWithFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateMulticastGroupWithFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateMulticastGroupWithFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.id;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}/multicast-group", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateMulticastGroupWithFuotaTaskInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_multicast_group_with_fuota_task(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateMulticastGroupWithFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateMulticastGroupWithFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_multicast_group_with_fuota_task_input::Builder {
crate::input::associate_multicast_group_with_fuota_task_input::Builder::default()
}
}
pub mod associate_wireless_device_with_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) wireless_device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn wireless_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_device_id = Some(input.into());
self
}
pub fn set_wireless_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_device_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateWirelessDeviceWithFuotaTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateWirelessDeviceWithFuotaTaskInput {
id: self.id,
wireless_device_id: self.wireless_device_id,
})
}
}
}
impl AssociateWirelessDeviceWithFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateWirelessDeviceWithFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateWirelessDeviceWithFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.id;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}/wireless-device", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateWirelessDeviceWithFuotaTaskInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_wireless_device_with_fuota_task(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateWirelessDeviceWithFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateWirelessDeviceWithFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_wireless_device_with_fuota_task_input::Builder {
crate::input::associate_wireless_device_with_fuota_task_input::Builder::default()
}
}
pub mod associate_wireless_device_with_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) wireless_device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn wireless_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_device_id = Some(input.into());
self
}
pub fn set_wireless_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_device_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateWirelessDeviceWithMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::AssociateWirelessDeviceWithMulticastGroupInput {
id: self.id,
wireless_device_id: self.wireless_device_id,
},
)
}
}
}
impl AssociateWirelessDeviceWithMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateWirelessDeviceWithMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateWirelessDeviceWithMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.id;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/wireless-device", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateWirelessDeviceWithMulticastGroupInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_wireless_device_with_multicast_group(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateWirelessDeviceWithMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateWirelessDeviceWithMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_wireless_device_with_multicast_group_input::Builder
{
crate::input::associate_wireless_device_with_multicast_group_input::Builder::default()
}
}
pub mod associate_wireless_device_with_thing_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) thing_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn thing_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.thing_arn = Some(input.into());
self
}
pub fn set_thing_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.thing_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateWirelessDeviceWithThingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateWirelessDeviceWithThingInput {
id: self.id,
thing_arn: self.thing_arn,
})
}
}
}
impl AssociateWirelessDeviceWithThingInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateWirelessDeviceWithThing,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateWirelessDeviceWithThingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.id;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/thing", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateWirelessDeviceWithThingInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_wireless_device_with_thing(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateWirelessDeviceWithThing::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateWirelessDeviceWithThing",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_wireless_device_with_thing_input::Builder {
crate::input::associate_wireless_device_with_thing_input::Builder::default()
}
}
pub mod associate_wireless_gateway_with_certificate_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) iot_certificate_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn iot_certificate_id(mut self, input: impl Into<std::string::String>) -> Self {
self.iot_certificate_id = Some(input.into());
self
}
pub fn set_iot_certificate_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.iot_certificate_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateWirelessGatewayWithCertificateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateWirelessGatewayWithCertificateInput {
id: self.id,
iot_certificate_id: self.iot_certificate_id,
})
}
}
}
impl AssociateWirelessGatewayWithCertificateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateWirelessGatewayWithCertificate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateWirelessGatewayWithCertificateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.id;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/certificate", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateWirelessGatewayWithCertificateInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_wireless_gateway_with_certificate(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateWirelessGatewayWithCertificate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateWirelessGatewayWithCertificate",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_wireless_gateway_with_certificate_input::Builder {
crate::input::associate_wireless_gateway_with_certificate_input::Builder::default()
}
}
pub mod associate_wireless_gateway_with_thing_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) thing_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn thing_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.thing_arn = Some(input.into());
self
}
pub fn set_thing_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.thing_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateWirelessGatewayWithThingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateWirelessGatewayWithThingInput {
id: self.id,
thing_arn: self.thing_arn,
})
}
}
}
impl AssociateWirelessGatewayWithThingInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateWirelessGatewayWithThing,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateWirelessGatewayWithThingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_6 = &_input.id;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/thing", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateWirelessGatewayWithThingInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_wireless_gateway_with_thing(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateWirelessGatewayWithThing::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateWirelessGatewayWithThing",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_wireless_gateway_with_thing_input::Builder {
crate::input::associate_wireless_gateway_with_thing_input::Builder::default()
}
}
pub mod cancel_multicast_group_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelMulticastGroupSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelMulticastGroupSessionInput { id: self.id })
}
}
}
impl CancelMulticastGroupSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelMulticastGroupSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CancelMulticastGroupSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_7 = &_input.id;
let input_7 = input_7.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_7,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/session", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelMulticastGroupSessionInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CancelMulticastGroupSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelMulticastGroupSession",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_multicast_group_session_input::Builder {
crate::input::cancel_multicast_group_session_input::Builder::default()
}
}
pub mod create_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) expression_type: std::option::Option<crate::model::ExpressionType>,
pub(crate) expression: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn expression_type(mut self, input: crate::model::ExpressionType) -> Self {
self.expression_type = Some(input);
self
}
pub fn set_expression_type(
mut self,
input: std::option::Option<crate::model::ExpressionType>,
) -> Self {
self.expression_type = input;
self
}
pub fn expression(mut self, input: impl Into<std::string::String>) -> Self {
self.expression = Some(input.into());
self
}
pub fn set_expression(mut self, input: std::option::Option<std::string::String>) -> Self {
self.expression = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateDestinationInput {
name: self.name,
expression_type: self.expression_type,
expression: self.expression,
description: self.description,
role_arn: self.role_arn,
tags: self.tags,
client_request_token: self.client_request_token,
})
}
}
}
impl CreateDestinationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDestination,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/destinations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDestinationInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_destination(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDestination",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_destination_input::Builder {
crate::input::create_destination_input::Builder::default()
}
}
pub mod create_device_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanDeviceProfile>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanDeviceProfile) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanDeviceProfile>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDeviceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateDeviceProfileInput {
name: self.name,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
client_request_token: self.client_request_token,
})
}
}
}
impl CreateDeviceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDeviceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateDeviceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/device-profiles").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDeviceProfileInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_device_profile(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDeviceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDeviceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_device_profile_input::Builder {
crate::input::create_device_profile_input::Builder::default()
}
}
pub mod create_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanFuotaTask>,
pub(crate) firmware_update_image: std::option::Option<std::string::String>,
pub(crate) firmware_update_role: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanFuotaTask) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanFuotaTask>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn firmware_update_image(mut self, input: impl Into<std::string::String>) -> Self {
self.firmware_update_image = Some(input.into());
self
}
pub fn set_firmware_update_image(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.firmware_update_image = input;
self
}
pub fn firmware_update_role(mut self, input: impl Into<std::string::String>) -> Self {
self.firmware_update_role = Some(input.into());
self
}
pub fn set_firmware_update_role(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.firmware_update_role = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateFuotaTaskInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateFuotaTaskInput {
name: self.name,
description: self.description,
client_request_token: self.client_request_token,
lo_ra_wan: self.lo_ra_wan,
firmware_update_image: self.firmware_update_image,
firmware_update_role: self.firmware_update_role,
tags: self.tags,
})
}
}
}
impl CreateFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/fuota-tasks").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateFuotaTaskInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_fuota_task(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_fuota_task_input::Builder {
crate::input::create_fuota_task_input::Builder::default()
}
}
pub mod create_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticast>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanMulticast) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanMulticast>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateMulticastGroupInput {
name: self.name,
description: self.description,
client_request_token: self.client_request_token,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
})
}
}
}
impl CreateMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/multicast-groups").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateMulticastGroupInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_multicast_group(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_multicast_group_input::Builder {
crate::input::create_multicast_group_input::Builder::default()
}
}
pub mod create_network_analyzer_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) trace_content: std::option::Option<crate::model::TraceContent>,
pub(crate) wireless_devices: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) wireless_gateways: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn trace_content(mut self, input: crate::model::TraceContent) -> Self {
self.trace_content = Some(input);
self
}
pub fn set_trace_content(
mut self,
input: std::option::Option<crate::model::TraceContent>,
) -> Self {
self.trace_content = input;
self
}
pub fn wireless_devices(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.wireless_devices.unwrap_or_default();
v.push(input.into());
self.wireless_devices = Some(v);
self
}
pub fn set_wireless_devices(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_devices = input;
self
}
pub fn wireless_gateways(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.wireless_gateways.unwrap_or_default();
v.push(input.into());
self.wireless_gateways = Some(v);
self
}
pub fn set_wireless_gateways(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_gateways = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateNetworkAnalyzerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateNetworkAnalyzerConfigurationInput {
name: self.name,
trace_content: self.trace_content,
wireless_devices: self.wireless_devices,
wireless_gateways: self.wireless_gateways,
description: self.description,
tags: self.tags,
client_request_token: self.client_request_token,
})
}
}
}
impl CreateNetworkAnalyzerConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateNetworkAnalyzerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateNetworkAnalyzerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/network-analyzer-configurations")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateNetworkAnalyzerConfigurationInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_network_analyzer_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateNetworkAnalyzerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateNetworkAnalyzerConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_network_analyzer_configuration_input::Builder {
crate::input::create_network_analyzer_configuration_input::Builder::default()
}
}
pub mod create_service_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanServiceProfile>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanServiceProfile) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanServiceProfile>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateServiceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateServiceProfileInput {
name: self.name,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
client_request_token: self.client_request_token,
})
}
}
}
impl CreateServiceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateServiceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateServiceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/service-profiles").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateServiceProfileInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_service_profile(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateServiceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateServiceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_service_profile_input::Builder {
crate::input::create_service_profile_input::Builder::default()
}
}
pub mod create_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::WirelessDeviceType>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanDevice>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) positioning: std::option::Option<crate::model::PositioningConfigStatus>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::WirelessDeviceType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::WirelessDeviceType>,
) -> Self {
self.r#type = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanDevice) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanDevice>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn positioning(mut self, input: crate::model::PositioningConfigStatus) -> Self {
self.positioning = Some(input);
self
}
pub fn set_positioning(
mut self,
input: std::option::Option<crate::model::PositioningConfigStatus>,
) -> Self {
self.positioning = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateWirelessDeviceInput {
r#type: self.r#type,
name: self.name,
description: self.description,
destination_name: self.destination_name,
client_request_token: self.client_request_token,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
positioning: self.positioning,
})
}
}
}
impl CreateWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-devices").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWirelessDeviceInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_wireless_device(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_wireless_device_input::Builder {
crate::input::create_wireless_device_input::Builder::default()
}
}
pub mod create_wireless_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanGateway>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanGateway) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanGateway>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateWirelessGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateWirelessGatewayInput {
name: self.name,
description: self.description,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
client_request_token: self.client_request_token,
})
}
}
}
impl CreateWirelessGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateWirelessGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateWirelessGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-gateways").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWirelessGatewayInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_wireless_gateway(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWirelessGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWirelessGateway",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_wireless_gateway_input::Builder {
crate::input::create_wireless_gateway_input::Builder::default()
}
}
pub mod create_wireless_gateway_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) wireless_gateway_task_definition_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn wireless_gateway_task_definition_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.wireless_gateway_task_definition_id = Some(input.into());
self
}
pub fn set_wireless_gateway_task_definition_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_gateway_task_definition_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateWirelessGatewayTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateWirelessGatewayTaskInput {
id: self.id,
wireless_gateway_task_definition_id: self.wireless_gateway_task_definition_id,
})
}
}
}
impl CreateWirelessGatewayTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateWirelessGatewayTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateWirelessGatewayTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_8 = &_input.id;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/tasks", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWirelessGatewayTaskInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_wireless_gateway_task(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWirelessGatewayTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWirelessGatewayTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_wireless_gateway_task_input::Builder {
crate::input::create_wireless_gateway_task_input::Builder::default()
}
}
pub mod create_wireless_gateway_task_definition_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) auto_create_tasks: std::option::Option<bool>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) update: std::option::Option<crate::model::UpdateWirelessGatewayTaskCreate>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn auto_create_tasks(mut self, input: bool) -> Self {
self.auto_create_tasks = Some(input);
self
}
pub fn set_auto_create_tasks(mut self, input: std::option::Option<bool>) -> Self {
self.auto_create_tasks = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn update(mut self, input: crate::model::UpdateWirelessGatewayTaskCreate) -> Self {
self.update = Some(input);
self
}
pub fn set_update(
mut self,
input: std::option::Option<crate::model::UpdateWirelessGatewayTaskCreate>,
) -> Self {
self.update = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateWirelessGatewayTaskDefinitionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateWirelessGatewayTaskDefinitionInput {
auto_create_tasks: self.auto_create_tasks.unwrap_or_default(),
name: self.name,
update: self.update,
client_request_token: self.client_request_token,
tags: self.tags,
})
}
}
}
impl CreateWirelessGatewayTaskDefinitionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateWirelessGatewayTaskDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateWirelessGatewayTaskDefinitionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-gateway-task-definitions")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWirelessGatewayTaskDefinitionInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_wireless_gateway_task_definition(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWirelessGatewayTaskDefinition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWirelessGatewayTaskDefinition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_wireless_gateway_task_definition_input::Builder {
crate::input::create_wireless_gateway_task_definition_input::Builder::default()
}
}
pub mod delete_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDestinationInput { name: self.name })
}
}
}
impl DeleteDestinationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDestination,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_9 = &_input.name;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
)
})?;
let name = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
),
);
}
write!(output, "/destinations/{Name}", Name = name)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDestinationInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDestination",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_destination_input::Builder {
crate::input::delete_destination_input::Builder::default()
}
}
pub mod delete_device_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDeviceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDeviceProfileInput { id: self.id })
}
}
}
impl DeleteDeviceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDeviceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDeviceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_10 = &_input.id;
let input_10 = input_10.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_10,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/device-profiles/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDeviceProfileInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDeviceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDeviceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_device_profile_input::Builder {
crate::input::delete_device_profile_input::Builder::default()
}
}
pub mod delete_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteFuotaTaskInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteFuotaTaskInput { id: self.id })
}
}
}
impl DeleteFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_11 = &_input.id;
let input_11 = input_11.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_11,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}", Id = id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteFuotaTaskInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_fuota_task_input::Builder {
crate::input::delete_fuota_task_input::Builder::default()
}
}
pub mod delete_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteMulticastGroupInput { id: self.id })
}
}
}
impl DeleteMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_12 = &_input.id;
let input_12 = input_12.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_12,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteMulticastGroupInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_multicast_group_input::Builder {
crate::input::delete_multicast_group_input::Builder::default()
}
}
pub mod delete_network_analyzer_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_name = Some(input.into());
self
}
pub fn set_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteNetworkAnalyzerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteNetworkAnalyzerConfigurationInput {
configuration_name: self.configuration_name,
})
}
}
}
impl DeleteNetworkAnalyzerConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteNetworkAnalyzerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteNetworkAnalyzerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_13 = &_input.configuration_name;
let input_13 = input_13.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
)
})?;
let configuration_name = aws_smithy_http::label::fmt_string(
input_13,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/network-analyzer-configurations/{ConfigurationName}",
ConfigurationName = configuration_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteNetworkAnalyzerConfigurationInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteNetworkAnalyzerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteNetworkAnalyzerConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_network_analyzer_configuration_input::Builder {
crate::input::delete_network_analyzer_configuration_input::Builder::default()
}
}
pub mod delete_queued_messages_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) message_id: std::option::Option<std::string::String>,
pub(crate) wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn message_id(mut self, input: impl Into<std::string::String>) -> Self {
self.message_id = Some(input.into());
self
}
pub fn set_message_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message_id = input;
self
}
pub fn wireless_device_type(mut self, input: crate::model::WirelessDeviceType) -> Self {
self.wireless_device_type = Some(input);
self
}
pub fn set_wireless_device_type(
mut self,
input: std::option::Option<crate::model::WirelessDeviceType>,
) -> Self {
self.wireless_device_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteQueuedMessagesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteQueuedMessagesInput {
id: self.id,
message_id: self.message_id,
wireless_device_type: self.wireless_device_type,
})
}
}
}
impl DeleteQueuedMessagesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteQueuedMessages,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteQueuedMessagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_14 = &_input.id;
let input_14 = input_14.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_14,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/data", Id = id)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteQueuedMessagesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_15 = &_input.message_id;
let inner_15 = inner_15.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"message_id",
"cannot be empty or unset",
)
})?;
if inner_15.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"message_id",
"cannot be empty or unset",
),
);
}
query.push_kv("messageId", &aws_smithy_http::query::fmt_string(&inner_15));
if let Some(inner_16) = &_input.wireless_device_type {
{
query.push_kv(
"WirelessDeviceType",
&aws_smithy_http::query::fmt_string(&inner_16),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteQueuedMessagesInput,
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("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteQueuedMessages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteQueuedMessages",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_queued_messages_input::Builder {
crate::input::delete_queued_messages_input::Builder::default()
}
}
pub mod delete_service_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteServiceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteServiceProfileInput { id: self.id })
}
}
}
impl DeleteServiceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteServiceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteServiceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_17 = &_input.id;
let input_17 = input_17.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_17,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/service-profiles/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteServiceProfileInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteServiceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteServiceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_service_profile_input::Builder {
crate::input::delete_service_profile_input::Builder::default()
}
}
pub mod delete_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteWirelessDeviceInput { id: self.id })
}
}
}
impl DeleteWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_18 = &_input.id;
let input_18 = input_18.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_18,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteWirelessDeviceInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_wireless_device_input::Builder {
crate::input::delete_wireless_device_input::Builder::default()
}
}
pub mod delete_wireless_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteWirelessGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteWirelessGatewayInput { id: self.id })
}
}
}
impl DeleteWirelessGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteWirelessGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteWirelessGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_19 = &_input.id;
let input_19 = input_19.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_19,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteWirelessGatewayInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteWirelessGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteWirelessGateway",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_wireless_gateway_input::Builder {
crate::input::delete_wireless_gateway_input::Builder::default()
}
}
pub mod delete_wireless_gateway_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteWirelessGatewayTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteWirelessGatewayTaskInput { id: self.id })
}
}
}
impl DeleteWirelessGatewayTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteWirelessGatewayTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteWirelessGatewayTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_20 = &_input.id;
let input_20 = input_20.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_20,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/tasks", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteWirelessGatewayTaskInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteWirelessGatewayTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteWirelessGatewayTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_wireless_gateway_task_input::Builder {
crate::input::delete_wireless_gateway_task_input::Builder::default()
}
}
pub mod delete_wireless_gateway_task_definition_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteWirelessGatewayTaskDefinitionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteWirelessGatewayTaskDefinitionInput { id: self.id })
}
}
}
impl DeleteWirelessGatewayTaskDefinitionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteWirelessGatewayTaskDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteWirelessGatewayTaskDefinitionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_21 = &_input.id;
let input_21 = input_21.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_21,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateway-task-definitions/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteWirelessGatewayTaskDefinitionInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteWirelessGatewayTaskDefinition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteWirelessGatewayTaskDefinition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_wireless_gateway_task_definition_input::Builder {
crate::input::delete_wireless_gateway_task_definition_input::Builder::default()
}
}
pub mod disassociate_aws_account_from_partner_account_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) partner_account_id: std::option::Option<std::string::String>,
pub(crate) partner_type: std::option::Option<crate::model::PartnerType>,
}
impl Builder {
pub fn partner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.partner_account_id = Some(input.into());
self
}
pub fn set_partner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.partner_account_id = input;
self
}
pub fn partner_type(mut self, input: crate::model::PartnerType) -> Self {
self.partner_type = Some(input);
self
}
pub fn set_partner_type(
mut self,
input: std::option::Option<crate::model::PartnerType>,
) -> Self {
self.partner_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateAwsAccountFromPartnerAccountInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DisassociateAwsAccountFromPartnerAccountInput {
partner_account_id: self.partner_account_id,
partner_type: self.partner_type,
},
)
}
}
}
impl DisassociateAwsAccountFromPartnerAccountInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateAwsAccountFromPartnerAccount,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateAwsAccountFromPartnerAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_22 = &_input.partner_account_id;
let input_22 = input_22.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
)
})?;
let partner_account_id = aws_smithy_http::label::fmt_string(
input_22,
aws_smithy_http::label::EncodingStrategy::Default,
);
if partner_account_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/partner-accounts/{PartnerAccountId}",
PartnerAccountId = partner_account_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DisassociateAwsAccountFromPartnerAccountInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_23 = &_input.partner_type;
let inner_23 = inner_23.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"partnerType",
&aws_smithy_http::query::fmt_string(&inner_23),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateAwsAccountFromPartnerAccountInput,
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("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateAwsAccountFromPartnerAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateAwsAccountFromPartnerAccount",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_aws_account_from_partner_account_input::Builder {
crate::input::disassociate_aws_account_from_partner_account_input::Builder::default()
}
}
pub mod disassociate_multicast_group_from_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) multicast_group_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn multicast_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.multicast_group_id = Some(input.into());
self
}
pub fn set_multicast_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.multicast_group_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateMulticastGroupFromFuotaTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateMulticastGroupFromFuotaTaskInput {
id: self.id,
multicast_group_id: self.multicast_group_id,
})
}
}
}
impl DisassociateMulticastGroupFromFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateMulticastGroupFromFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateMulticastGroupFromFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_24 = &_input.id;
let input_24 = input_24.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_24,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
let input_25 = &_input.multicast_group_id;
let input_25 = input_25.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"multicast_group_id",
"cannot be empty or unset",
)
})?;
let multicast_group_id = aws_smithy_http::label::fmt_string(
input_25,
aws_smithy_http::label::EncodingStrategy::Default,
);
if multicast_group_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"multicast_group_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/fuota-tasks/{Id}/multicast-groups/{MulticastGroupId}",
Id = id,
MulticastGroupId = multicast_group_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateMulticastGroupFromFuotaTaskInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateMulticastGroupFromFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateMulticastGroupFromFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_multicast_group_from_fuota_task_input::Builder {
crate::input::disassociate_multicast_group_from_fuota_task_input::Builder::default()
}
}
pub mod disassociate_wireless_device_from_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) wireless_device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn wireless_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_device_id = Some(input.into());
self
}
pub fn set_wireless_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_device_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateWirelessDeviceFromFuotaTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateWirelessDeviceFromFuotaTaskInput {
id: self.id,
wireless_device_id: self.wireless_device_id,
})
}
}
}
impl DisassociateWirelessDeviceFromFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateWirelessDeviceFromFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateWirelessDeviceFromFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_26 = &_input.id;
let input_26 = input_26.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_26,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
let input_27 = &_input.wireless_device_id;
let input_27 = input_27.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
)
})?;
let wireless_device_id = aws_smithy_http::label::fmt_string(
input_27,
aws_smithy_http::label::EncodingStrategy::Default,
);
if wireless_device_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/fuota-tasks/{Id}/wireless-devices/{WirelessDeviceId}",
Id = id,
WirelessDeviceId = wireless_device_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateWirelessDeviceFromFuotaTaskInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateWirelessDeviceFromFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateWirelessDeviceFromFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_wireless_device_from_fuota_task_input::Builder {
crate::input::disassociate_wireless_device_from_fuota_task_input::Builder::default()
}
}
pub mod disassociate_wireless_device_from_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) wireless_device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn wireless_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_device_id = Some(input.into());
self
}
pub fn set_wireless_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_device_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateWirelessDeviceFromMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DisassociateWirelessDeviceFromMulticastGroupInput {
id: self.id,
wireless_device_id: self.wireless_device_id,
},
)
}
}
}
impl DisassociateWirelessDeviceFromMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateWirelessDeviceFromMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateWirelessDeviceFromMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_28 = &_input.id;
let input_28 = input_28.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_28,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
let input_29 = &_input.wireless_device_id;
let input_29 = input_29.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
)
})?;
let wireless_device_id = aws_smithy_http::label::fmt_string(
input_29,
aws_smithy_http::label::EncodingStrategy::Default,
);
if wireless_device_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/multicast-groups/{Id}/wireless-devices/{WirelessDeviceId}",
Id = id,
WirelessDeviceId = wireless_device_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateWirelessDeviceFromMulticastGroupInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateWirelessDeviceFromMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateWirelessDeviceFromMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::disassociate_wireless_device_from_multicast_group_input::Builder {
crate::input::disassociate_wireless_device_from_multicast_group_input::Builder::default()
}
}
pub mod disassociate_wireless_device_from_thing_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateWirelessDeviceFromThingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateWirelessDeviceFromThingInput { id: self.id })
}
}
}
impl DisassociateWirelessDeviceFromThingInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateWirelessDeviceFromThing,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateWirelessDeviceFromThingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_30 = &_input.id;
let input_30 = input_30.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_30,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/thing", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateWirelessDeviceFromThingInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateWirelessDeviceFromThing::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateWirelessDeviceFromThing",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_wireless_device_from_thing_input::Builder {
crate::input::disassociate_wireless_device_from_thing_input::Builder::default()
}
}
pub mod disassociate_wireless_gateway_from_certificate_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateWirelessGatewayFromCertificateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateWirelessGatewayFromCertificateInput { id: self.id })
}
}
}
impl DisassociateWirelessGatewayFromCertificateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateWirelessGatewayFromCertificate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateWirelessGatewayFromCertificateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_31 = &_input.id;
let input_31 = input_31.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_31,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/certificate", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateWirelessGatewayFromCertificateInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateWirelessGatewayFromCertificate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateWirelessGatewayFromCertificate",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_wireless_gateway_from_certificate_input::Builder
{
crate::input::disassociate_wireless_gateway_from_certificate_input::Builder::default()
}
}
pub mod disassociate_wireless_gateway_from_thing_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateWirelessGatewayFromThingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateWirelessGatewayFromThingInput { id: self.id })
}
}
}
impl DisassociateWirelessGatewayFromThingInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateWirelessGatewayFromThing,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateWirelessGatewayFromThingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_32 = &_input.id;
let input_32 = input_32.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_32,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/thing", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateWirelessGatewayFromThingInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateWirelessGatewayFromThing::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateWirelessGatewayFromThing",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_wireless_gateway_from_thing_input::Builder {
crate::input::disassociate_wireless_gateway_from_thing_input::Builder::default()
}
}
pub mod get_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetDestinationInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetDestinationInput { name: self.name })
}
}
}
impl GetDestinationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDestination,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_33 = &_input.name;
let input_33 = input_33.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
)
})?;
let name = aws_smithy_http::label::fmt_string(
input_33,
aws_smithy_http::label::EncodingStrategy::Default,
);
if name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
),
);
}
write!(output, "/destinations/{Name}", Name = name)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDestinationInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDestination",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_destination_input::Builder {
crate::input::get_destination_input::Builder::default()
}
}
pub mod get_device_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetDeviceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetDeviceProfileInput { id: self.id })
}
}
}
impl GetDeviceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeviceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetDeviceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_34 = &_input.id;
let input_34 = input_34.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_34,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/device-profiles/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeviceProfileInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeviceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeviceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_device_profile_input::Builder {
crate::input::get_device_profile_input::Builder::default()
}
}
pub mod get_event_configuration_by_resource_types_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::GetEventConfigurationByResourceTypesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetEventConfigurationByResourceTypesInput {})
}
}
}
impl GetEventConfigurationByResourceTypesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetEventConfigurationByResourceTypes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetEventConfigurationByResourceTypesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/event-configurations-resource-types")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEventConfigurationByResourceTypesInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEventConfigurationByResourceTypes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEventConfigurationByResourceTypes",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_event_configuration_by_resource_types_input::Builder {
crate::input::get_event_configuration_by_resource_types_input::Builder::default()
}
}
pub mod get_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetFuotaTaskInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetFuotaTaskInput { id: self.id })
}
}
}
impl GetFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_35 = &_input.id;
let input_35 = input_35.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_35,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}", Id = id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetFuotaTaskInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_fuota_task_input::Builder {
crate::input::get_fuota_task_input::Builder::default()
}
}
pub mod get_log_levels_by_resource_types_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::GetLogLevelsByResourceTypesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLogLevelsByResourceTypesInput {})
}
}
}
impl GetLogLevelsByResourceTypesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetLogLevelsByResourceTypes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetLogLevelsByResourceTypesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/log-levels").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLogLevelsByResourceTypesInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLogLevelsByResourceTypes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLogLevelsByResourceTypes",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_log_levels_by_resource_types_input::Builder {
crate::input::get_log_levels_by_resource_types_input::Builder::default()
}
}
pub mod get_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetMulticastGroupInput { id: self.id })
}
}
}
impl GetMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_36 = &_input.id;
let input_36 = input_36.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_36,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMulticastGroupInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_multicast_group_input::Builder {
crate::input::get_multicast_group_input::Builder::default()
}
}
pub mod get_multicast_group_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetMulticastGroupSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetMulticastGroupSessionInput { id: self.id })
}
}
}
impl GetMulticastGroupSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetMulticastGroupSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetMulticastGroupSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_37 = &_input.id;
let input_37 = input_37.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_37,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/session", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMulticastGroupSessionInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetMulticastGroupSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMulticastGroupSession",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_multicast_group_session_input::Builder {
crate::input::get_multicast_group_session_input::Builder::default()
}
}
pub mod get_network_analyzer_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_name = Some(input.into());
self
}
pub fn set_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetNetworkAnalyzerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetNetworkAnalyzerConfigurationInput {
configuration_name: self.configuration_name,
})
}
}
}
impl GetNetworkAnalyzerConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetNetworkAnalyzerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetNetworkAnalyzerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_38 = &_input.configuration_name;
let input_38 = input_38.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
)
})?;
let configuration_name = aws_smithy_http::label::fmt_string(
input_38,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/network-analyzer-configurations/{ConfigurationName}",
ConfigurationName = configuration_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetNetworkAnalyzerConfigurationInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetNetworkAnalyzerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetNetworkAnalyzerConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_network_analyzer_configuration_input::Builder {
crate::input::get_network_analyzer_configuration_input::Builder::default()
}
}
pub mod get_partner_account_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) partner_account_id: std::option::Option<std::string::String>,
pub(crate) partner_type: std::option::Option<crate::model::PartnerType>,
}
impl Builder {
pub fn partner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.partner_account_id = Some(input.into());
self
}
pub fn set_partner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.partner_account_id = input;
self
}
pub fn partner_type(mut self, input: crate::model::PartnerType) -> Self {
self.partner_type = Some(input);
self
}
pub fn set_partner_type(
mut self,
input: std::option::Option<crate::model::PartnerType>,
) -> Self {
self.partner_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetPartnerAccountInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetPartnerAccountInput {
partner_account_id: self.partner_account_id,
partner_type: self.partner_type,
})
}
}
}
impl GetPartnerAccountInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPartnerAccount,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetPartnerAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_39 = &_input.partner_account_id;
let input_39 = input_39.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
)
})?;
let partner_account_id = aws_smithy_http::label::fmt_string(
input_39,
aws_smithy_http::label::EncodingStrategy::Default,
);
if partner_account_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/partner-accounts/{PartnerAccountId}",
PartnerAccountId = partner_account_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetPartnerAccountInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_40 = &_input.partner_type;
let inner_40 = inner_40.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"partnerType",
&aws_smithy_http::query::fmt_string(&inner_40),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPartnerAccountInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPartnerAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPartnerAccount",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_partner_account_input::Builder {
crate::input::get_partner_account_input::Builder::default()
}
}
pub mod get_position_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetPositionInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetPositionInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
})
}
}
}
impl GetPositionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPosition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetPositionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_41 = &_input.resource_identifier;
let input_41 = input_41.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_41,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/positions/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetPositionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_42 = &_input.resource_type;
let inner_42 = inner_42.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_42),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPositionInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPosition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPosition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_position_input::Builder {
crate::input::get_position_input::Builder::default()
}
}
pub mod get_position_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetPositionConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetPositionConfigurationInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
})
}
}
}
impl GetPositionConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPositionConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetPositionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_43 = &_input.resource_identifier;
let input_43 = input_43.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_43,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/position-configurations/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetPositionConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_44 = &_input.resource_type;
let inner_44 = inner_44.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_44),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPositionConfigurationInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPositionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPositionConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_position_configuration_input::Builder {
crate::input::get_position_configuration_input::Builder::default()
}
}
pub mod get_position_estimate_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wi_fi_access_points:
std::option::Option<std::vec::Vec<crate::model::WiFiAccessPoint>>,
pub(crate) cell_towers: std::option::Option<crate::model::CellTowers>,
pub(crate) ip: std::option::Option<crate::model::Ip>,
pub(crate) gnss: std::option::Option<crate::model::Gnss>,
pub(crate) timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn wi_fi_access_points(mut self, input: crate::model::WiFiAccessPoint) -> Self {
let mut v = self.wi_fi_access_points.unwrap_or_default();
v.push(input);
self.wi_fi_access_points = Some(v);
self
}
pub fn set_wi_fi_access_points(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::WiFiAccessPoint>>,
) -> Self {
self.wi_fi_access_points = input;
self
}
pub fn cell_towers(mut self, input: crate::model::CellTowers) -> Self {
self.cell_towers = Some(input);
self
}
pub fn set_cell_towers(
mut self,
input: std::option::Option<crate::model::CellTowers>,
) -> Self {
self.cell_towers = input;
self
}
pub fn ip(mut self, input: crate::model::Ip) -> Self {
self.ip = Some(input);
self
}
pub fn set_ip(mut self, input: std::option::Option<crate::model::Ip>) -> Self {
self.ip = input;
self
}
pub fn gnss(mut self, input: crate::model::Gnss) -> Self {
self.gnss = Some(input);
self
}
pub fn set_gnss(mut self, input: std::option::Option<crate::model::Gnss>) -> Self {
self.gnss = input;
self
}
pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
self.timestamp = Some(input);
self
}
pub fn set_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.timestamp = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetPositionEstimateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetPositionEstimateInput {
wi_fi_access_points: self.wi_fi_access_points,
cell_towers: self.cell_towers,
ip: self.ip,
gnss: self.gnss,
timestamp: self.timestamp,
})
}
}
}
impl GetPositionEstimateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetPositionEstimate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetPositionEstimateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/position-estimate").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetPositionEstimateInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_position_estimate(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetPositionEstimate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetPositionEstimate",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_position_estimate_input::Builder {
crate::input::get_position_estimate_input::Builder::default()
}
}
pub mod get_resource_event_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) identifier_type: std::option::Option<crate::model::IdentifierType>,
pub(crate) partner_type: std::option::Option<crate::model::EventNotificationPartnerType>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn identifier_type(mut self, input: crate::model::IdentifierType) -> Self {
self.identifier_type = Some(input);
self
}
pub fn set_identifier_type(
mut self,
input: std::option::Option<crate::model::IdentifierType>,
) -> Self {
self.identifier_type = input;
self
}
pub fn partner_type(mut self, input: crate::model::EventNotificationPartnerType) -> Self {
self.partner_type = Some(input);
self
}
pub fn set_partner_type(
mut self,
input: std::option::Option<crate::model::EventNotificationPartnerType>,
) -> Self {
self.partner_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetResourceEventConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourceEventConfigurationInput {
identifier: self.identifier,
identifier_type: self.identifier_type,
partner_type: self.partner_type,
})
}
}
}
impl GetResourceEventConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetResourceEventConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetResourceEventConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_45 = &_input.identifier;
let input_45 = input_45.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
)
})?;
let identifier = aws_smithy_http::label::fmt_string(
input_45,
aws_smithy_http::label::EncodingStrategy::Default,
);
if identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/event-configurations/{Identifier}",
Identifier = identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetResourceEventConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_46 = &_input.identifier_type;
let inner_46 = inner_46.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"identifierType",
&aws_smithy_http::query::fmt_string(&inner_46),
);
if let Some(inner_47) = &_input.partner_type {
{
query.push_kv(
"partnerType",
&aws_smithy_http::query::fmt_string(&inner_47),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourceEventConfigurationInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetResourceEventConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourceEventConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_event_configuration_input::Builder {
crate::input::get_resource_event_configuration_input::Builder::default()
}
}
pub mod get_resource_log_level_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetResourceLogLevelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourceLogLevelInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
})
}
}
}
impl GetResourceLogLevelInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetResourceLogLevel,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetResourceLogLevelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_48 = &_input.resource_identifier;
let input_48 = input_48.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_48,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/log-levels/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetResourceLogLevelInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_49 = &_input.resource_type;
let inner_49 = inner_49.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
if inner_49.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_49),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourceLogLevelInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetResourceLogLevel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourceLogLevel",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_log_level_input::Builder {
crate::input::get_resource_log_level_input::Builder::default()
}
}
pub mod get_resource_position_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetResourcePositionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourcePositionInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
})
}
}
}
impl GetResourcePositionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetResourcePosition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetResourcePositionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_50 = &_input.resource_identifier;
let input_50 = input_50.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_50,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/resource-positions/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetResourcePositionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_51 = &_input.resource_type;
let inner_51 = inner_51.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_51),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourcePositionInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetResourcePosition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourcePosition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_position_input::Builder {
crate::input::get_resource_position_input::Builder::default()
}
}
pub mod get_service_endpoint_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_type: std::option::Option<crate::model::WirelessGatewayServiceType>,
}
impl Builder {
pub fn service_type(mut self, input: crate::model::WirelessGatewayServiceType) -> Self {
self.service_type = Some(input);
self
}
pub fn set_service_type(
mut self,
input: std::option::Option<crate::model::WirelessGatewayServiceType>,
) -> Self {
self.service_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetServiceEndpointInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetServiceEndpointInput {
service_type: self.service_type,
})
}
}
}
impl GetServiceEndpointInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetServiceEndpoint,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetServiceEndpointInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/service-endpoint").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetServiceEndpointInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_52) = &_input.service_type {
{
query.push_kv(
"serviceType",
&aws_smithy_http::query::fmt_string(&inner_52),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceEndpointInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetServiceEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServiceEndpoint",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_endpoint_input::Builder {
crate::input::get_service_endpoint_input::Builder::default()
}
}
pub mod get_service_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetServiceProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetServiceProfileInput { id: self.id })
}
}
}
impl GetServiceProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetServiceProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetServiceProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_53 = &_input.id;
let input_53 = input_53.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_53,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/service-profiles/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceProfileInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetServiceProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServiceProfile",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_profile_input::Builder {
crate::input::get_service_profile_input::Builder::default()
}
}
pub mod get_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) identifier_type: std::option::Option<crate::model::WirelessDeviceIdType>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn identifier_type(mut self, input: crate::model::WirelessDeviceIdType) -> Self {
self.identifier_type = Some(input);
self
}
pub fn set_identifier_type(
mut self,
input: std::option::Option<crate::model::WirelessDeviceIdType>,
) -> Self {
self.identifier_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessDeviceInput {
identifier: self.identifier,
identifier_type: self.identifier_type,
})
}
}
}
impl GetWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_54 = &_input.identifier;
let input_54 = input_54.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
)
})?;
let identifier = aws_smithy_http::label::fmt_string(
input_54,
aws_smithy_http::label::EncodingStrategy::Default,
);
if identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/wireless-devices/{Identifier}",
Identifier = identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetWirelessDeviceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_55 = &_input.identifier_type;
let inner_55 = inner_55.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"identifierType",
&aws_smithy_http::query::fmt_string(&inner_55),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessDeviceInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_device_input::Builder {
crate::input::get_wireless_device_input::Builder::default()
}
}
pub mod get_wireless_device_statistics_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wireless_device_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn wireless_device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_device_id = Some(input.into());
self
}
pub fn set_wireless_device_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_device_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessDeviceStatisticsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessDeviceStatisticsInput {
wireless_device_id: self.wireless_device_id,
})
}
}
}
impl GetWirelessDeviceStatisticsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessDeviceStatistics,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessDeviceStatisticsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_56 = &_input.wireless_device_id;
let input_56 = input_56.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
)
})?;
let wireless_device_id = aws_smithy_http::label::fmt_string(
input_56,
aws_smithy_http::label::EncodingStrategy::Default,
);
if wireless_device_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_device_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/wireless-devices/{WirelessDeviceId}/statistics",
WirelessDeviceId = wireless_device_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessDeviceStatisticsInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessDeviceStatistics::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessDeviceStatistics",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_device_statistics_input::Builder {
crate::input::get_wireless_device_statistics_input::Builder::default()
}
}
pub mod get_wireless_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) identifier_type: std::option::Option<crate::model::WirelessGatewayIdType>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn identifier_type(mut self, input: crate::model::WirelessGatewayIdType) -> Self {
self.identifier_type = Some(input);
self
}
pub fn set_identifier_type(
mut self,
input: std::option::Option<crate::model::WirelessGatewayIdType>,
) -> Self {
self.identifier_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayInput {
identifier: self.identifier,
identifier_type: self.identifier_type,
})
}
}
}
impl GetWirelessGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_57 = &_input.identifier;
let input_57 = input_57.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
)
})?;
let identifier = aws_smithy_http::label::fmt_string(
input_57,
aws_smithy_http::label::EncodingStrategy::Default,
);
if identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/wireless-gateways/{Identifier}",
Identifier = identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetWirelessGatewayInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_58 = &_input.identifier_type;
let inner_58 = inner_58.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"identifierType",
&aws_smithy_http::query::fmt_string(&inner_58),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGateway",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_input::Builder {
crate::input::get_wireless_gateway_input::Builder::default()
}
}
pub mod get_wireless_gateway_certificate_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayCertificateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayCertificateInput { id: self.id })
}
}
}
impl GetWirelessGatewayCertificateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGatewayCertificate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayCertificateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_59 = &_input.id;
let input_59 = input_59.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_59,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/certificate", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayCertificateInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGatewayCertificate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGatewayCertificate",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_certificate_input::Builder {
crate::input::get_wireless_gateway_certificate_input::Builder::default()
}
}
pub mod get_wireless_gateway_firmware_information_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayFirmwareInformationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayFirmwareInformationInput { id: self.id })
}
}
}
impl GetWirelessGatewayFirmwareInformationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGatewayFirmwareInformation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayFirmwareInformationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_60 = &_input.id;
let input_60 = input_60.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_60,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/wireless-gateways/{Id}/firmware-information",
Id = id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayFirmwareInformationInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGatewayFirmwareInformation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGatewayFirmwareInformation",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_firmware_information_input::Builder {
crate::input::get_wireless_gateway_firmware_information_input::Builder::default()
}
}
pub mod get_wireless_gateway_statistics_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wireless_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn wireless_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wireless_gateway_id = Some(input.into());
self
}
pub fn set_wireless_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.wireless_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayStatisticsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayStatisticsInput {
wireless_gateway_id: self.wireless_gateway_id,
})
}
}
}
impl GetWirelessGatewayStatisticsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGatewayStatistics,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayStatisticsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_61 = &_input.wireless_gateway_id;
let input_61 = input_61.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_gateway_id",
"cannot be empty or unset",
)
})?;
let wireless_gateway_id = aws_smithy_http::label::fmt_string(
input_61,
aws_smithy_http::label::EncodingStrategy::Default,
);
if wireless_gateway_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"wireless_gateway_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/wireless-gateways/{WirelessGatewayId}/statistics",
WirelessGatewayId = wireless_gateway_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayStatisticsInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGatewayStatistics::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGatewayStatistics",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_statistics_input::Builder {
crate::input::get_wireless_gateway_statistics_input::Builder::default()
}
}
pub mod get_wireless_gateway_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayTaskInput { id: self.id })
}
}
}
impl GetWirelessGatewayTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGatewayTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_62 = &_input.id;
let input_62 = input_62.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_62,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}/tasks", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayTaskInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGatewayTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGatewayTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_task_input::Builder {
crate::input::get_wireless_gateway_task_input::Builder::default()
}
}
pub mod get_wireless_gateway_task_definition_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetWirelessGatewayTaskDefinitionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetWirelessGatewayTaskDefinitionInput { id: self.id })
}
}
}
impl GetWirelessGatewayTaskDefinitionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetWirelessGatewayTaskDefinition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetWirelessGatewayTaskDefinitionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_63 = &_input.id;
let input_63 = input_63.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_63,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateway-task-definitions/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetWirelessGatewayTaskDefinitionInput,
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)?;
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetWirelessGatewayTaskDefinition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetWirelessGatewayTaskDefinition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_wireless_gateway_task_definition_input::Builder {
crate::input::get_wireless_gateway_task_definition_input::Builder::default()
}
}
pub mod list_destinations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListDestinationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListDestinationsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListDestinationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDestinations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListDestinationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/destinations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListDestinationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_64) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_64));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDestinationsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDestinations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDestinations",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_destinations_input::Builder {
crate::input::list_destinations_input::Builder::default()
}
}
pub mod list_device_profiles_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListDeviceProfilesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListDeviceProfilesInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListDeviceProfilesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeviceProfiles,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListDeviceProfilesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/device-profiles").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListDeviceProfilesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_65) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_65));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeviceProfilesInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeviceProfiles::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeviceProfiles",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_device_profiles_input::Builder {
crate::input::list_device_profiles_input::Builder::default()
}
}
pub mod list_event_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<crate::model::EventNotificationResourceType>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_type(mut self, input: crate::model::EventNotificationResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::EventNotificationResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEventConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEventConfigurationsInput {
resource_type: self.resource_type,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListEventConfigurationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEventConfigurations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListEventConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/event-configurations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListEventConfigurationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_66 = &_input.resource_type;
let inner_66 = inner_66.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_66),
);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_67) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_67));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEventConfigurationsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEventConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEventConfigurations",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_event_configurations_input::Builder {
crate::input::list_event_configurations_input::Builder::default()
}
}
pub mod list_fuota_tasks_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListFuotaTasksInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListFuotaTasksInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListFuotaTasksInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListFuotaTasks,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListFuotaTasksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/fuota-tasks").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListFuotaTasksInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_68) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_68));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListFuotaTasksInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListFuotaTasks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListFuotaTasks",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_fuota_tasks_input::Builder {
crate::input::list_fuota_tasks_input::Builder::default()
}
}
pub mod list_multicast_groups_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListMulticastGroupsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListMulticastGroupsInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListMulticastGroupsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListMulticastGroups,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListMulticastGroupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/multicast-groups").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListMulticastGroupsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_69) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_69));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListMulticastGroupsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListMulticastGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListMulticastGroups",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_multicast_groups_input::Builder {
crate::input::list_multicast_groups_input::Builder::default()
}
}
pub mod list_multicast_groups_by_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListMulticastGroupsByFuotaTaskInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListMulticastGroupsByFuotaTaskInput {
id: self.id,
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListMulticastGroupsByFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListMulticastGroupsByFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListMulticastGroupsByFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_70 = &_input.id;
let input_70 = input_70.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_70,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}/multicast-groups", Id = id)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListMulticastGroupsByFuotaTaskInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_71) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_71));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListMulticastGroupsByFuotaTaskInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListMulticastGroupsByFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListMulticastGroupsByFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_multicast_groups_by_fuota_task_input::Builder {
crate::input::list_multicast_groups_by_fuota_task_input::Builder::default()
}
}
pub mod list_network_analyzer_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListNetworkAnalyzerConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListNetworkAnalyzerConfigurationsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListNetworkAnalyzerConfigurationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListNetworkAnalyzerConfigurations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListNetworkAnalyzerConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/network-analyzer-configurations")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListNetworkAnalyzerConfigurationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_72) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_72));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListNetworkAnalyzerConfigurationsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListNetworkAnalyzerConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListNetworkAnalyzerConfigurations",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_network_analyzer_configurations_input::Builder {
crate::input::list_network_analyzer_configurations_input::Builder::default()
}
}
pub mod list_partner_accounts_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListPartnerAccountsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListPartnerAccountsInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListPartnerAccountsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListPartnerAccounts,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListPartnerAccountsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/partner-accounts").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListPartnerAccountsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_73) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_73));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListPartnerAccountsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListPartnerAccounts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListPartnerAccounts",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_partner_accounts_input::Builder {
crate::input::list_partner_accounts_input::Builder::default()
}
}
pub mod list_position_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListPositionConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListPositionConfigurationsInput {
resource_type: self.resource_type,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListPositionConfigurationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListPositionConfigurations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListPositionConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/position-configurations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListPositionConfigurationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_74) = &_input.resource_type {
{
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_74),
);
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_75) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_75));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListPositionConfigurationsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListPositionConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListPositionConfigurations",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_position_configurations_input::Builder {
crate::input::list_position_configurations_input::Builder::default()
}
}
pub mod list_queued_messages_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn wireless_device_type(mut self, input: crate::model::WirelessDeviceType) -> Self {
self.wireless_device_type = Some(input);
self
}
pub fn set_wireless_device_type(
mut self,
input: std::option::Option<crate::model::WirelessDeviceType>,
) -> Self {
self.wireless_device_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListQueuedMessagesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListQueuedMessagesInput {
id: self.id,
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
wireless_device_type: self.wireless_device_type,
})
}
}
}
impl ListQueuedMessagesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListQueuedMessages,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListQueuedMessagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_76 = &_input.id;
let input_76 = input_76.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_76,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/data", Id = id)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListQueuedMessagesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_77) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_77));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_78) = &_input.wireless_device_type {
{
query.push_kv(
"WirelessDeviceType",
&aws_smithy_http::query::fmt_string(&inner_78),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListQueuedMessagesInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListQueuedMessages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListQueuedMessages",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_queued_messages_input::Builder {
crate::input::list_queued_messages_input::Builder::default()
}
}
pub mod list_service_profiles_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListServiceProfilesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceProfilesInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListServiceProfilesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceProfiles,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListServiceProfilesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/service-profiles").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListServiceProfilesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_79) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_79));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceProfilesInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListServiceProfiles::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceProfiles",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_profiles_input::Builder {
crate::input::list_service_profiles_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/tags").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListTagsForResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_80 = &_input.resource_arn;
let inner_80 = inner_80.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
if inner_80.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_80),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod list_wireless_devices_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) device_profile_id: std::option::Option<std::string::String>,
pub(crate) service_profile_id: std::option::Option<std::string::String>,
pub(crate) wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
pub(crate) fuota_task_id: std::option::Option<std::string::String>,
pub(crate) multicast_group_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn device_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_profile_id = Some(input.into());
self
}
pub fn set_device_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.device_profile_id = input;
self
}
pub fn service_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.service_profile_id = Some(input.into());
self
}
pub fn set_service_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_profile_id = input;
self
}
pub fn wireless_device_type(mut self, input: crate::model::WirelessDeviceType) -> Self {
self.wireless_device_type = Some(input);
self
}
pub fn set_wireless_device_type(
mut self,
input: std::option::Option<crate::model::WirelessDeviceType>,
) -> Self {
self.wireless_device_type = input;
self
}
pub fn fuota_task_id(mut self, input: impl Into<std::string::String>) -> Self {
self.fuota_task_id = Some(input.into());
self
}
pub fn set_fuota_task_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.fuota_task_id = input;
self
}
pub fn multicast_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.multicast_group_id = Some(input.into());
self
}
pub fn set_multicast_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.multicast_group_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListWirelessDevicesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListWirelessDevicesInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
destination_name: self.destination_name,
device_profile_id: self.device_profile_id,
service_profile_id: self.service_profile_id,
wireless_device_type: self.wireless_device_type,
fuota_task_id: self.fuota_task_id,
multicast_group_id: self.multicast_group_id,
})
}
}
}
impl ListWirelessDevicesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListWirelessDevices,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListWirelessDevicesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-devices").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListWirelessDevicesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_81) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_81));
}
}
if let Some(inner_82) = &_input.destination_name {
{
query.push_kv(
"destinationName",
&aws_smithy_http::query::fmt_string(&inner_82),
);
}
}
if let Some(inner_83) = &_input.device_profile_id {
{
query.push_kv(
"deviceProfileId",
&aws_smithy_http::query::fmt_string(&inner_83),
);
}
}
if let Some(inner_84) = &_input.service_profile_id {
{
query.push_kv(
"serviceProfileId",
&aws_smithy_http::query::fmt_string(&inner_84),
);
}
}
if let Some(inner_85) = &_input.wireless_device_type {
{
query.push_kv(
"wirelessDeviceType",
&aws_smithy_http::query::fmt_string(&inner_85),
);
}
}
if let Some(inner_86) = &_input.fuota_task_id {
{
query.push_kv(
"fuotaTaskId",
&aws_smithy_http::query::fmt_string(&inner_86),
);
}
}
if let Some(inner_87) = &_input.multicast_group_id {
{
query.push_kv(
"multicastGroupId",
&aws_smithy_http::query::fmt_string(&inner_87),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListWirelessDevicesInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListWirelessDevices::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListWirelessDevices",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_wireless_devices_input::Builder {
crate::input::list_wireless_devices_input::Builder::default()
}
}
pub mod list_wireless_gateways_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListWirelessGatewaysInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListWirelessGatewaysInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListWirelessGatewaysInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListWirelessGateways,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListWirelessGatewaysInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-gateways").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListWirelessGatewaysInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_88) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_88));
}
}
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListWirelessGatewaysInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListWirelessGateways::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListWirelessGateways",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_wireless_gateways_input::Builder {
crate::input::list_wireless_gateways_input::Builder::default()
}
}
pub mod list_wireless_gateway_task_definitions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) task_definition_type:
std::option::Option<crate::model::WirelessGatewayTaskDefinitionType>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn task_definition_type(
mut self,
input: crate::model::WirelessGatewayTaskDefinitionType,
) -> Self {
self.task_definition_type = Some(input);
self
}
pub fn set_task_definition_type(
mut self,
input: std::option::Option<crate::model::WirelessGatewayTaskDefinitionType>,
) -> Self {
self.task_definition_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListWirelessGatewayTaskDefinitionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListWirelessGatewayTaskDefinitionsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
task_definition_type: self.task_definition_type,
})
}
}
}
impl ListWirelessGatewayTaskDefinitionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListWirelessGatewayTaskDefinitions,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListWirelessGatewayTaskDefinitionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/wireless-gateway-task-definitions")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListWirelessGatewayTaskDefinitionsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_89) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_89));
}
}
if let Some(inner_90) = &_input.task_definition_type {
{
query.push_kv(
"taskDefinitionType",
&aws_smithy_http::query::fmt_string(&inner_90),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListWirelessGatewayTaskDefinitionsInput,
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListWirelessGatewayTaskDefinitions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListWirelessGatewayTaskDefinitions",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_wireless_gateway_task_definitions_input::Builder {
crate::input::list_wireless_gateway_task_definitions_input::Builder::default()
}
}
pub mod put_position_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
pub(crate) solvers: std::option::Option<crate::model::PositionSolverConfigurations>,
pub(crate) destination: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn solvers(mut self, input: crate::model::PositionSolverConfigurations) -> Self {
self.solvers = Some(input);
self
}
pub fn set_solvers(
mut self,
input: std::option::Option<crate::model::PositionSolverConfigurations>,
) -> Self {
self.solvers = input;
self
}
pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
self.destination = Some(input.into());
self
}
pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutPositionConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutPositionConfigurationInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
solvers: self.solvers,
destination: self.destination,
})
}
}
}
impl PutPositionConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutPositionConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::PutPositionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_91 = &_input.resource_identifier;
let input_91 = input_91.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_91,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/position-configurations/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::PutPositionConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_92 = &_input.resource_type;
let inner_92 = inner_92.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_92),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutPositionConfigurationInput,
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("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_position_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutPositionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutPositionConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_position_configuration_input::Builder {
crate::input::put_position_configuration_input::Builder::default()
}
}
pub mod put_resource_log_level_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) log_level: std::option::Option<crate::model::LogLevel>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn log_level(mut self, input: crate::model::LogLevel) -> Self {
self.log_level = Some(input);
self
}
pub fn set_log_level(mut self, input: std::option::Option<crate::model::LogLevel>) -> Self {
self.log_level = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutResourceLogLevelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutResourceLogLevelInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
log_level: self.log_level,
})
}
}
}
impl PutResourceLogLevelInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutResourceLogLevel,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::PutResourceLogLevelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_93 = &_input.resource_identifier;
let input_93 = input_93.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_93,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/log-levels/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::PutResourceLogLevelInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_94 = &_input.resource_type;
let inner_94 = inner_94.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
if inner_94.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_94),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutResourceLogLevelInput,
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("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_resource_log_level(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutResourceLogLevel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutResourceLogLevel",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_resource_log_level_input::Builder {
crate::input::put_resource_log_level_input::Builder::default()
}
}
pub mod reset_all_resource_log_levels_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::ResetAllResourceLogLevelsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ResetAllResourceLogLevelsInput {})
}
}
}
impl ResetAllResourceLogLevelsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ResetAllResourceLogLevels,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ResetAllResourceLogLevelsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/log-levels").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ResetAllResourceLogLevelsInput,
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)?;
Ok(builder.method("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ResetAllResourceLogLevels::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ResetAllResourceLogLevels",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::reset_all_resource_log_levels_input::Builder {
crate::input::reset_all_resource_log_levels_input::Builder::default()
}
}
pub mod reset_resource_log_level_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ResetResourceLogLevelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ResetResourceLogLevelInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
})
}
}
}
impl ResetResourceLogLevelInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ResetResourceLogLevel,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ResetResourceLogLevelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_95 = &_input.resource_identifier;
let input_95 = input_95.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_95,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/log-levels/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ResetResourceLogLevelInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_96 = &_input.resource_type;
let inner_96 = inner_96.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
if inner_96.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_96),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ResetResourceLogLevelInput,
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("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ResetResourceLogLevel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ResetResourceLogLevel",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::reset_resource_log_level_input::Builder {
crate::input::reset_resource_log_level_input::Builder::default()
}
}
pub mod send_data_to_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) payload_data: std::option::Option<std::string::String>,
pub(crate) wireless_metadata: std::option::Option<crate::model::MulticastWirelessMetadata>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn payload_data(mut self, input: impl Into<std::string::String>) -> Self {
self.payload_data = Some(input.into());
self
}
pub fn set_payload_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.payload_data = input;
self
}
pub fn wireless_metadata(mut self, input: crate::model::MulticastWirelessMetadata) -> Self {
self.wireless_metadata = Some(input);
self
}
pub fn set_wireless_metadata(
mut self,
input: std::option::Option<crate::model::MulticastWirelessMetadata>,
) -> Self {
self.wireless_metadata = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::SendDataToMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SendDataToMulticastGroupInput {
id: self.id,
payload_data: self.payload_data,
wireless_metadata: self.wireless_metadata,
})
}
}
}
impl SendDataToMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::SendDataToMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::SendDataToMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_97 = &_input.id;
let input_97 = input_97.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_97,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/data", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SendDataToMulticastGroupInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_send_data_to_multicast_group(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::SendDataToMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SendDataToMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::send_data_to_multicast_group_input::Builder {
crate::input::send_data_to_multicast_group_input::Builder::default()
}
}
pub mod send_data_to_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) transmit_mode: std::option::Option<i32>,
pub(crate) payload_data: std::option::Option<std::string::String>,
pub(crate) wireless_metadata: std::option::Option<crate::model::WirelessMetadata>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn transmit_mode(mut self, input: i32) -> Self {
self.transmit_mode = Some(input);
self
}
pub fn set_transmit_mode(mut self, input: std::option::Option<i32>) -> Self {
self.transmit_mode = input;
self
}
pub fn payload_data(mut self, input: impl Into<std::string::String>) -> Self {
self.payload_data = Some(input.into());
self
}
pub fn set_payload_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.payload_data = input;
self
}
pub fn wireless_metadata(mut self, input: crate::model::WirelessMetadata) -> Self {
self.wireless_metadata = Some(input);
self
}
pub fn set_wireless_metadata(
mut self,
input: std::option::Option<crate::model::WirelessMetadata>,
) -> Self {
self.wireless_metadata = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::SendDataToWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SendDataToWirelessDeviceInput {
id: self.id,
transmit_mode: self.transmit_mode,
payload_data: self.payload_data,
wireless_metadata: self.wireless_metadata,
})
}
}
}
impl SendDataToWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::SendDataToWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::SendDataToWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_98 = &_input.id;
let input_98 = input_98.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_98,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/data", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SendDataToWirelessDeviceInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_send_data_to_wireless_device(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::SendDataToWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SendDataToWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::send_data_to_wireless_device_input::Builder {
crate::input::send_data_to_wireless_device_input::Builder::default()
}
}
pub mod start_bulk_associate_wireless_device_with_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) query_string: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.query_string = Some(input.into());
self
}
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_string = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartBulkAssociateWirelessDeviceWithMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::StartBulkAssociateWirelessDeviceWithMulticastGroupInput {
id: self.id,
query_string: self.query_string,
tags: self.tags,
},
)
}
}
}
impl StartBulkAssociateWirelessDeviceWithMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartBulkAssociateWirelessDeviceWithMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartBulkAssociateWirelessDeviceWithMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_99 = &_input.id;
let input_99 = input_99.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_99,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/bulk", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartBulkAssociateWirelessDeviceWithMulticastGroupInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_bulk_associate_wireless_device_with_multicast_group(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartBulkAssociateWirelessDeviceWithMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartBulkAssociateWirelessDeviceWithMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::start_bulk_associate_wireless_device_with_multicast_group_input::Builder
{
crate::input::start_bulk_associate_wireless_device_with_multicast_group_input::Builder::default()
}
}
pub mod start_bulk_disassociate_wireless_device_from_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) query_string: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.query_string = Some(input.into());
self
}
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_string = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
id: self.id,
query_string: self.query_string,
tags: self.tags,
},
)
}
}
}
impl StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartBulkDisassociateWirelessDeviceFromMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_100 = &_input.id;
let input_100 = input_100.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_100,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/bulk", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartBulkDisassociateWirelessDeviceFromMulticastGroupInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_bulk_disassociate_wireless_device_from_multicast_group(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartBulkDisassociateWirelessDeviceFromMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartBulkDisassociateWirelessDeviceFromMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::start_bulk_disassociate_wireless_device_from_multicast_group_input::Builder
{
crate::input::start_bulk_disassociate_wireless_device_from_multicast_group_input::Builder::default()
}
}
pub mod start_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanStartFuotaTask>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanStartFuotaTask) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanStartFuotaTask>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn build(
self,
) -> Result<crate::input::StartFuotaTaskInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::StartFuotaTaskInput {
id: self.id,
lo_ra_wan: self.lo_ra_wan,
})
}
}
}
impl StartFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_101 = &_input.id;
let input_101 = input_101.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_101,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}", Id = id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartFuotaTaskInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_fuota_task(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_fuota_task_input::Builder {
crate::input::start_fuota_task_input::Builder::default()
}
}
pub mod start_multicast_group_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticastSession>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanMulticastSession) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanMulticastSession>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartMulticastGroupSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartMulticastGroupSessionInput {
id: self.id,
lo_ra_wan: self.lo_ra_wan,
})
}
}
}
impl StartMulticastGroupSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartMulticastGroupSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartMulticastGroupSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_102 = &_input.id;
let input_102 = input_102.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_102,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}/session", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartMulticastGroupSessionInput,
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)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_multicast_group_session(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartMulticastGroupSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartMulticastGroupSession",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_multicast_group_session_input::Builder {
crate::input::start_multicast_group_session_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/tags").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::TagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_103 = &_input.resource_arn;
let inner_103 = inner_103.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
if inner_103.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_103),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
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("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod test_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::TestWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::TestWirelessDeviceInput { id: self.id })
}
}
}
impl TestWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TestWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TestWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_104 = &_input.id;
let input_104 = input_104.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_104,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}/test", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TestWirelessDeviceInput,
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)?;
Ok(builder.method("POST").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TestWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TestWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::test_wireless_device_input::Builder {
crate::input::test_wireless_device_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/tags").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_105 = &_input.resource_arn;
let inner_105 = inner_105.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
if inner_105.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_105),
);
let inner_106 = &_input.tag_keys;
let inner_106 = inner_106.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"tag_keys",
"cannot be empty or unset",
)
})?;
for inner_107 in inner_106 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_107));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
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("DELETE").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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) expression_type: std::option::Option<crate::model::ExpressionType>,
pub(crate) expression: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn expression_type(mut self, input: crate::model::ExpressionType) -> Self {
self.expression_type = Some(input);
self
}
pub fn set_expression_type(
mut self,
input: std::option::Option<crate::model::ExpressionType>,
) -> Self {
self.expression_type = input;
self
}
pub fn expression(mut self, input: impl Into<std::string::String>) -> Self {
self.expression = Some(input.into());
self
}
pub fn set_expression(mut self, input: std::option::Option<std::string::String>) -> Self {
self.expression = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateDestinationInput {
name: self.name,
expression_type: self.expression_type,
expression: self.expression,
description: self.description,
role_arn: self.role_arn,
})
}
}
}
impl UpdateDestinationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDestination,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_108 = &_input.name;
let input_108 = input_108.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
)
})?;
let name = aws_smithy_http::label::fmt_string(
input_108,
aws_smithy_http::label::EncodingStrategy::Default,
);
if name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"name",
"cannot be empty or unset",
),
);
}
write!(output, "/destinations/{Name}", Name = name)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDestinationInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_destination(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDestination",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_destination_input::Builder {
crate::input::update_destination_input::Builder::default()
}
}
pub mod update_event_configuration_by_resource_types_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) device_registration_state: std::option::Option<
crate::model::DeviceRegistrationStateResourceTypeEventConfiguration,
>,
pub(crate) proximity:
std::option::Option<crate::model::ProximityResourceTypeEventConfiguration>,
pub(crate) join: std::option::Option<crate::model::JoinResourceTypeEventConfiguration>,
pub(crate) connection_status:
std::option::Option<crate::model::ConnectionStatusResourceTypeEventConfiguration>,
pub(crate) message_delivery_status:
std::option::Option<crate::model::MessageDeliveryStatusResourceTypeEventConfiguration>,
}
impl Builder {
pub fn device_registration_state(
mut self,
input: crate::model::DeviceRegistrationStateResourceTypeEventConfiguration,
) -> Self {
self.device_registration_state = Some(input);
self
}
pub fn set_device_registration_state(
mut self,
input: std::option::Option<
crate::model::DeviceRegistrationStateResourceTypeEventConfiguration,
>,
) -> Self {
self.device_registration_state = input;
self
}
pub fn proximity(
mut self,
input: crate::model::ProximityResourceTypeEventConfiguration,
) -> Self {
self.proximity = Some(input);
self
}
pub fn set_proximity(
mut self,
input: std::option::Option<crate::model::ProximityResourceTypeEventConfiguration>,
) -> Self {
self.proximity = input;
self
}
pub fn join(mut self, input: crate::model::JoinResourceTypeEventConfiguration) -> Self {
self.join = Some(input);
self
}
pub fn set_join(
mut self,
input: std::option::Option<crate::model::JoinResourceTypeEventConfiguration>,
) -> Self {
self.join = input;
self
}
pub fn connection_status(
mut self,
input: crate::model::ConnectionStatusResourceTypeEventConfiguration,
) -> Self {
self.connection_status = Some(input);
self
}
pub fn set_connection_status(
mut self,
input: std::option::Option<
crate::model::ConnectionStatusResourceTypeEventConfiguration,
>,
) -> Self {
self.connection_status = input;
self
}
pub fn message_delivery_status(
mut self,
input: crate::model::MessageDeliveryStatusResourceTypeEventConfiguration,
) -> Self {
self.message_delivery_status = Some(input);
self
}
pub fn set_message_delivery_status(
mut self,
input: std::option::Option<
crate::model::MessageDeliveryStatusResourceTypeEventConfiguration,
>,
) -> Self {
self.message_delivery_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateEventConfigurationByResourceTypesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateEventConfigurationByResourceTypesInput {
device_registration_state: self.device_registration_state,
proximity: self.proximity,
join: self.join,
connection_status: self.connection_status,
message_delivery_status: self.message_delivery_status,
})
}
}
}
impl UpdateEventConfigurationByResourceTypesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateEventConfigurationByResourceTypes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateEventConfigurationByResourceTypesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/event-configurations-resource-types")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateEventConfigurationByResourceTypesInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_event_configuration_by_resource_types(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateEventConfigurationByResourceTypes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEventConfigurationByResourceTypes",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_event_configuration_by_resource_types_input::Builder {
crate::input::update_event_configuration_by_resource_types_input::Builder::default()
}
}
pub mod update_fuota_task_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanFuotaTask>,
pub(crate) firmware_update_image: std::option::Option<std::string::String>,
pub(crate) firmware_update_role: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanFuotaTask) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanFuotaTask>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn firmware_update_image(mut self, input: impl Into<std::string::String>) -> Self {
self.firmware_update_image = Some(input.into());
self
}
pub fn set_firmware_update_image(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.firmware_update_image = input;
self
}
pub fn firmware_update_role(mut self, input: impl Into<std::string::String>) -> Self {
self.firmware_update_role = Some(input.into());
self
}
pub fn set_firmware_update_role(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.firmware_update_role = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateFuotaTaskInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateFuotaTaskInput {
id: self.id,
name: self.name,
description: self.description,
lo_ra_wan: self.lo_ra_wan,
firmware_update_image: self.firmware_update_image,
firmware_update_role: self.firmware_update_role,
})
}
}
}
impl UpdateFuotaTaskInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateFuotaTask,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateFuotaTaskInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_109 = &_input.id;
let input_109 = input_109.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_109,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/fuota-tasks/{Id}", Id = id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateFuotaTaskInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_fuota_task(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateFuotaTask::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateFuotaTask",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_fuota_task_input::Builder {
crate::input::update_fuota_task_input::Builder::default()
}
}
pub mod update_log_levels_by_resource_types_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) default_log_level: std::option::Option<crate::model::LogLevel>,
pub(crate) wireless_device_log_options:
std::option::Option<std::vec::Vec<crate::model::WirelessDeviceLogOption>>,
pub(crate) wireless_gateway_log_options:
std::option::Option<std::vec::Vec<crate::model::WirelessGatewayLogOption>>,
}
impl Builder {
pub fn default_log_level(mut self, input: crate::model::LogLevel) -> Self {
self.default_log_level = Some(input);
self
}
pub fn set_default_log_level(
mut self,
input: std::option::Option<crate::model::LogLevel>,
) -> Self {
self.default_log_level = input;
self
}
pub fn wireless_device_log_options(
mut self,
input: crate::model::WirelessDeviceLogOption,
) -> Self {
let mut v = self.wireless_device_log_options.unwrap_or_default();
v.push(input);
self.wireless_device_log_options = Some(v);
self
}
pub fn set_wireless_device_log_options(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::WirelessDeviceLogOption>>,
) -> Self {
self.wireless_device_log_options = input;
self
}
pub fn wireless_gateway_log_options(
mut self,
input: crate::model::WirelessGatewayLogOption,
) -> Self {
let mut v = self.wireless_gateway_log_options.unwrap_or_default();
v.push(input);
self.wireless_gateway_log_options = Some(v);
self
}
pub fn set_wireless_gateway_log_options(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::WirelessGatewayLogOption>>,
) -> Self {
self.wireless_gateway_log_options = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLogLevelsByResourceTypesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLogLevelsByResourceTypesInput {
default_log_level: self.default_log_level,
wireless_device_log_options: self.wireless_device_log_options,
wireless_gateway_log_options: self.wireless_gateway_log_options,
})
}
}
}
impl UpdateLogLevelsByResourceTypesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateLogLevelsByResourceTypes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLogLevelsByResourceTypesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/log-levels").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLogLevelsByResourceTypesInput,
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)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_log_levels_by_resource_types(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateLogLevelsByResourceTypes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLogLevelsByResourceTypes",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_log_levels_by_resource_types_input::Builder {
crate::input::update_log_levels_by_resource_types_input::Builder::default()
}
}
pub mod update_multicast_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticast>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanMulticast) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanMulticast>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateMulticastGroupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateMulticastGroupInput {
id: self.id,
name: self.name,
description: self.description,
lo_ra_wan: self.lo_ra_wan,
})
}
}
}
impl UpdateMulticastGroupInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateMulticastGroup,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateMulticastGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_110 = &_input.id;
let input_110 = input_110.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_110,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/multicast-groups/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateMulticastGroupInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_multicast_group(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateMulticastGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateMulticastGroup",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_multicast_group_input::Builder {
crate::input::update_multicast_group_input::Builder::default()
}
}
pub mod update_network_analyzer_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_name: std::option::Option<std::string::String>,
pub(crate) trace_content: std::option::Option<crate::model::TraceContent>,
pub(crate) wireless_devices_to_add: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) wireless_devices_to_remove:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) wireless_gateways_to_add:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) wireless_gateways_to_remove:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_name = Some(input.into());
self
}
pub fn set_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_name = input;
self
}
pub fn trace_content(mut self, input: crate::model::TraceContent) -> Self {
self.trace_content = Some(input);
self
}
pub fn set_trace_content(
mut self,
input: std::option::Option<crate::model::TraceContent>,
) -> Self {
self.trace_content = input;
self
}
pub fn wireless_devices_to_add(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.wireless_devices_to_add.unwrap_or_default();
v.push(input.into());
self.wireless_devices_to_add = Some(v);
self
}
pub fn set_wireless_devices_to_add(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_devices_to_add = input;
self
}
pub fn wireless_devices_to_remove(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.wireless_devices_to_remove.unwrap_or_default();
v.push(input.into());
self.wireless_devices_to_remove = Some(v);
self
}
pub fn set_wireless_devices_to_remove(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_devices_to_remove = input;
self
}
pub fn wireless_gateways_to_add(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.wireless_gateways_to_add.unwrap_or_default();
v.push(input.into());
self.wireless_gateways_to_add = Some(v);
self
}
pub fn set_wireless_gateways_to_add(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_gateways_to_add = input;
self
}
pub fn wireless_gateways_to_remove(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.wireless_gateways_to_remove.unwrap_or_default();
v.push(input.into());
self.wireless_gateways_to_remove = Some(v);
self
}
pub fn set_wireless_gateways_to_remove(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.wireless_gateways_to_remove = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateNetworkAnalyzerConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateNetworkAnalyzerConfigurationInput {
configuration_name: self.configuration_name,
trace_content: self.trace_content,
wireless_devices_to_add: self.wireless_devices_to_add,
wireless_devices_to_remove: self.wireless_devices_to_remove,
wireless_gateways_to_add: self.wireless_gateways_to_add,
wireless_gateways_to_remove: self.wireless_gateways_to_remove,
description: self.description,
})
}
}
}
impl UpdateNetworkAnalyzerConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateNetworkAnalyzerConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateNetworkAnalyzerConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_111 = &_input.configuration_name;
let input_111 = input_111.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
)
})?;
let configuration_name = aws_smithy_http::label::fmt_string(
input_111,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/network-analyzer-configurations/{ConfigurationName}",
ConfigurationName = configuration_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateNetworkAnalyzerConfigurationInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_network_analyzer_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateNetworkAnalyzerConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateNetworkAnalyzerConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_network_analyzer_configuration_input::Builder {
crate::input::update_network_analyzer_configuration_input::Builder::default()
}
}
pub mod update_partner_account_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) sidewalk: std::option::Option<crate::model::SidewalkUpdateAccount>,
pub(crate) partner_account_id: std::option::Option<std::string::String>,
pub(crate) partner_type: std::option::Option<crate::model::PartnerType>,
}
impl Builder {
pub fn sidewalk(mut self, input: crate::model::SidewalkUpdateAccount) -> Self {
self.sidewalk = Some(input);
self
}
pub fn set_sidewalk(
mut self,
input: std::option::Option<crate::model::SidewalkUpdateAccount>,
) -> Self {
self.sidewalk = input;
self
}
pub fn partner_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.partner_account_id = Some(input.into());
self
}
pub fn set_partner_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.partner_account_id = input;
self
}
pub fn partner_type(mut self, input: crate::model::PartnerType) -> Self {
self.partner_type = Some(input);
self
}
pub fn set_partner_type(
mut self,
input: std::option::Option<crate::model::PartnerType>,
) -> Self {
self.partner_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdatePartnerAccountInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdatePartnerAccountInput {
sidewalk: self.sidewalk,
partner_account_id: self.partner_account_id,
partner_type: self.partner_type,
})
}
}
}
impl UpdatePartnerAccountInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePartnerAccount,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePartnerAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_112 = &_input.partner_account_id;
let input_112 = input_112.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
)
})?;
let partner_account_id = aws_smithy_http::label::fmt_string(
input_112,
aws_smithy_http::label::EncodingStrategy::Default,
);
if partner_account_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_account_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/partner-accounts/{PartnerAccountId}",
PartnerAccountId = partner_account_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UpdatePartnerAccountInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_113 = &_input.partner_type;
let inner_113 = inner_113.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"partner_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"partnerType",
&aws_smithy_http::query::fmt_string(&inner_113),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePartnerAccountInput,
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("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_partner_account(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePartnerAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePartnerAccount",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_partner_account_input::Builder {
crate::input::update_partner_account_input::Builder::default()
}
}
pub mod update_position_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
pub(crate) position: std::option::Option<std::vec::Vec<f32>>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn position(mut self, input: f32) -> Self {
let mut v = self.position.unwrap_or_default();
v.push(input);
self.position = Some(v);
self
}
pub fn set_position(mut self, input: std::option::Option<std::vec::Vec<f32>>) -> Self {
self.position = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdatePositionInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdatePositionInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
position: self.position,
})
}
}
}
impl UpdatePositionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdatePosition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdatePositionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_114 = &_input.resource_identifier;
let input_114 = input_114.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_114,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/positions/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UpdatePositionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_115 = &_input.resource_type;
let inner_115 = inner_115.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_115),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdatePositionInput,
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("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_position(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdatePosition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdatePosition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_position_input::Builder {
crate::input::update_position_input::Builder::default()
}
}
pub mod update_resource_event_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) identifier_type: std::option::Option<crate::model::IdentifierType>,
pub(crate) partner_type: std::option::Option<crate::model::EventNotificationPartnerType>,
pub(crate) device_registration_state:
std::option::Option<crate::model::DeviceRegistrationStateEventConfiguration>,
pub(crate) proximity: std::option::Option<crate::model::ProximityEventConfiguration>,
pub(crate) join: std::option::Option<crate::model::JoinEventConfiguration>,
pub(crate) connection_status:
std::option::Option<crate::model::ConnectionStatusEventConfiguration>,
pub(crate) message_delivery_status:
std::option::Option<crate::model::MessageDeliveryStatusEventConfiguration>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn identifier_type(mut self, input: crate::model::IdentifierType) -> Self {
self.identifier_type = Some(input);
self
}
pub fn set_identifier_type(
mut self,
input: std::option::Option<crate::model::IdentifierType>,
) -> Self {
self.identifier_type = input;
self
}
pub fn partner_type(mut self, input: crate::model::EventNotificationPartnerType) -> Self {
self.partner_type = Some(input);
self
}
pub fn set_partner_type(
mut self,
input: std::option::Option<crate::model::EventNotificationPartnerType>,
) -> Self {
self.partner_type = input;
self
}
pub fn device_registration_state(
mut self,
input: crate::model::DeviceRegistrationStateEventConfiguration,
) -> Self {
self.device_registration_state = Some(input);
self
}
pub fn set_device_registration_state(
mut self,
input: std::option::Option<crate::model::DeviceRegistrationStateEventConfiguration>,
) -> Self {
self.device_registration_state = input;
self
}
pub fn proximity(mut self, input: crate::model::ProximityEventConfiguration) -> Self {
self.proximity = Some(input);
self
}
pub fn set_proximity(
mut self,
input: std::option::Option<crate::model::ProximityEventConfiguration>,
) -> Self {
self.proximity = input;
self
}
pub fn join(mut self, input: crate::model::JoinEventConfiguration) -> Self {
self.join = Some(input);
self
}
pub fn set_join(
mut self,
input: std::option::Option<crate::model::JoinEventConfiguration>,
) -> Self {
self.join = input;
self
}
pub fn connection_status(
mut self,
input: crate::model::ConnectionStatusEventConfiguration,
) -> Self {
self.connection_status = Some(input);
self
}
pub fn set_connection_status(
mut self,
input: std::option::Option<crate::model::ConnectionStatusEventConfiguration>,
) -> Self {
self.connection_status = input;
self
}
pub fn message_delivery_status(
mut self,
input: crate::model::MessageDeliveryStatusEventConfiguration,
) -> Self {
self.message_delivery_status = Some(input);
self
}
pub fn set_message_delivery_status(
mut self,
input: std::option::Option<crate::model::MessageDeliveryStatusEventConfiguration>,
) -> Self {
self.message_delivery_status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateResourceEventConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateResourceEventConfigurationInput {
identifier: self.identifier,
identifier_type: self.identifier_type,
partner_type: self.partner_type,
device_registration_state: self.device_registration_state,
proximity: self.proximity,
join: self.join,
connection_status: self.connection_status,
message_delivery_status: self.message_delivery_status,
})
}
}
}
impl UpdateResourceEventConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateResourceEventConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateResourceEventConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_116 = &_input.identifier;
let input_116 = input_116.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
)
})?;
let identifier = aws_smithy_http::label::fmt_string(
input_116,
aws_smithy_http::label::EncodingStrategy::Default,
);
if identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/event-configurations/{Identifier}",
Identifier = identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UpdateResourceEventConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_117 = &_input.identifier_type;
let inner_117 = inner_117.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"identifier_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"identifierType",
&aws_smithy_http::query::fmt_string(&inner_117),
);
if let Some(inner_118) = &_input.partner_type {
{
query.push_kv(
"partnerType",
&aws_smithy_http::query::fmt_string(&inner_118),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateResourceEventConfigurationInput,
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("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_resource_event_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateResourceEventConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateResourceEventConfiguration",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_resource_event_configuration_input::Builder {
crate::input::update_resource_event_configuration_input::Builder::default()
}
}
pub mod update_resource_position_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_identifier: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::PositionResourceType>,
pub(crate) geo_json_payload: std::option::Option<aws_smithy_types::Blob>,
}
impl Builder {
pub fn resource_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_identifier = Some(input.into());
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn resource_type(mut self, input: crate::model::PositionResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::PositionResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn geo_json_payload(mut self, input: aws_smithy_types::Blob) -> Self {
self.geo_json_payload = Some(input);
self
}
pub fn set_geo_json_payload(
mut self,
input: std::option::Option<aws_smithy_types::Blob>,
) -> Self {
self.geo_json_payload = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateResourcePositionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateResourcePositionInput {
resource_identifier: self.resource_identifier,
resource_type: self.resource_type,
geo_json_payload: self.geo_json_payload,
})
}
}
}
impl UpdateResourcePositionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateResourcePosition,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateResourcePositionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_119 = &_input.resource_identifier;
let input_119 = input_119.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
)
})?;
let resource_identifier = aws_smithy_http::label::fmt_string(
input_119,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_identifier.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_identifier",
"cannot be empty or unset",
),
);
}
write!(
output,
"/resource-positions/{ResourceIdentifier}",
ResourceIdentifier = resource_identifier
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UpdateResourcePositionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_120 = &_input.resource_type;
let inner_120 = inner_120.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_120),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateResourcePositionInput,
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("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/octet-stream",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_payload_update_resource_position_input(
self.geo_json_payload,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateResourcePosition::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateResourcePosition",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_resource_position_input::Builder {
crate::input::update_resource_position_input::Builder::default()
}
}
pub mod update_wireless_device_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) lo_ra_wan: std::option::Option<crate::model::LoRaWanUpdateDevice>,
pub(crate) positioning: std::option::Option<crate::model::PositioningConfigStatus>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
pub fn set_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_name = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn lo_ra_wan(mut self, input: crate::model::LoRaWanUpdateDevice) -> Self {
self.lo_ra_wan = Some(input);
self
}
pub fn set_lo_ra_wan(
mut self,
input: std::option::Option<crate::model::LoRaWanUpdateDevice>,
) -> Self {
self.lo_ra_wan = input;
self
}
pub fn positioning(mut self, input: crate::model::PositioningConfigStatus) -> Self {
self.positioning = Some(input);
self
}
pub fn set_positioning(
mut self,
input: std::option::Option<crate::model::PositioningConfigStatus>,
) -> Self {
self.positioning = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateWirelessDeviceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateWirelessDeviceInput {
id: self.id,
destination_name: self.destination_name,
name: self.name,
description: self.description,
lo_ra_wan: self.lo_ra_wan,
positioning: self.positioning,
})
}
}
}
impl UpdateWirelessDeviceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateWirelessDevice,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateWirelessDeviceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_121 = &_input.id;
let input_121 = input_121.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_121,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-devices/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateWirelessDeviceInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_wireless_device(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateWirelessDevice::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateWirelessDevice",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_wireless_device_input::Builder {
crate::input::update_wireless_device_input::Builder::default()
}
}
pub mod update_wireless_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) join_eui_filters:
std::option::Option<std::vec::Vec<std::vec::Vec<std::string::String>>>,
pub(crate) net_id_filters: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn join_eui_filters(mut self, input: std::vec::Vec<std::string::String>) -> Self {
let mut v = self.join_eui_filters.unwrap_or_default();
v.push(input);
self.join_eui_filters = Some(v);
self
}
pub fn set_join_eui_filters(
mut self,
input: std::option::Option<std::vec::Vec<std::vec::Vec<std::string::String>>>,
) -> Self {
self.join_eui_filters = input;
self
}
pub fn net_id_filters(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.net_id_filters.unwrap_or_default();
v.push(input.into());
self.net_id_filters = Some(v);
self
}
pub fn set_net_id_filters(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.net_id_filters = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateWirelessGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateWirelessGatewayInput {
id: self.id,
name: self.name,
description: self.description,
join_eui_filters: self.join_eui_filters,
net_id_filters: self.net_id_filters,
})
}
}
}
impl UpdateWirelessGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateWirelessGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateWirelessGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_122 = &_input.id;
let input_122 = input_122.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
)
})?;
let id = aws_smithy_http::label::fmt_string(
input_122,
aws_smithy_http::label::EncodingStrategy::Default,
);
if id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"id",
"cannot be empty or unset",
),
);
}
write!(output, "/wireless-gateways/{Id}", Id = id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateWirelessGatewayInput,
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)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_wireless_gateway(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
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(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
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()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateWirelessGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateWirelessGateway",
"iotwireless",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_wireless_gateway_input::Builder {
crate::input::update_wireless_gateway_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateWirelessGatewayInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub join_eui_filters: std::option::Option<std::vec::Vec<std::vec::Vec<std::string::String>>>,
#[doc(hidden)]
pub net_id_filters: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateWirelessGatewayInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn join_eui_filters(&self) -> std::option::Option<&[std::vec::Vec<std::string::String>]> {
self.join_eui_filters.as_deref()
}
pub fn net_id_filters(&self) -> std::option::Option<&[std::string::String]> {
self.net_id_filters.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateWirelessDeviceInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub destination_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanUpdateDevice>,
#[doc(hidden)]
pub positioning: std::option::Option<crate::model::PositioningConfigStatus>,
}
impl UpdateWirelessDeviceInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanUpdateDevice> {
self.lo_ra_wan.as_ref()
}
pub fn positioning(&self) -> std::option::Option<&crate::model::PositioningConfigStatus> {
self.positioning.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateResourcePositionInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
#[doc(hidden)]
pub geo_json_payload: std::option::Option<aws_smithy_types::Blob>,
}
impl UpdateResourcePositionInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
pub fn geo_json_payload(&self) -> std::option::Option<&aws_smithy_types::Blob> {
self.geo_json_payload.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateResourceEventConfigurationInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identifier_type: std::option::Option<crate::model::IdentifierType>,
#[doc(hidden)]
pub partner_type: std::option::Option<crate::model::EventNotificationPartnerType>,
#[doc(hidden)]
pub device_registration_state:
std::option::Option<crate::model::DeviceRegistrationStateEventConfiguration>,
#[doc(hidden)]
pub proximity: std::option::Option<crate::model::ProximityEventConfiguration>,
#[doc(hidden)]
pub join: std::option::Option<crate::model::JoinEventConfiguration>,
#[doc(hidden)]
pub connection_status: std::option::Option<crate::model::ConnectionStatusEventConfiguration>,
#[doc(hidden)]
pub message_delivery_status:
std::option::Option<crate::model::MessageDeliveryStatusEventConfiguration>,
}
impl UpdateResourceEventConfigurationInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn identifier_type(&self) -> std::option::Option<&crate::model::IdentifierType> {
self.identifier_type.as_ref()
}
pub fn partner_type(&self) -> std::option::Option<&crate::model::EventNotificationPartnerType> {
self.partner_type.as_ref()
}
pub fn device_registration_state(
&self,
) -> std::option::Option<&crate::model::DeviceRegistrationStateEventConfiguration> {
self.device_registration_state.as_ref()
}
pub fn proximity(&self) -> std::option::Option<&crate::model::ProximityEventConfiguration> {
self.proximity.as_ref()
}
pub fn join(&self) -> std::option::Option<&crate::model::JoinEventConfiguration> {
self.join.as_ref()
}
pub fn connection_status(
&self,
) -> std::option::Option<&crate::model::ConnectionStatusEventConfiguration> {
self.connection_status.as_ref()
}
pub fn message_delivery_status(
&self,
) -> std::option::Option<&crate::model::MessageDeliveryStatusEventConfiguration> {
self.message_delivery_status.as_ref()
}
}
#[allow(missing_docs)] #[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdatePositionInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
#[doc(hidden)]
pub position: std::option::Option<std::vec::Vec<f32>>,
}
impl UpdatePositionInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
pub fn position(&self) -> std::option::Option<&[f32]> {
self.position.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdatePartnerAccountInput {
#[doc(hidden)]
pub sidewalk: std::option::Option<crate::model::SidewalkUpdateAccount>,
#[doc(hidden)]
pub partner_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub partner_type: std::option::Option<crate::model::PartnerType>,
}
impl UpdatePartnerAccountInput {
pub fn sidewalk(&self) -> std::option::Option<&crate::model::SidewalkUpdateAccount> {
self.sidewalk.as_ref()
}
pub fn partner_account_id(&self) -> std::option::Option<&str> {
self.partner_account_id.as_deref()
}
pub fn partner_type(&self) -> std::option::Option<&crate::model::PartnerType> {
self.partner_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateNetworkAnalyzerConfigurationInput {
#[doc(hidden)]
pub configuration_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub trace_content: std::option::Option<crate::model::TraceContent>,
#[doc(hidden)]
pub wireless_devices_to_add: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub wireless_devices_to_remove: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub wireless_gateways_to_add: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub wireless_gateways_to_remove: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateNetworkAnalyzerConfigurationInput {
pub fn configuration_name(&self) -> std::option::Option<&str> {
self.configuration_name.as_deref()
}
pub fn trace_content(&self) -> std::option::Option<&crate::model::TraceContent> {
self.trace_content.as_ref()
}
pub fn wireless_devices_to_add(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_devices_to_add.as_deref()
}
pub fn wireless_devices_to_remove(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_devices_to_remove.as_deref()
}
pub fn wireless_gateways_to_add(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_gateways_to_add.as_deref()
}
pub fn wireless_gateways_to_remove(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_gateways_to_remove.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticast>,
}
impl UpdateMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanMulticast> {
self.lo_ra_wan.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLogLevelsByResourceTypesInput {
#[doc(hidden)]
pub default_log_level: std::option::Option<crate::model::LogLevel>,
#[doc(hidden)]
pub wireless_device_log_options:
std::option::Option<std::vec::Vec<crate::model::WirelessDeviceLogOption>>,
#[doc(hidden)]
pub wireless_gateway_log_options:
std::option::Option<std::vec::Vec<crate::model::WirelessGatewayLogOption>>,
}
impl UpdateLogLevelsByResourceTypesInput {
pub fn default_log_level(&self) -> std::option::Option<&crate::model::LogLevel> {
self.default_log_level.as_ref()
}
pub fn wireless_device_log_options(
&self,
) -> std::option::Option<&[crate::model::WirelessDeviceLogOption]> {
self.wireless_device_log_options.as_deref()
}
pub fn wireless_gateway_log_options(
&self,
) -> std::option::Option<&[crate::model::WirelessGatewayLogOption]> {
self.wireless_gateway_log_options.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanFuotaTask>,
#[doc(hidden)]
pub firmware_update_image: std::option::Option<std::string::String>,
#[doc(hidden)]
pub firmware_update_role: std::option::Option<std::string::String>,
}
impl UpdateFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanFuotaTask> {
self.lo_ra_wan.as_ref()
}
pub fn firmware_update_image(&self) -> std::option::Option<&str> {
self.firmware_update_image.as_deref()
}
pub fn firmware_update_role(&self) -> std::option::Option<&str> {
self.firmware_update_role.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateEventConfigurationByResourceTypesInput {
#[doc(hidden)]
pub device_registration_state:
std::option::Option<crate::model::DeviceRegistrationStateResourceTypeEventConfiguration>,
#[doc(hidden)]
pub proximity: std::option::Option<crate::model::ProximityResourceTypeEventConfiguration>,
#[doc(hidden)]
pub join: std::option::Option<crate::model::JoinResourceTypeEventConfiguration>,
#[doc(hidden)]
pub connection_status:
std::option::Option<crate::model::ConnectionStatusResourceTypeEventConfiguration>,
#[doc(hidden)]
pub message_delivery_status:
std::option::Option<crate::model::MessageDeliveryStatusResourceTypeEventConfiguration>,
}
impl UpdateEventConfigurationByResourceTypesInput {
pub fn device_registration_state(
&self,
) -> std::option::Option<&crate::model::DeviceRegistrationStateResourceTypeEventConfiguration>
{
self.device_registration_state.as_ref()
}
pub fn proximity(
&self,
) -> std::option::Option<&crate::model::ProximityResourceTypeEventConfiguration> {
self.proximity.as_ref()
}
pub fn join(&self) -> std::option::Option<&crate::model::JoinResourceTypeEventConfiguration> {
self.join.as_ref()
}
pub fn connection_status(
&self,
) -> std::option::Option<&crate::model::ConnectionStatusResourceTypeEventConfiguration> {
self.connection_status.as_ref()
}
pub fn message_delivery_status(
&self,
) -> std::option::Option<&crate::model::MessageDeliveryStatusResourceTypeEventConfiguration>
{
self.message_delivery_status.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateDestinationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expression_type: std::option::Option<crate::model::ExpressionType>,
#[doc(hidden)]
pub expression: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
}
impl UpdateDestinationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn expression_type(&self) -> std::option::Option<&crate::model::ExpressionType> {
self.expression_type.as_ref()
}
pub fn expression(&self) -> std::option::Option<&str> {
self.expression.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TestWirelessDeviceInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl TestWirelessDeviceInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartMulticastGroupSessionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticastSession>,
}
impl StartMulticastGroupSessionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanMulticastSession> {
self.lo_ra_wan.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanStartFuotaTask>,
}
impl StartFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanStartFuotaTask> {
self.lo_ra_wan.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub query_string: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartBulkDisassociateWirelessDeviceFromMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn query_string(&self) -> std::option::Option<&str> {
self.query_string.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartBulkAssociateWirelessDeviceWithMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub query_string: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartBulkAssociateWirelessDeviceWithMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn query_string(&self) -> std::option::Option<&str> {
self.query_string.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendDataToWirelessDeviceInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub transmit_mode: std::option::Option<i32>,
#[doc(hidden)]
pub payload_data: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_metadata: std::option::Option<crate::model::WirelessMetadata>,
}
impl SendDataToWirelessDeviceInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn transmit_mode(&self) -> std::option::Option<i32> {
self.transmit_mode
}
pub fn payload_data(&self) -> std::option::Option<&str> {
self.payload_data.as_deref()
}
pub fn wireless_metadata(&self) -> std::option::Option<&crate::model::WirelessMetadata> {
self.wireless_metadata.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendDataToMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub payload_data: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_metadata: std::option::Option<crate::model::MulticastWirelessMetadata>,
}
impl SendDataToMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn payload_data(&self) -> std::option::Option<&str> {
self.payload_data.as_deref()
}
pub fn wireless_metadata(
&self,
) -> std::option::Option<&crate::model::MulticastWirelessMetadata> {
self.wireless_metadata.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResetResourceLogLevelInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResetResourceLogLevelInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResetAllResourceLogLevelsInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutResourceLogLevelInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub log_level: std::option::Option<crate::model::LogLevel>,
}
impl PutResourceLogLevelInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn log_level(&self) -> std::option::Option<&crate::model::LogLevel> {
self.log_level.as_ref()
}
}
#[allow(missing_docs)] #[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutPositionConfigurationInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
#[doc(hidden)]
pub solvers: std::option::Option<crate::model::PositionSolverConfigurations>,
#[doc(hidden)]
pub destination: std::option::Option<std::string::String>,
}
impl PutPositionConfigurationInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
pub fn solvers(&self) -> std::option::Option<&crate::model::PositionSolverConfigurations> {
self.solvers.as_ref()
}
pub fn destination(&self) -> std::option::Option<&str> {
self.destination.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListWirelessGatewayTaskDefinitionsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub task_definition_type: std::option::Option<crate::model::WirelessGatewayTaskDefinitionType>,
}
impl ListWirelessGatewayTaskDefinitionsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn task_definition_type(
&self,
) -> std::option::Option<&crate::model::WirelessGatewayTaskDefinitionType> {
self.task_definition_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListWirelessGatewaysInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListWirelessGatewaysInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListWirelessDevicesInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub destination_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub device_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
#[doc(hidden)]
pub fuota_task_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub multicast_group_id: std::option::Option<std::string::String>,
}
impl ListWirelessDevicesInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
pub fn device_profile_id(&self) -> std::option::Option<&str> {
self.device_profile_id.as_deref()
}
pub fn service_profile_id(&self) -> std::option::Option<&str> {
self.service_profile_id.as_deref()
}
pub fn wireless_device_type(&self) -> std::option::Option<&crate::model::WirelessDeviceType> {
self.wireless_device_type.as_ref()
}
pub fn fuota_task_id(&self) -> std::option::Option<&str> {
self.fuota_task_id.as_deref()
}
pub fn multicast_group_id(&self) -> std::option::Option<&str> {
self.multicast_group_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTagsForResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceProfilesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListServiceProfilesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListQueuedMessagesInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
}
impl ListQueuedMessagesInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn wireless_device_type(&self) -> std::option::Option<&crate::model::WirelessDeviceType> {
self.wireless_device_type.as_ref()
}
}
#[allow(missing_docs)] #[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListPositionConfigurationsInput {
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListPositionConfigurationsInput {
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListPartnerAccountsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListPartnerAccountsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListNetworkAnalyzerConfigurationsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListNetworkAnalyzerConfigurationsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListMulticastGroupsByFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListMulticastGroupsByFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListMulticastGroupsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListMulticastGroupsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListFuotaTasksInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListFuotaTasksInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEventConfigurationsInput {
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::EventNotificationResourceType>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListEventConfigurationsInput {
pub fn resource_type(
&self,
) -> std::option::Option<&crate::model::EventNotificationResourceType> {
self.resource_type.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListDeviceProfilesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListDeviceProfilesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListDestinationsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListDestinationsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayTaskDefinitionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetWirelessGatewayTaskDefinitionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetWirelessGatewayTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayStatisticsInput {
#[doc(hidden)]
pub wireless_gateway_id: std::option::Option<std::string::String>,
}
impl GetWirelessGatewayStatisticsInput {
pub fn wireless_gateway_id(&self) -> std::option::Option<&str> {
self.wireless_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayFirmwareInformationInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetWirelessGatewayFirmwareInformationInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayCertificateInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetWirelessGatewayCertificateInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessGatewayInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identifier_type: std::option::Option<crate::model::WirelessGatewayIdType>,
}
impl GetWirelessGatewayInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn identifier_type(&self) -> std::option::Option<&crate::model::WirelessGatewayIdType> {
self.identifier_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessDeviceStatisticsInput {
#[doc(hidden)]
pub wireless_device_id: std::option::Option<std::string::String>,
}
impl GetWirelessDeviceStatisticsInput {
pub fn wireless_device_id(&self) -> std::option::Option<&str> {
self.wireless_device_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetWirelessDeviceInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identifier_type: std::option::Option<crate::model::WirelessDeviceIdType>,
}
impl GetWirelessDeviceInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn identifier_type(&self) -> std::option::Option<&crate::model::WirelessDeviceIdType> {
self.identifier_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceProfileInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetServiceProfileInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceEndpointInput {
#[doc(hidden)]
pub service_type: std::option::Option<crate::model::WirelessGatewayServiceType>,
}
impl GetServiceEndpointInput {
pub fn service_type(&self) -> std::option::Option<&crate::model::WirelessGatewayServiceType> {
self.service_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourcePositionInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl GetResourcePositionInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourceLogLevelInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl GetResourceLogLevelInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourceEventConfigurationInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identifier_type: std::option::Option<crate::model::IdentifierType>,
#[doc(hidden)]
pub partner_type: std::option::Option<crate::model::EventNotificationPartnerType>,
}
impl GetResourceEventConfigurationInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn identifier_type(&self) -> std::option::Option<&crate::model::IdentifierType> {
self.identifier_type.as_ref()
}
pub fn partner_type(&self) -> std::option::Option<&crate::model::EventNotificationPartnerType> {
self.partner_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPositionEstimateInput {
#[doc(hidden)]
pub wi_fi_access_points: std::option::Option<std::vec::Vec<crate::model::WiFiAccessPoint>>,
#[doc(hidden)]
pub cell_towers: std::option::Option<crate::model::CellTowers>,
#[doc(hidden)]
pub ip: std::option::Option<crate::model::Ip>,
#[doc(hidden)]
pub gnss: std::option::Option<crate::model::Gnss>,
#[doc(hidden)]
pub timestamp: std::option::Option<aws_smithy_types::DateTime>,
}
impl GetPositionEstimateInput {
pub fn wi_fi_access_points(&self) -> std::option::Option<&[crate::model::WiFiAccessPoint]> {
self.wi_fi_access_points.as_deref()
}
pub fn cell_towers(&self) -> std::option::Option<&crate::model::CellTowers> {
self.cell_towers.as_ref()
}
pub fn ip(&self) -> std::option::Option<&crate::model::Ip> {
self.ip.as_ref()
}
pub fn gnss(&self) -> std::option::Option<&crate::model::Gnss> {
self.gnss.as_ref()
}
pub fn timestamp(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.timestamp.as_ref()
}
}
#[allow(missing_docs)] #[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPositionConfigurationInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl GetPositionConfigurationInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
}
#[allow(missing_docs)] #[deprecated(note = "This operation is no longer supported.")]
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPositionInput {
#[doc(hidden)]
pub resource_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::PositionResourceType>,
}
impl GetPositionInput {
pub fn resource_identifier(&self) -> std::option::Option<&str> {
self.resource_identifier.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::PositionResourceType> {
self.resource_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPartnerAccountInput {
#[doc(hidden)]
pub partner_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub partner_type: std::option::Option<crate::model::PartnerType>,
}
impl GetPartnerAccountInput {
pub fn partner_account_id(&self) -> std::option::Option<&str> {
self.partner_account_id.as_deref()
}
pub fn partner_type(&self) -> std::option::Option<&crate::model::PartnerType> {
self.partner_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetNetworkAnalyzerConfigurationInput {
#[doc(hidden)]
pub configuration_name: std::option::Option<std::string::String>,
}
impl GetNetworkAnalyzerConfigurationInput {
pub fn configuration_name(&self) -> std::option::Option<&str> {
self.configuration_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetMulticastGroupSessionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetMulticastGroupSessionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLogLevelsByResourceTypesInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEventConfigurationByResourceTypesInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetDeviceProfileInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetDeviceProfileInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetDestinationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetDestinationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateWirelessGatewayFromThingInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DisassociateWirelessGatewayFromThingInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateWirelessGatewayFromCertificateInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DisassociateWirelessGatewayFromCertificateInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateWirelessDeviceFromThingInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DisassociateWirelessDeviceFromThingInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateWirelessDeviceFromMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_id: std::option::Option<std::string::String>,
}
impl DisassociateWirelessDeviceFromMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn wireless_device_id(&self) -> std::option::Option<&str> {
self.wireless_device_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateWirelessDeviceFromFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_id: std::option::Option<std::string::String>,
}
impl DisassociateWirelessDeviceFromFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn wireless_device_id(&self) -> std::option::Option<&str> {
self.wireless_device_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateMulticastGroupFromFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub multicast_group_id: std::option::Option<std::string::String>,
}
impl DisassociateMulticastGroupFromFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn multicast_group_id(&self) -> std::option::Option<&str> {
self.multicast_group_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateAwsAccountFromPartnerAccountInput {
#[doc(hidden)]
pub partner_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub partner_type: std::option::Option<crate::model::PartnerType>,
}
impl DisassociateAwsAccountFromPartnerAccountInput {
pub fn partner_account_id(&self) -> std::option::Option<&str> {
self.partner_account_id.as_deref()
}
pub fn partner_type(&self) -> std::option::Option<&crate::model::PartnerType> {
self.partner_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteWirelessGatewayTaskDefinitionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteWirelessGatewayTaskDefinitionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteWirelessGatewayTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteWirelessGatewayTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteWirelessGatewayInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteWirelessGatewayInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteWirelessDeviceInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteWirelessDeviceInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteServiceProfileInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteServiceProfileInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteQueuedMessagesInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub message_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_type: std::option::Option<crate::model::WirelessDeviceType>,
}
impl DeleteQueuedMessagesInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn message_id(&self) -> std::option::Option<&str> {
self.message_id.as_deref()
}
pub fn wireless_device_type(&self) -> std::option::Option<&crate::model::WirelessDeviceType> {
self.wireless_device_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteNetworkAnalyzerConfigurationInput {
#[doc(hidden)]
pub configuration_name: std::option::Option<std::string::String>,
}
impl DeleteNetworkAnalyzerConfigurationInput {
pub fn configuration_name(&self) -> std::option::Option<&str> {
self.configuration_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDeviceProfileInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteDeviceProfileInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDestinationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteDestinationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateWirelessGatewayTaskDefinitionInput {
#[doc(hidden)]
pub auto_create_tasks: bool,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub update: std::option::Option<crate::model::UpdateWirelessGatewayTaskCreate>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateWirelessGatewayTaskDefinitionInput {
pub fn auto_create_tasks(&self) -> bool {
self.auto_create_tasks
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn update(&self) -> std::option::Option<&crate::model::UpdateWirelessGatewayTaskCreate> {
self.update.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateWirelessGatewayTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_gateway_task_definition_id: std::option::Option<std::string::String>,
}
impl CreateWirelessGatewayTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn wireless_gateway_task_definition_id(&self) -> std::option::Option<&str> {
self.wireless_gateway_task_definition_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateWirelessGatewayInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanGateway>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreateWirelessGatewayInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanGateway> {
self.lo_ra_wan.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateWirelessDeviceInput {
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::WirelessDeviceType>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub destination_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanDevice>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub positioning: std::option::Option<crate::model::PositioningConfigStatus>,
}
impl CreateWirelessDeviceInput {
pub fn r#type(&self) -> std::option::Option<&crate::model::WirelessDeviceType> {
self.r#type.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanDevice> {
self.lo_ra_wan.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn positioning(&self) -> std::option::Option<&crate::model::PositioningConfigStatus> {
self.positioning.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateServiceProfileInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanServiceProfile>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreateServiceProfileInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanServiceProfile> {
self.lo_ra_wan.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateNetworkAnalyzerConfigurationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub trace_content: std::option::Option<crate::model::TraceContent>,
#[doc(hidden)]
pub wireless_devices: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub wireless_gateways: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreateNetworkAnalyzerConfigurationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn trace_content(&self) -> std::option::Option<&crate::model::TraceContent> {
self.trace_content.as_ref()
}
pub fn wireless_devices(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_devices.as_deref()
}
pub fn wireless_gateways(&self) -> std::option::Option<&[std::string::String]> {
self.wireless_gateways.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateMulticastGroupInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanMulticast>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateMulticastGroupInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanMulticast> {
self.lo_ra_wan.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateFuotaTaskInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanFuotaTask>,
#[doc(hidden)]
pub firmware_update_image: std::option::Option<std::string::String>,
#[doc(hidden)]
pub firmware_update_role: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateFuotaTaskInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanFuotaTask> {
self.lo_ra_wan.as_ref()
}
pub fn firmware_update_image(&self) -> std::option::Option<&str> {
self.firmware_update_image.as_deref()
}
pub fn firmware_update_role(&self) -> std::option::Option<&str> {
self.firmware_update_role.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDeviceProfileInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lo_ra_wan: std::option::Option<crate::model::LoRaWanDeviceProfile>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreateDeviceProfileInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn lo_ra_wan(&self) -> std::option::Option<&crate::model::LoRaWanDeviceProfile> {
self.lo_ra_wan.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDestinationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expression_type: std::option::Option<crate::model::ExpressionType>,
#[doc(hidden)]
pub expression: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
}
impl CreateDestinationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn expression_type(&self) -> std::option::Option<&crate::model::ExpressionType> {
self.expression_type.as_ref()
}
pub fn expression(&self) -> std::option::Option<&str> {
self.expression.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelMulticastGroupSessionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl CancelMulticastGroupSessionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateWirelessGatewayWithThingInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub thing_arn: std::option::Option<std::string::String>,
}
impl AssociateWirelessGatewayWithThingInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn thing_arn(&self) -> std::option::Option<&str> {
self.thing_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateWirelessGatewayWithCertificateInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub iot_certificate_id: std::option::Option<std::string::String>,
}
impl AssociateWirelessGatewayWithCertificateInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn iot_certificate_id(&self) -> std::option::Option<&str> {
self.iot_certificate_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateWirelessDeviceWithThingInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub thing_arn: std::option::Option<std::string::String>,
}
impl AssociateWirelessDeviceWithThingInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn thing_arn(&self) -> std::option::Option<&str> {
self.thing_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateWirelessDeviceWithMulticastGroupInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_id: std::option::Option<std::string::String>,
}
impl AssociateWirelessDeviceWithMulticastGroupInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn wireless_device_id(&self) -> std::option::Option<&str> {
self.wireless_device_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateWirelessDeviceWithFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub wireless_device_id: std::option::Option<std::string::String>,
}
impl AssociateWirelessDeviceWithFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn wireless_device_id(&self) -> std::option::Option<&str> {
self.wireless_device_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateMulticastGroupWithFuotaTaskInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub multicast_group_id: std::option::Option<std::string::String>,
}
impl AssociateMulticastGroupWithFuotaTaskInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn multicast_group_id(&self) -> std::option::Option<&str> {
self.multicast_group_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateAwsAccountWithPartnerAccountInput {
#[doc(hidden)]
pub sidewalk: std::option::Option<crate::model::SidewalkAccountInfo>,
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl AssociateAwsAccountWithPartnerAccountInput {
pub fn sidewalk(&self) -> std::option::Option<&crate::model::SidewalkAccountInfo> {
self.sidewalk.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}