use std::fmt::Write;
pub mod batch_get_aggregate_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) resource_identifiers:
std::option::Option<std::vec::Vec<crate::model::AggregateResourceIdentifier>>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn resource_identifiers(
mut self,
input: crate::model::AggregateResourceIdentifier,
) -> Self {
let mut v = self.resource_identifiers.unwrap_or_default();
v.push(input);
self.resource_identifiers = Some(v);
self
}
pub fn set_resource_identifiers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AggregateResourceIdentifier>>,
) -> Self {
self.resource_identifiers = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchGetAggregateResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchGetAggregateResourceConfigInput {
configuration_aggregator_name: self.configuration_aggregator_name,
resource_identifiers: self.resource_identifiers,
})
}
}
}
impl BatchGetAggregateResourceConfigInput {
#[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::BatchGetAggregateResourceConfig,
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::BatchGetAggregateResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetAggregateResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.BatchGetAggregateResourceConfig",
);
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_batch_get_aggregate_resource_config(&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::BatchGetAggregateResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetAggregateResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_get_aggregate_resource_config_input::Builder {
crate::input::batch_get_aggregate_resource_config_input::Builder::default()
}
}
pub mod batch_get_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
}
impl Builder {
pub fn resource_keys(mut self, input: crate::model::ResourceKey) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
) -> Self {
self.resource_keys = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchGetResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchGetResourceConfigInput {
resource_keys: self.resource_keys,
})
}
}
}
impl BatchGetResourceConfigInput {
#[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::BatchGetResourceConfig,
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::BatchGetResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.BatchGetResourceConfig",
);
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_batch_get_resource_config(
&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::BatchGetResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_get_resource_config_input::Builder {
crate::input::batch_get_resource_config_input::Builder::default()
}
}
pub mod delete_aggregation_authorization_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) authorized_account_id: std::option::Option<std::string::String>,
pub(crate) authorized_aws_region: std::option::Option<std::string::String>,
}
impl Builder {
pub fn authorized_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.authorized_account_id = Some(input.into());
self
}
pub fn set_authorized_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.authorized_account_id = input;
self
}
pub fn authorized_aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.authorized_aws_region = Some(input.into());
self
}
pub fn set_authorized_aws_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.authorized_aws_region = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteAggregationAuthorizationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteAggregationAuthorizationInput {
authorized_account_id: self.authorized_account_id,
authorized_aws_region: self.authorized_aws_region,
})
}
}
}
impl DeleteAggregationAuthorizationInput {
#[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::DeleteAggregationAuthorization,
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::DeleteAggregationAuthorizationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAggregationAuthorizationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteAggregationAuthorization",
);
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_delete_aggregation_authorization(&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::DeleteAggregationAuthorization::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAggregationAuthorization",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_aggregation_authorization_input::Builder {
crate::input::delete_aggregation_authorization_input::Builder::default()
}
}
pub mod delete_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfigRuleInput {
config_rule_name: self.config_rule_name,
})
}
}
}
impl DeleteConfigRuleInput {
#[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::DeleteConfigRule,
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::DeleteConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteConfigRule",
);
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_delete_config_rule(&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::DeleteConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_config_rule_input::Builder {
crate::input::delete_config_rule_input::Builder::default()
}
}
pub mod delete_configuration_aggregator_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfigurationAggregatorInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfigurationAggregatorInput {
configuration_aggregator_name: self.configuration_aggregator_name,
})
}
}
}
impl DeleteConfigurationAggregatorInput {
#[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::DeleteConfigurationAggregator,
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::DeleteConfigurationAggregatorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfigurationAggregatorInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteConfigurationAggregator",
);
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_delete_configuration_aggregator(&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::DeleteConfigurationAggregator::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfigurationAggregator",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configuration_aggregator_input::Builder {
crate::input::delete_configuration_aggregator_input::Builder::default()
}
}
pub mod delete_configuration_recorder_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_recorder_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_recorder_name = Some(input.into());
self
}
pub fn set_configuration_recorder_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_recorder_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfigurationRecorderInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfigurationRecorderInput {
configuration_recorder_name: self.configuration_recorder_name,
})
}
}
}
impl DeleteConfigurationRecorderInput {
#[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::DeleteConfigurationRecorder,
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::DeleteConfigurationRecorderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfigurationRecorderInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteConfigurationRecorder",
);
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_delete_configuration_recorder(&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::DeleteConfigurationRecorder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfigurationRecorder",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configuration_recorder_input::Builder {
crate::input::delete_configuration_recorder_input::Builder::default()
}
}
pub mod delete_conformance_pack_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_name(mut self, input: impl Into<std::string::String>) -> Self {
self.conformance_pack_name = Some(input.into());
self
}
pub fn set_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.conformance_pack_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConformancePackInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConformancePackInput {
conformance_pack_name: self.conformance_pack_name,
})
}
}
}
impl DeleteConformancePackInput {
#[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::DeleteConformancePack,
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::DeleteConformancePackInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConformancePackInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteConformancePack",
);
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_delete_conformance_pack(
&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::DeleteConformancePack::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConformancePack",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_conformance_pack_input::Builder {
crate::input::delete_conformance_pack_input::Builder::default()
}
}
pub mod delete_delivery_channel_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) delivery_channel_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn delivery_channel_name(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_channel_name = Some(input.into());
self
}
pub fn set_delivery_channel_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_channel_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDeliveryChannelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDeliveryChannelInput {
delivery_channel_name: self.delivery_channel_name,
})
}
}
}
impl DeleteDeliveryChannelInput {
#[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::DeleteDeliveryChannel,
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::DeleteDeliveryChannelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDeliveryChannelInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteDeliveryChannel",
);
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_delete_delivery_channel(
&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::DeleteDeliveryChannel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDeliveryChannel",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_delivery_channel_input::Builder {
crate::input::delete_delivery_channel_input::Builder::default()
}
}
pub mod delete_evaluation_results_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteEvaluationResultsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteEvaluationResultsInput {
config_rule_name: self.config_rule_name,
})
}
}
}
impl DeleteEvaluationResultsInput {
#[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::DeleteEvaluationResults,
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::DeleteEvaluationResultsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEvaluationResultsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteEvaluationResults",
);
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_delete_evaluation_results(
&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::DeleteEvaluationResults::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEvaluationResults",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_evaluation_results_input::Builder {
crate::input::delete_evaluation_results_input::Builder::default()
}
}
pub mod delete_organization_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_config_rule_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_config_rule_name = Some(input.into());
self
}
pub fn set_organization_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_config_rule_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteOrganizationConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteOrganizationConfigRuleInput {
organization_config_rule_name: self.organization_config_rule_name,
})
}
}
}
impl DeleteOrganizationConfigRuleInput {
#[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::DeleteOrganizationConfigRule,
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::DeleteOrganizationConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteOrganizationConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteOrganizationConfigRule",
);
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_delete_organization_config_rule(&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::DeleteOrganizationConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteOrganizationConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_organization_config_rule_input::Builder {
crate::input::delete_organization_config_rule_input::Builder::default()
}
}
pub mod delete_organization_conformance_pack_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_conformance_pack_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_conformance_pack_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = Some(input.into());
self
}
pub fn set_organization_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteOrganizationConformancePackInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteOrganizationConformancePackInput {
organization_conformance_pack_name: self.organization_conformance_pack_name,
})
}
}
}
impl DeleteOrganizationConformancePackInput {
#[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::DeleteOrganizationConformancePack,
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::DeleteOrganizationConformancePackInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteOrganizationConformancePackInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteOrganizationConformancePack",
);
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_delete_organization_conformance_pack(&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::DeleteOrganizationConformancePack::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteOrganizationConformancePack",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_organization_conformance_pack_input::Builder {
crate::input::delete_organization_conformance_pack_input::Builder::default()
}
}
pub mod delete_pending_aggregation_request_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) requester_account_id: std::option::Option<std::string::String>,
pub(crate) requester_aws_region: std::option::Option<std::string::String>,
}
impl Builder {
pub fn requester_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.requester_account_id = Some(input.into());
self
}
pub fn set_requester_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.requester_account_id = input;
self
}
pub fn requester_aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.requester_aws_region = Some(input.into());
self
}
pub fn set_requester_aws_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.requester_aws_region = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeletePendingAggregationRequestInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeletePendingAggregationRequestInput {
requester_account_id: self.requester_account_id,
requester_aws_region: self.requester_aws_region,
})
}
}
}
impl DeletePendingAggregationRequestInput {
#[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::DeletePendingAggregationRequest,
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::DeletePendingAggregationRequestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeletePendingAggregationRequestInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeletePendingAggregationRequest",
);
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_delete_pending_aggregation_request(&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::DeletePendingAggregationRequest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeletePendingAggregationRequest",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_pending_aggregation_request_input::Builder {
crate::input::delete_pending_aggregation_request_input::Builder::default()
}
}
pub mod delete_remediation_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = 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::DeleteRemediationConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteRemediationConfigurationInput {
config_rule_name: self.config_rule_name,
resource_type: self.resource_type,
})
}
}
}
impl DeleteRemediationConfigurationInput {
#[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::DeleteRemediationConfiguration,
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::DeleteRemediationConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRemediationConfigurationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteRemediationConfiguration",
);
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_delete_remediation_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::DeleteRemediationConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRemediationConfiguration",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_remediation_configuration_input::Builder {
crate::input::delete_remediation_configuration_input::Builder::default()
}
}
pub mod delete_remediation_exceptions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn resource_keys(
mut self,
input: crate::model::RemediationExceptionResourceKey,
) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::RemediationExceptionResourceKey>,
>,
) -> Self {
self.resource_keys = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteRemediationExceptionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteRemediationExceptionsInput {
config_rule_name: self.config_rule_name,
resource_keys: self.resource_keys,
})
}
}
}
impl DeleteRemediationExceptionsInput {
#[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::DeleteRemediationExceptions,
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::DeleteRemediationExceptionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRemediationExceptionsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteRemediationExceptions",
);
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_delete_remediation_exceptions(&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::DeleteRemediationExceptions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRemediationExceptions",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_remediation_exceptions_input::Builder {
crate::input::delete_remediation_exceptions_input::Builder::default()
}
}
pub mod delete_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
}
impl Builder {
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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteResourceConfigInput {
resource_type: self.resource_type,
resource_id: self.resource_id,
})
}
}
}
impl DeleteResourceConfigInput {
#[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::DeleteResourceConfig,
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::DeleteResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteResourceConfig",
);
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_delete_resource_config(
&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::DeleteResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_resource_config_input::Builder {
crate::input::delete_resource_config_input::Builder::default()
}
}
pub mod delete_retention_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) retention_configuration_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn retention_configuration_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.retention_configuration_name = Some(input.into());
self
}
pub fn set_retention_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.retention_configuration_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteRetentionConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteRetentionConfigurationInput {
retention_configuration_name: self.retention_configuration_name,
})
}
}
}
impl DeleteRetentionConfigurationInput {
#[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::DeleteRetentionConfiguration,
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::DeleteRetentionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRetentionConfigurationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteRetentionConfiguration",
);
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_delete_retention_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::DeleteRetentionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRetentionConfiguration",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_retention_configuration_input::Builder {
crate::input::delete_retention_configuration_input::Builder::default()
}
}
pub mod delete_stored_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_name(mut self, input: impl Into<std::string::String>) -> Self {
self.query_name = Some(input.into());
self
}
pub fn set_query_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteStoredQueryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteStoredQueryInput {
query_name: self.query_name,
})
}
}
}
impl DeleteStoredQueryInput {
#[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::DeleteStoredQuery,
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::DeleteStoredQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStoredQueryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeleteStoredQuery",
);
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_delete_stored_query(&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::DeleteStoredQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStoredQuery",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_stored_query_input::Builder {
crate::input::delete_stored_query_input::Builder::default()
}
}
pub mod deliver_config_snapshot_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) delivery_channel_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn delivery_channel_name(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_channel_name = Some(input.into());
self
}
pub fn set_delivery_channel_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_channel_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeliverConfigSnapshotInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeliverConfigSnapshotInput {
delivery_channel_name: self.delivery_channel_name,
})
}
}
}
impl DeliverConfigSnapshotInput {
#[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::DeliverConfigSnapshot,
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::DeliverConfigSnapshotInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeliverConfigSnapshotInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DeliverConfigSnapshot",
);
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_deliver_config_snapshot(
&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::DeliverConfigSnapshot::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeliverConfigSnapshot",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::deliver_config_snapshot_input::Builder {
crate::input::deliver_config_snapshot_input::Builder::default()
}
}
pub mod describe_aggregate_compliance_by_config_rules_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::ConfigRuleComplianceFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn filters(mut self, input: crate::model::ConfigRuleComplianceFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ConfigRuleComplianceFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeAggregateComplianceByConfigRulesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeAggregateComplianceByConfigRulesInput {
configuration_aggregator_name: self.configuration_aggregator_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl DescribeAggregateComplianceByConfigRulesInput {
#[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::DescribeAggregateComplianceByConfigRules,
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::DescribeAggregateComplianceByConfigRulesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeAggregateComplianceByConfigRulesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeAggregateComplianceByConfigRules",
);
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_describe_aggregate_compliance_by_config_rules(&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::DescribeAggregateComplianceByConfigRules::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeAggregateComplianceByConfigRules",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_aggregate_compliance_by_config_rules_input::Builder {
crate::input::describe_aggregate_compliance_by_config_rules_input::Builder::default()
}
}
pub mod describe_aggregate_compliance_by_conformance_packs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) filters:
std::option::Option<crate::model::AggregateConformancePackComplianceFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn filters(
mut self,
input: crate::model::AggregateConformancePackComplianceFilters,
) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::AggregateConformancePackComplianceFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeAggregateComplianceByConformancePacksInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeAggregateComplianceByConformancePacksInput {
configuration_aggregator_name: self.configuration_aggregator_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl DescribeAggregateComplianceByConformancePacksInput {
#[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::DescribeAggregateComplianceByConformancePacks,
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::DescribeAggregateComplianceByConformancePacksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeAggregateComplianceByConformancePacksInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeAggregateComplianceByConformancePacks",
);
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_describe_aggregate_compliance_by_conformance_packs(&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::DescribeAggregateComplianceByConformancePacks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeAggregateComplianceByConformancePacks",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::describe_aggregate_compliance_by_conformance_packs_input::Builder {
crate::input::describe_aggregate_compliance_by_conformance_packs_input::Builder::default()
}
}
pub mod describe_aggregation_authorizations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeAggregationAuthorizationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeAggregationAuthorizationsInput {
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeAggregationAuthorizationsInput {
#[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::DescribeAggregationAuthorizations,
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::DescribeAggregationAuthorizationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeAggregationAuthorizationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeAggregationAuthorizations",
);
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_describe_aggregation_authorizations(&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::DescribeAggregationAuthorizations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeAggregationAuthorizations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_aggregation_authorizations_input::Builder {
crate::input::describe_aggregation_authorizations_input::Builder::default()
}
}
pub mod describe_compliance_by_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) compliance_types:
std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.config_rule_names.unwrap_or_default();
v.push(input.into());
self.config_rule_names = Some(v);
self
}
pub fn set_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.config_rule_names = input;
self
}
pub fn compliance_types(mut self, input: crate::model::ComplianceType) -> Self {
let mut v = self.compliance_types.unwrap_or_default();
v.push(input);
self.compliance_types = Some(v);
self
}
pub fn set_compliance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
) -> Self {
self.compliance_types = 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::DescribeComplianceByConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeComplianceByConfigRuleInput {
config_rule_names: self.config_rule_names,
compliance_types: self.compliance_types,
next_token: self.next_token,
})
}
}
}
impl DescribeComplianceByConfigRuleInput {
#[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::DescribeComplianceByConfigRule,
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::DescribeComplianceByConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeComplianceByConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeComplianceByConfigRule",
);
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_describe_compliance_by_config_rule(&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::DescribeComplianceByConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeComplianceByConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_compliance_by_config_rule_input::Builder {
crate::input::describe_compliance_by_config_rule_input::Builder::default()
}
}
pub mod describe_compliance_by_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) compliance_types:
std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn compliance_types(mut self, input: crate::model::ComplianceType) -> Self {
let mut v = self.compliance_types.unwrap_or_default();
v.push(input);
self.compliance_types = Some(v);
self
}
pub fn set_compliance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
) -> Self {
self.compliance_types = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeComplianceByResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeComplianceByResourceInput {
resource_type: self.resource_type,
resource_id: self.resource_id,
compliance_types: self.compliance_types,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeComplianceByResourceInput {
#[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::DescribeComplianceByResource,
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::DescribeComplianceByResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeComplianceByResourceInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeComplianceByResource",
);
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_describe_compliance_by_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::DescribeComplianceByResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeComplianceByResource",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_compliance_by_resource_input::Builder {
crate::input::describe_compliance_by_resource_input::Builder::default()
}
}
pub mod describe_config_rule_evaluation_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn config_rule_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.config_rule_names.unwrap_or_default();
v.push(input.into());
self.config_rule_names = Some(v);
self
}
pub fn set_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.config_rule_names = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigRuleEvaluationStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConfigRuleEvaluationStatusInput {
config_rule_names: self.config_rule_names,
next_token: self.next_token,
limit: self.limit.unwrap_or_default(),
})
}
}
}
impl DescribeConfigRuleEvaluationStatusInput {
#[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::DescribeConfigRuleEvaluationStatus,
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::DescribeConfigRuleEvaluationStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigRuleEvaluationStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigRuleEvaluationStatus",
);
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_describe_config_rule_evaluation_status(&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::DescribeConfigRuleEvaluationStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigRuleEvaluationStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_config_rule_evaluation_status_input::Builder {
crate::input::describe_config_rule_evaluation_status_input::Builder::default()
}
}
pub mod describe_config_rules_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::DescribeConfigRulesFilters>,
}
impl Builder {
pub fn config_rule_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.config_rule_names.unwrap_or_default();
v.push(input.into());
self.config_rule_names = Some(v);
self
}
pub fn set_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.config_rule_names = 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 filters(mut self, input: crate::model::DescribeConfigRulesFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::DescribeConfigRulesFilters>,
) -> Self {
self.filters = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigRulesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConfigRulesInput {
config_rule_names: self.config_rule_names,
next_token: self.next_token,
filters: self.filters,
})
}
}
}
impl DescribeConfigRulesInput {
#[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::DescribeConfigRules,
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::DescribeConfigRulesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigRulesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigRules",
);
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_describe_config_rules(&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::DescribeConfigRules::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigRules",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_config_rules_input::Builder {
crate::input::describe_config_rules_input::Builder::default()
}
}
pub mod describe_configuration_aggregators_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn configuration_aggregator_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.configuration_aggregator_names.unwrap_or_default();
v.push(input.into());
self.configuration_aggregator_names = Some(v);
self
}
pub fn set_configuration_aggregator_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.configuration_aggregator_names = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigurationAggregatorsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConfigurationAggregatorsInput {
configuration_aggregator_names: self.configuration_aggregator_names,
next_token: self.next_token,
limit: self.limit.unwrap_or_default(),
})
}
}
}
impl DescribeConfigurationAggregatorsInput {
#[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::DescribeConfigurationAggregators,
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::DescribeConfigurationAggregatorsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigurationAggregatorsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigurationAggregators",
);
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_describe_configuration_aggregators(&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::DescribeConfigurationAggregators::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigurationAggregators",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_configuration_aggregators_input::Builder {
crate::input::describe_configuration_aggregators_input::Builder::default()
}
}
pub mod describe_configuration_aggregator_sources_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) update_status:
std::option::Option<std::vec::Vec<crate::model::AggregatedSourceStatusType>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn update_status(mut self, input: crate::model::AggregatedSourceStatusType) -> Self {
let mut v = self.update_status.unwrap_or_default();
v.push(input);
self.update_status = Some(v);
self
}
pub fn set_update_status(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AggregatedSourceStatusType>>,
) -> Self {
self.update_status = 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigurationAggregatorSourcesStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeConfigurationAggregatorSourcesStatusInput {
configuration_aggregator_name: self.configuration_aggregator_name,
update_status: self.update_status,
next_token: self.next_token,
limit: self.limit.unwrap_or_default(),
},
)
}
}
}
impl DescribeConfigurationAggregatorSourcesStatusInput {
#[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::DescribeConfigurationAggregatorSourcesStatus,
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::DescribeConfigurationAggregatorSourcesStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigurationAggregatorSourcesStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigurationAggregatorSourcesStatus",
);
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_describe_configuration_aggregator_sources_status(&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::DescribeConfigurationAggregatorSourcesStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigurationAggregatorSourcesStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_configuration_aggregator_sources_status_input::Builder
{
crate::input::describe_configuration_aggregator_sources_status_input::Builder::default()
}
}
pub mod describe_configuration_recorders_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder_names:
std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn configuration_recorder_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.configuration_recorder_names.unwrap_or_default();
v.push(input.into());
self.configuration_recorder_names = Some(v);
self
}
pub fn set_configuration_recorder_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.configuration_recorder_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigurationRecordersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConfigurationRecordersInput {
configuration_recorder_names: self.configuration_recorder_names,
})
}
}
}
impl DescribeConfigurationRecordersInput {
#[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::DescribeConfigurationRecorders,
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::DescribeConfigurationRecordersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigurationRecordersInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigurationRecorders",
);
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_describe_configuration_recorders(&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::DescribeConfigurationRecorders::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigurationRecorders",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_configuration_recorders_input::Builder {
crate::input::describe_configuration_recorders_input::Builder::default()
}
}
pub mod describe_configuration_recorder_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder_names:
std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn configuration_recorder_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.configuration_recorder_names.unwrap_or_default();
v.push(input.into());
self.configuration_recorder_names = Some(v);
self
}
pub fn set_configuration_recorder_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.configuration_recorder_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConfigurationRecorderStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConfigurationRecorderStatusInput {
configuration_recorder_names: self.configuration_recorder_names,
})
}
}
}
impl DescribeConfigurationRecorderStatusInput {
#[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::DescribeConfigurationRecorderStatus,
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::DescribeConfigurationRecorderStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConfigurationRecorderStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConfigurationRecorderStatus",
);
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_describe_configuration_recorder_status(&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::DescribeConfigurationRecorderStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConfigurationRecorderStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_configuration_recorder_status_input::Builder {
crate::input::describe_configuration_recorder_status_input::Builder::default()
}
}
pub mod describe_conformance_pack_compliance_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::ConformancePackComplianceFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_name(mut self, input: impl Into<std::string::String>) -> Self {
self.conformance_pack_name = Some(input.into());
self
}
pub fn set_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.conformance_pack_name = input;
self
}
pub fn filters(mut self, input: crate::model::ConformancePackComplianceFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ConformancePackComplianceFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeConformancePackComplianceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConformancePackComplianceInput {
conformance_pack_name: self.conformance_pack_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeConformancePackComplianceInput {
#[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::DescribeConformancePackCompliance,
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::DescribeConformancePackComplianceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConformancePackComplianceInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConformancePackCompliance",
);
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_describe_conformance_pack_compliance(&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::DescribeConformancePackCompliance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConformancePackCompliance",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_conformance_pack_compliance_input::Builder {
crate::input::describe_conformance_pack_compliance_input::Builder::default()
}
}
pub mod describe_conformance_packs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.conformance_pack_names.unwrap_or_default();
v.push(input.into());
self.conformance_pack_names = Some(v);
self
}
pub fn set_conformance_pack_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.conformance_pack_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeConformancePacksInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConformancePacksInput {
conformance_pack_names: self.conformance_pack_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeConformancePacksInput {
#[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::DescribeConformancePacks,
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::DescribeConformancePacksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConformancePacksInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConformancePacks",
);
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_describe_conformance_packs(
&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::DescribeConformancePacks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConformancePacks",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_conformance_packs_input::Builder {
crate::input::describe_conformance_packs_input::Builder::default()
}
}
pub mod describe_conformance_pack_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.conformance_pack_names.unwrap_or_default();
v.push(input.into());
self.conformance_pack_names = Some(v);
self
}
pub fn set_conformance_pack_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.conformance_pack_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeConformancePackStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConformancePackStatusInput {
conformance_pack_names: self.conformance_pack_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeConformancePackStatusInput {
#[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::DescribeConformancePackStatus,
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::DescribeConformancePackStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConformancePackStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeConformancePackStatus",
);
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_describe_conformance_pack_status(&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::DescribeConformancePackStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConformancePackStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_conformance_pack_status_input::Builder {
crate::input::describe_conformance_pack_status_input::Builder::default()
}
}
pub mod describe_delivery_channels_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) delivery_channel_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn delivery_channel_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.delivery_channel_names.unwrap_or_default();
v.push(input.into());
self.delivery_channel_names = Some(v);
self
}
pub fn set_delivery_channel_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.delivery_channel_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDeliveryChannelsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeDeliveryChannelsInput {
delivery_channel_names: self.delivery_channel_names,
})
}
}
}
impl DescribeDeliveryChannelsInput {
#[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::DescribeDeliveryChannels,
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::DescribeDeliveryChannelsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDeliveryChannelsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeDeliveryChannels",
);
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_describe_delivery_channels(
&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::DescribeDeliveryChannels::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDeliveryChannels",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_delivery_channels_input::Builder {
crate::input::describe_delivery_channels_input::Builder::default()
}
}
pub mod describe_delivery_channel_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) delivery_channel_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn delivery_channel_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.delivery_channel_names.unwrap_or_default();
v.push(input.into());
self.delivery_channel_names = Some(v);
self
}
pub fn set_delivery_channel_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.delivery_channel_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDeliveryChannelStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeDeliveryChannelStatusInput {
delivery_channel_names: self.delivery_channel_names,
})
}
}
}
impl DescribeDeliveryChannelStatusInput {
#[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::DescribeDeliveryChannelStatus,
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::DescribeDeliveryChannelStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDeliveryChannelStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeDeliveryChannelStatus",
);
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_describe_delivery_channel_status(&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::DescribeDeliveryChannelStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDeliveryChannelStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_delivery_channel_status_input::Builder {
crate::input::describe_delivery_channel_status_input::Builder::default()
}
}
pub mod describe_organization_config_rules_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_config_rule_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.organization_config_rule_names.unwrap_or_default();
v.push(input.into());
self.organization_config_rule_names = Some(v);
self
}
pub fn set_organization_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.organization_config_rule_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeOrganizationConfigRulesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeOrganizationConfigRulesInput {
organization_config_rule_names: self.organization_config_rule_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeOrganizationConfigRulesInput {
#[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::DescribeOrganizationConfigRules,
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::DescribeOrganizationConfigRulesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeOrganizationConfigRulesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeOrganizationConfigRules",
);
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_describe_organization_config_rules(&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::DescribeOrganizationConfigRules::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeOrganizationConfigRules",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_organization_config_rules_input::Builder {
crate::input::describe_organization_config_rules_input::Builder::default()
}
}
pub mod describe_organization_config_rule_statuses_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_config_rule_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.organization_config_rule_names.unwrap_or_default();
v.push(input.into());
self.organization_config_rule_names = Some(v);
self
}
pub fn set_organization_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.organization_config_rule_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeOrganizationConfigRuleStatusesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeOrganizationConfigRuleStatusesInput {
organization_config_rule_names: self.organization_config_rule_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeOrganizationConfigRuleStatusesInput {
#[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::DescribeOrganizationConfigRuleStatuses,
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::DescribeOrganizationConfigRuleStatusesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeOrganizationConfigRuleStatusesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeOrganizationConfigRuleStatuses",
);
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_describe_organization_config_rule_statuses(&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::DescribeOrganizationConfigRuleStatuses::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeOrganizationConfigRuleStatuses",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_organization_config_rule_statuses_input::Builder {
crate::input::describe_organization_config_rule_statuses_input::Builder::default()
}
}
pub mod describe_organization_conformance_packs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_conformance_pack_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_conformance_pack_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.organization_conformance_pack_names.unwrap_or_default();
v.push(input.into());
self.organization_conformance_pack_names = Some(v);
self
}
pub fn set_organization_conformance_pack_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.organization_conformance_pack_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeOrganizationConformancePacksInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeOrganizationConformancePacksInput {
organization_conformance_pack_names: self.organization_conformance_pack_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeOrganizationConformancePacksInput {
#[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::DescribeOrganizationConformancePacks,
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::DescribeOrganizationConformancePacksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeOrganizationConformancePacksInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeOrganizationConformancePacks",
);
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_describe_organization_conformance_packs(&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::DescribeOrganizationConformancePacks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeOrganizationConformancePacks",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_organization_conformance_packs_input::Builder {
crate::input::describe_organization_conformance_packs_input::Builder::default()
}
}
pub mod describe_organization_conformance_pack_statuses_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_conformance_pack_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_conformance_pack_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.organization_conformance_pack_names.unwrap_or_default();
v.push(input.into());
self.organization_conformance_pack_names = Some(v);
self
}
pub fn set_organization_conformance_pack_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.organization_conformance_pack_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeOrganizationConformancePackStatusesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeOrganizationConformancePackStatusesInput {
organization_conformance_pack_names: self.organization_conformance_pack_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl DescribeOrganizationConformancePackStatusesInput {
#[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::DescribeOrganizationConformancePackStatuses,
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::DescribeOrganizationConformancePackStatusesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeOrganizationConformancePackStatusesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeOrganizationConformancePackStatuses",
);
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_describe_organization_conformance_pack_statuses(&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::DescribeOrganizationConformancePackStatuses::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeOrganizationConformancePackStatuses",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_organization_conformance_pack_statuses_input::Builder
{
crate::input::describe_organization_conformance_pack_statuses_input::Builder::default()
}
}
pub mod describe_pending_aggregation_requests_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribePendingAggregationRequestsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribePendingAggregationRequestsInput {
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribePendingAggregationRequestsInput {
#[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::DescribePendingAggregationRequests,
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::DescribePendingAggregationRequestsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribePendingAggregationRequestsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribePendingAggregationRequests",
);
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_describe_pending_aggregation_requests(&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::DescribePendingAggregationRequests::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribePendingAggregationRequests",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_pending_aggregation_requests_input::Builder {
crate::input::describe_pending_aggregation_requests_input::Builder::default()
}
}
pub mod describe_remediation_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn config_rule_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.config_rule_names.unwrap_or_default();
v.push(input.into());
self.config_rule_names = Some(v);
self
}
pub fn set_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.config_rule_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeRemediationConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeRemediationConfigurationsInput {
config_rule_names: self.config_rule_names,
})
}
}
}
impl DescribeRemediationConfigurationsInput {
#[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::DescribeRemediationConfigurations,
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::DescribeRemediationConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRemediationConfigurationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeRemediationConfigurations",
);
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_describe_remediation_configurations(&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::DescribeRemediationConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRemediationConfigurations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_remediation_configurations_input::Builder {
crate::input::describe_remediation_configurations_input::Builder::default()
}
}
pub mod describe_remediation_exceptions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn resource_keys(
mut self,
input: crate::model::RemediationExceptionResourceKey,
) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::RemediationExceptionResourceKey>,
>,
) -> Self {
self.resource_keys = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeRemediationExceptionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeRemediationExceptionsInput {
config_rule_name: self.config_rule_name,
resource_keys: self.resource_keys,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeRemediationExceptionsInput {
#[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::DescribeRemediationExceptions,
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::DescribeRemediationExceptionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRemediationExceptionsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeRemediationExceptions",
);
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_describe_remediation_exceptions(&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::DescribeRemediationExceptions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRemediationExceptions",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_remediation_exceptions_input::Builder {
crate::input::describe_remediation_exceptions_input::Builder::default()
}
}
pub mod describe_remediation_execution_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn resource_keys(mut self, input: crate::model::ResourceKey) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
) -> Self {
self.resource_keys = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::DescribeRemediationExecutionStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeRemediationExecutionStatusInput {
config_rule_name: self.config_rule_name,
resource_keys: self.resource_keys,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeRemediationExecutionStatusInput {
#[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::DescribeRemediationExecutionStatus,
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::DescribeRemediationExecutionStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRemediationExecutionStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeRemediationExecutionStatus",
);
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_describe_remediation_execution_status(&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::DescribeRemediationExecutionStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRemediationExecutionStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_remediation_execution_status_input::Builder {
crate::input::describe_remediation_execution_status_input::Builder::default()
}
}
pub mod describe_retention_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) retention_configuration_names:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn retention_configuration_names(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.retention_configuration_names.unwrap_or_default();
v.push(input.into());
self.retention_configuration_names = Some(v);
self
}
pub fn set_retention_configuration_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.retention_configuration_names = 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::DescribeRetentionConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeRetentionConfigurationsInput {
retention_configuration_names: self.retention_configuration_names,
next_token: self.next_token,
})
}
}
}
impl DescribeRetentionConfigurationsInput {
#[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::DescribeRetentionConfigurations,
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::DescribeRetentionConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRetentionConfigurationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.DescribeRetentionConfigurations",
);
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_describe_retention_configurations(&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::DescribeRetentionConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRetentionConfigurations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_retention_configurations_input::Builder {
crate::input::describe_retention_configurations_input::Builder::default()
}
}
pub mod get_aggregate_compliance_details_by_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) account_id: std::option::Option<std::string::String>,
pub(crate) aws_region: std::option::Option<std::string::String>,
pub(crate) compliance_type: std::option::Option<crate::model::ComplianceType>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.account_id = Some(input.into());
self
}
pub fn set_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.aws_region = Some(input.into());
self
}
pub fn set_aws_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.aws_region = input;
self
}
pub fn compliance_type(mut self, input: crate::model::ComplianceType) -> Self {
self.compliance_type = Some(input);
self
}
pub fn set_compliance_type(
mut self,
input: std::option::Option<crate::model::ComplianceType>,
) -> Self {
self.compliance_type = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetAggregateComplianceDetailsByConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::GetAggregateComplianceDetailsByConfigRuleInput {
configuration_aggregator_name: self.configuration_aggregator_name,
config_rule_name: self.config_rule_name,
account_id: self.account_id,
aws_region: self.aws_region,
compliance_type: self.compliance_type,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl GetAggregateComplianceDetailsByConfigRuleInput {
#[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::GetAggregateComplianceDetailsByConfigRule,
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::GetAggregateComplianceDetailsByConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAggregateComplianceDetailsByConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetAggregateComplianceDetailsByConfigRule",
);
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_aggregate_compliance_details_by_config_rule(&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::GetAggregateComplianceDetailsByConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAggregateComplianceDetailsByConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_aggregate_compliance_details_by_config_rule_input::Builder
{
crate::input::get_aggregate_compliance_details_by_config_rule_input::Builder::default()
}
}
pub mod get_aggregate_config_rule_compliance_summary_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::ConfigRuleComplianceSummaryFilters>,
pub(crate) group_by_key:
std::option::Option<crate::model::ConfigRuleComplianceSummaryGroupKey>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn filters(mut self, input: crate::model::ConfigRuleComplianceSummaryFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ConfigRuleComplianceSummaryFilters>,
) -> Self {
self.filters = input;
self
}
pub fn group_by_key(
mut self,
input: crate::model::ConfigRuleComplianceSummaryGroupKey,
) -> Self {
self.group_by_key = Some(input);
self
}
pub fn set_group_by_key(
mut self,
input: std::option::Option<crate::model::ConfigRuleComplianceSummaryGroupKey>,
) -> Self {
self.group_by_key = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetAggregateConfigRuleComplianceSummaryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetAggregateConfigRuleComplianceSummaryInput {
configuration_aggregator_name: self.configuration_aggregator_name,
filters: self.filters,
group_by_key: self.group_by_key,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetAggregateConfigRuleComplianceSummaryInput {
#[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::GetAggregateConfigRuleComplianceSummary,
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::GetAggregateConfigRuleComplianceSummaryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAggregateConfigRuleComplianceSummaryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetAggregateConfigRuleComplianceSummary",
);
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_aggregate_config_rule_compliance_summary(&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::GetAggregateConfigRuleComplianceSummary::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAggregateConfigRuleComplianceSummary",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_aggregate_config_rule_compliance_summary_input::Builder {
crate::input::get_aggregate_config_rule_compliance_summary_input::Builder::default()
}
}
pub mod get_aggregate_conformance_pack_compliance_summary_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) filters:
std::option::Option<crate::model::AggregateConformancePackComplianceSummaryFilters>,
pub(crate) group_by_key:
std::option::Option<crate::model::AggregateConformancePackComplianceSummaryGroupKey>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn filters(
mut self,
input: crate::model::AggregateConformancePackComplianceSummaryFilters,
) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<
crate::model::AggregateConformancePackComplianceSummaryFilters,
>,
) -> Self {
self.filters = input;
self
}
pub fn group_by_key(
mut self,
input: crate::model::AggregateConformancePackComplianceSummaryGroupKey,
) -> Self {
self.group_by_key = Some(input);
self
}
pub fn set_group_by_key(
mut self,
input: std::option::Option<
crate::model::AggregateConformancePackComplianceSummaryGroupKey,
>,
) -> Self {
self.group_by_key = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetAggregateConformancePackComplianceSummaryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::GetAggregateConformancePackComplianceSummaryInput {
configuration_aggregator_name: self.configuration_aggregator_name,
filters: self.filters,
group_by_key: self.group_by_key,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl GetAggregateConformancePackComplianceSummaryInput {
#[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::GetAggregateConformancePackComplianceSummary,
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::GetAggregateConformancePackComplianceSummaryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAggregateConformancePackComplianceSummaryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetAggregateConformancePackComplianceSummary",
);
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_aggregate_conformance_pack_compliance_summary(&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::GetAggregateConformancePackComplianceSummary::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAggregateConformancePackComplianceSummary",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::get_aggregate_conformance_pack_compliance_summary_input::Builder {
crate::input::get_aggregate_conformance_pack_compliance_summary_input::Builder::default()
}
}
pub mod get_aggregate_discovered_resource_counts_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::ResourceCountFilters>,
pub(crate) group_by_key: std::option::Option<crate::model::ResourceCountGroupKey>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn filters(mut self, input: crate::model::ResourceCountFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ResourceCountFilters>,
) -> Self {
self.filters = input;
self
}
pub fn group_by_key(mut self, input: crate::model::ResourceCountGroupKey) -> Self {
self.group_by_key = Some(input);
self
}
pub fn set_group_by_key(
mut self,
input: std::option::Option<crate::model::ResourceCountGroupKey>,
) -> Self {
self.group_by_key = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetAggregateDiscoveredResourceCountsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetAggregateDiscoveredResourceCountsInput {
configuration_aggregator_name: self.configuration_aggregator_name,
filters: self.filters,
group_by_key: self.group_by_key,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetAggregateDiscoveredResourceCountsInput {
#[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::GetAggregateDiscoveredResourceCounts,
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::GetAggregateDiscoveredResourceCountsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAggregateDiscoveredResourceCountsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetAggregateDiscoveredResourceCounts",
);
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_aggregate_discovered_resource_counts(&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::GetAggregateDiscoveredResourceCounts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAggregateDiscoveredResourceCounts",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_aggregate_discovered_resource_counts_input::Builder {
crate::input::get_aggregate_discovered_resource_counts_input::Builder::default()
}
}
pub mod get_aggregate_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) resource_identifier:
std::option::Option<crate::model::AggregateResourceIdentifier>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn resource_identifier(
mut self,
input: crate::model::AggregateResourceIdentifier,
) -> Self {
self.resource_identifier = Some(input);
self
}
pub fn set_resource_identifier(
mut self,
input: std::option::Option<crate::model::AggregateResourceIdentifier>,
) -> Self {
self.resource_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetAggregateResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetAggregateResourceConfigInput {
configuration_aggregator_name: self.configuration_aggregator_name,
resource_identifier: self.resource_identifier,
})
}
}
}
impl GetAggregateResourceConfigInput {
#[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::GetAggregateResourceConfig,
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::GetAggregateResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAggregateResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetAggregateResourceConfig",
);
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_aggregate_resource_config(&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::GetAggregateResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAggregateResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_aggregate_resource_config_input::Builder {
crate::input::get_aggregate_resource_config_input::Builder::default()
}
}
pub mod get_compliance_details_by_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) compliance_types:
std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn compliance_types(mut self, input: crate::model::ComplianceType) -> Self {
let mut v = self.compliance_types.unwrap_or_default();
v.push(input);
self.compliance_types = Some(v);
self
}
pub fn set_compliance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
) -> Self {
self.compliance_types = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetComplianceDetailsByConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetComplianceDetailsByConfigRuleInput {
config_rule_name: self.config_rule_name,
compliance_types: self.compliance_types,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetComplianceDetailsByConfigRuleInput {
#[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::GetComplianceDetailsByConfigRule,
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::GetComplianceDetailsByConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComplianceDetailsByConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetComplianceDetailsByConfigRule",
);
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_compliance_details_by_config_rule(&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::GetComplianceDetailsByConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComplianceDetailsByConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_compliance_details_by_config_rule_input::Builder {
crate::input::get_compliance_details_by_config_rule_input::Builder::default()
}
}
pub mod get_compliance_details_by_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) compliance_types:
std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) resource_evaluation_id: std::option::Option<std::string::String>,
}
impl Builder {
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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn compliance_types(mut self, input: crate::model::ComplianceType) -> Self {
let mut v = self.compliance_types.unwrap_or_default();
v.push(input);
self.compliance_types = Some(v);
self
}
pub fn set_compliance_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
) -> Self {
self.compliance_types = 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 resource_evaluation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_evaluation_id = Some(input.into());
self
}
pub fn set_resource_evaluation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_evaluation_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetComplianceDetailsByResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetComplianceDetailsByResourceInput {
resource_type: self.resource_type,
resource_id: self.resource_id,
compliance_types: self.compliance_types,
next_token: self.next_token,
resource_evaluation_id: self.resource_evaluation_id,
})
}
}
}
impl GetComplianceDetailsByResourceInput {
#[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::GetComplianceDetailsByResource,
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::GetComplianceDetailsByResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComplianceDetailsByResourceInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetComplianceDetailsByResource",
);
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_compliance_details_by_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::GetComplianceDetailsByResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComplianceDetailsByResource",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_compliance_details_by_resource_input::Builder {
crate::input::get_compliance_details_by_resource_input::Builder::default()
}
}
pub mod get_compliance_summary_by_config_rule_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::GetComplianceSummaryByConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetComplianceSummaryByConfigRuleInput {})
}
}
}
impl GetComplianceSummaryByConfigRuleInput {
#[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::GetComplianceSummaryByConfigRule,
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::GetComplianceSummaryByConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComplianceSummaryByConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetComplianceSummaryByConfigRule",
);
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_compliance_summary_by_config_rule(&self)?
);
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::GetComplianceSummaryByConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComplianceSummaryByConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_compliance_summary_by_config_rule_input::Builder {
crate::input::get_compliance_summary_by_config_rule_input::Builder::default()
}
}
pub mod get_compliance_summary_by_resource_type_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_types(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.resource_types.unwrap_or_default();
v.push(input.into());
self.resource_types = Some(v);
self
}
pub fn set_resource_types(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.resource_types = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetComplianceSummaryByResourceTypeInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetComplianceSummaryByResourceTypeInput {
resource_types: self.resource_types,
})
}
}
}
impl GetComplianceSummaryByResourceTypeInput {
#[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::GetComplianceSummaryByResourceType,
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::GetComplianceSummaryByResourceTypeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComplianceSummaryByResourceTypeInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetComplianceSummaryByResourceType",
);
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_compliance_summary_by_resource_type(&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::GetComplianceSummaryByResourceType::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComplianceSummaryByResourceType",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_compliance_summary_by_resource_type_input::Builder {
crate::input::get_compliance_summary_by_resource_type_input::Builder::default()
}
}
pub mod get_conformance_pack_compliance_details_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::ConformancePackEvaluationFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_name(mut self, input: impl Into<std::string::String>) -> Self {
self.conformance_pack_name = Some(input.into());
self
}
pub fn set_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.conformance_pack_name = input;
self
}
pub fn filters(mut self, input: crate::model::ConformancePackEvaluationFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ConformancePackEvaluationFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetConformancePackComplianceDetailsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConformancePackComplianceDetailsInput {
conformance_pack_name: self.conformance_pack_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetConformancePackComplianceDetailsInput {
#[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::GetConformancePackComplianceDetails,
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::GetConformancePackComplianceDetailsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConformancePackComplianceDetailsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetConformancePackComplianceDetails",
);
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_conformance_pack_compliance_details(&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::GetConformancePackComplianceDetails::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConformancePackComplianceDetails",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_conformance_pack_compliance_details_input::Builder {
crate::input::get_conformance_pack_compliance_details_input::Builder::default()
}
}
pub mod get_conformance_pack_compliance_summary_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn conformance_pack_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.conformance_pack_names.unwrap_or_default();
v.push(input.into());
self.conformance_pack_names = Some(v);
self
}
pub fn set_conformance_pack_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.conformance_pack_names = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetConformancePackComplianceSummaryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConformancePackComplianceSummaryInput {
conformance_pack_names: self.conformance_pack_names,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetConformancePackComplianceSummaryInput {
#[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::GetConformancePackComplianceSummary,
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::GetConformancePackComplianceSummaryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConformancePackComplianceSummaryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetConformancePackComplianceSummary",
);
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_conformance_pack_compliance_summary(&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::GetConformancePackComplianceSummary::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConformancePackComplianceSummary",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_conformance_pack_compliance_summary_input::Builder {
crate::input::get_conformance_pack_compliance_summary_input::Builder::default()
}
}
pub mod get_custom_rule_policy_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetCustomRulePolicyInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetCustomRulePolicyInput {
config_rule_name: self.config_rule_name,
})
}
}
}
impl GetCustomRulePolicyInput {
#[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::GetCustomRulePolicy,
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::GetCustomRulePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetCustomRulePolicyInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetCustomRulePolicy",
);
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_custom_rule_policy(
&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::GetCustomRulePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetCustomRulePolicy",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_custom_rule_policy_input::Builder {
crate::input::get_custom_rule_policy_input::Builder::default()
}
}
pub mod get_discovered_resource_counts_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_types(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.resource_types.unwrap_or_default();
v.push(input.into());
self.resource_types = Some(v);
self
}
pub fn set_resource_types(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.resource_types = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetDiscoveredResourceCountsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetDiscoveredResourceCountsInput {
resource_types: self.resource_types,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetDiscoveredResourceCountsInput {
#[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::GetDiscoveredResourceCounts,
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::GetDiscoveredResourceCountsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDiscoveredResourceCountsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetDiscoveredResourceCounts",
);
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_discovered_resource_counts(&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::GetDiscoveredResourceCounts::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDiscoveredResourceCounts",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_discovered_resource_counts_input::Builder {
crate::input::get_discovered_resource_counts_input::Builder::default()
}
}
pub mod get_organization_config_rule_detailed_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_name: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::StatusDetailFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_config_rule_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_config_rule_name = Some(input.into());
self
}
pub fn set_organization_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_config_rule_name = input;
self
}
pub fn filters(mut self, input: crate::model::StatusDetailFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::StatusDetailFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetOrganizationConfigRuleDetailedStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetOrganizationConfigRuleDetailedStatusInput {
organization_config_rule_name: self.organization_config_rule_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetOrganizationConfigRuleDetailedStatusInput {
#[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::GetOrganizationConfigRuleDetailedStatus,
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::GetOrganizationConfigRuleDetailedStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetOrganizationConfigRuleDetailedStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetOrganizationConfigRuleDetailedStatus",
);
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_organization_config_rule_detailed_status(&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::GetOrganizationConfigRuleDetailedStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetOrganizationConfigRuleDetailedStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_organization_config_rule_detailed_status_input::Builder {
crate::input::get_organization_config_rule_detailed_status_input::Builder::default()
}
}
pub mod get_organization_conformance_pack_detailed_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_conformance_pack_name: std::option::Option<std::string::String>,
pub(crate) filters:
std::option::Option<crate::model::OrganizationResourceDetailedStatusFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_conformance_pack_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = Some(input.into());
self
}
pub fn set_organization_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = input;
self
}
pub fn filters(
mut self,
input: crate::model::OrganizationResourceDetailedStatusFilters,
) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::OrganizationResourceDetailedStatusFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetOrganizationConformancePackDetailedStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::GetOrganizationConformancePackDetailedStatusInput {
organization_conformance_pack_name: self.organization_conformance_pack_name,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl GetOrganizationConformancePackDetailedStatusInput {
#[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::GetOrganizationConformancePackDetailedStatus,
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::GetOrganizationConformancePackDetailedStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetOrganizationConformancePackDetailedStatusInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetOrganizationConformancePackDetailedStatus",
);
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_organization_conformance_pack_detailed_status(&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::GetOrganizationConformancePackDetailedStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetOrganizationConformancePackDetailedStatus",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::get_organization_conformance_pack_detailed_status_input::Builder {
crate::input::get_organization_conformance_pack_detailed_status_input::Builder::default()
}
}
pub mod get_organization_custom_rule_policy_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn organization_config_rule_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_config_rule_name = Some(input.into());
self
}
pub fn set_organization_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_config_rule_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetOrganizationCustomRulePolicyInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetOrganizationCustomRulePolicyInput {
organization_config_rule_name: self.organization_config_rule_name,
})
}
}
}
impl GetOrganizationCustomRulePolicyInput {
#[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::GetOrganizationCustomRulePolicy,
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::GetOrganizationCustomRulePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetOrganizationCustomRulePolicyInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetOrganizationCustomRulePolicy",
);
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_organization_custom_rule_policy(&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::GetOrganizationCustomRulePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetOrganizationCustomRulePolicy",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_organization_custom_rule_policy_input::Builder {
crate::input::get_organization_custom_rule_policy_input::Builder::default()
}
}
pub mod get_resource_config_history_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::ResourceType>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) later_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) earlier_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) chronological_order: std::option::Option<crate::model::ChronologicalOrder>,
pub(crate) limit: 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::ResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::ResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn later_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.later_time = Some(input);
self
}
pub fn set_later_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.later_time = input;
self
}
pub fn earlier_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.earlier_time = Some(input);
self
}
pub fn set_earlier_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.earlier_time = input;
self
}
pub fn chronological_order(mut self, input: crate::model::ChronologicalOrder) -> Self {
self.chronological_order = Some(input);
self
}
pub fn set_chronological_order(
mut self,
input: std::option::Option<crate::model::ChronologicalOrder>,
) -> Self {
self.chronological_order = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::GetResourceConfigHistoryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourceConfigHistoryInput {
resource_type: self.resource_type,
resource_id: self.resource_id,
later_time: self.later_time,
earlier_time: self.earlier_time,
chronological_order: self.chronological_order,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl GetResourceConfigHistoryInput {
#[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::GetResourceConfigHistory,
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::GetResourceConfigHistoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourceConfigHistoryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetResourceConfigHistory",
);
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_resource_config_history(
&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::GetResourceConfigHistory::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourceConfigHistory",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_config_history_input::Builder {
crate::input::get_resource_config_history_input::Builder::default()
}
}
pub mod get_resource_evaluation_summary_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_evaluation_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_evaluation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_evaluation_id = Some(input.into());
self
}
pub fn set_resource_evaluation_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_evaluation_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetResourceEvaluationSummaryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetResourceEvaluationSummaryInput {
resource_evaluation_id: self.resource_evaluation_id,
})
}
}
}
impl GetResourceEvaluationSummaryInput {
#[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::GetResourceEvaluationSummary,
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::GetResourceEvaluationSummaryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetResourceEvaluationSummaryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetResourceEvaluationSummary",
);
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_resource_evaluation_summary(&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::GetResourceEvaluationSummary::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetResourceEvaluationSummary",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_resource_evaluation_summary_input::Builder {
crate::input::get_resource_evaluation_summary_input::Builder::default()
}
}
pub mod get_stored_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) query_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn query_name(mut self, input: impl Into<std::string::String>) -> Self {
self.query_name = Some(input.into());
self
}
pub fn set_query_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.query_name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetStoredQueryInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetStoredQueryInput {
query_name: self.query_name,
})
}
}
}
impl GetStoredQueryInput {
#[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::GetStoredQuery,
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::GetStoredQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStoredQueryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.GetStoredQuery",
);
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_stored_query(&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::GetStoredQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStoredQuery",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_stored_query_input::Builder {
crate::input::get_stored_query_input::Builder::default()
}
}
pub mod list_aggregate_discovered_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<crate::model::ResourceType>,
pub(crate) filters: std::option::Option<crate::model::ResourceFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::ResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn filters(mut self, input: crate::model::ResourceFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ResourceFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::ListAggregateDiscoveredResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListAggregateDiscoveredResourcesInput {
configuration_aggregator_name: self.configuration_aggregator_name,
resource_type: self.resource_type,
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListAggregateDiscoveredResourcesInput {
#[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::ListAggregateDiscoveredResources,
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::ListAggregateDiscoveredResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAggregateDiscoveredResourcesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListAggregateDiscoveredResources",
);
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_list_aggregate_discovered_resources(&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::ListAggregateDiscoveredResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAggregateDiscoveredResources",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_aggregate_discovered_resources_input::Builder {
crate::input::list_aggregate_discovered_resources_input::Builder::default()
}
}
pub mod list_conformance_pack_compliance_scores_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters:
std::option::Option<crate::model::ConformancePackComplianceScoresFilters>,
pub(crate) sort_order: std::option::Option<crate::model::SortOrder>,
pub(crate) sort_by: std::option::Option<crate::model::SortBy>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(
mut self,
input: crate::model::ConformancePackComplianceScoresFilters,
) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ConformancePackComplianceScoresFilters>,
) -> Self {
self.filters = input;
self
}
pub fn sort_order(mut self, input: crate::model::SortOrder) -> Self {
self.sort_order = Some(input);
self
}
pub fn set_sort_order(
mut self,
input: std::option::Option<crate::model::SortOrder>,
) -> Self {
self.sort_order = input;
self
}
pub fn sort_by(mut self, input: crate::model::SortBy) -> Self {
self.sort_by = Some(input);
self
}
pub fn set_sort_by(mut self, input: std::option::Option<crate::model::SortBy>) -> Self {
self.sort_by = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::ListConformancePackComplianceScoresInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListConformancePackComplianceScoresInput {
filters: self.filters,
sort_order: self.sort_order,
sort_by: self.sort_by,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListConformancePackComplianceScoresInput {
#[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::ListConformancePackComplianceScores,
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::ListConformancePackComplianceScoresInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListConformancePackComplianceScoresInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListConformancePackComplianceScores",
);
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_list_conformance_pack_compliance_scores(&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::ListConformancePackComplianceScores::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListConformancePackComplianceScores",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_conformance_pack_compliance_scores_input::Builder {
crate::input::list_conformance_pack_compliance_scores_input::Builder::default()
}
}
pub mod list_discovered_resources_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::ResourceType>,
pub(crate) resource_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) resource_name: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) include_deleted_resources: std::option::Option<bool>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_type(mut self, input: crate::model::ResourceType) -> Self {
self.resource_type = Some(input);
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<crate::model::ResourceType>,
) -> Self {
self.resource_type = input;
self
}
pub fn resource_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.resource_ids.unwrap_or_default();
v.push(input.into());
self.resource_ids = Some(v);
self
}
pub fn set_resource_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.resource_ids = input;
self
}
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = input;
self
}
pub fn include_deleted_resources(mut self, input: bool) -> Self {
self.include_deleted_resources = Some(input);
self
}
pub fn set_include_deleted_resources(mut self, input: std::option::Option<bool>) -> Self {
self.include_deleted_resources = 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::ListDiscoveredResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListDiscoveredResourcesInput {
resource_type: self.resource_type,
resource_ids: self.resource_ids,
resource_name: self.resource_name,
limit: self.limit.unwrap_or_default(),
include_deleted_resources: self.include_deleted_resources.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListDiscoveredResourcesInput {
#[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::ListDiscoveredResources,
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::ListDiscoveredResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDiscoveredResourcesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListDiscoveredResources",
);
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_list_discovered_resources(
&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::ListDiscoveredResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDiscoveredResources",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_discovered_resources_input::Builder {
crate::input::list_discovered_resources_input::Builder::default()
}
}
pub mod list_resource_evaluations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<crate::model::ResourceEvaluationFilters>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: crate::model::ResourceEvaluationFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ResourceEvaluationFilters>,
) -> Self {
self.filters = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::ListResourceEvaluationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListResourceEvaluationsInput {
filters: self.filters,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListResourceEvaluationsInput {
#[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::ListResourceEvaluations,
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::ListResourceEvaluationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListResourceEvaluationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListResourceEvaluations",
);
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_list_resource_evaluations(
&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::ListResourceEvaluations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListResourceEvaluations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_resource_evaluations_input::Builder {
crate::input::list_resource_evaluations_input::Builder::default()
}
}
pub mod list_stored_queries_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::ListStoredQueriesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStoredQueriesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListStoredQueriesInput {
#[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::ListStoredQueries,
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::ListStoredQueriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStoredQueriesInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListStoredQueries",
);
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_list_stored_queries(&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::ListStoredQueries::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStoredQueries",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_stored_queries_input::Builder {
crate::input::list_stored_queries_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>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: 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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
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, "/").expect("formatting should succeed");
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)?;
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.ListTagsForResource",
);
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_list_tags_for_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::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"configservice",
));
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 put_aggregation_authorization_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) authorized_account_id: std::option::Option<std::string::String>,
pub(crate) authorized_aws_region: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn authorized_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.authorized_account_id = Some(input.into());
self
}
pub fn set_authorized_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.authorized_account_id = input;
self
}
pub fn authorized_aws_region(mut self, input: impl Into<std::string::String>) -> Self {
self.authorized_aws_region = Some(input.into());
self
}
pub fn set_authorized_aws_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.authorized_aws_region = 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::PutAggregationAuthorizationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutAggregationAuthorizationInput {
authorized_account_id: self.authorized_account_id,
authorized_aws_region: self.authorized_aws_region,
tags: self.tags,
})
}
}
}
impl PutAggregationAuthorizationInput {
#[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::PutAggregationAuthorization,
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::PutAggregationAuthorizationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutAggregationAuthorizationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutAggregationAuthorization",
);
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_aggregation_authorization(&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::PutAggregationAuthorization::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutAggregationAuthorization",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_aggregation_authorization_input::Builder {
crate::input::put_aggregation_authorization_input::Builder::default()
}
}
pub mod put_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule: std::option::Option<crate::model::ConfigRule>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn config_rule(mut self, input: crate::model::ConfigRule) -> Self {
self.config_rule = Some(input);
self
}
pub fn set_config_rule(
mut self,
input: std::option::Option<crate::model::ConfigRule>,
) -> Self {
self.config_rule = 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::PutConfigRuleInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::PutConfigRuleInput {
config_rule: self.config_rule,
tags: self.tags,
})
}
}
}
impl PutConfigRuleInput {
#[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::PutConfigRule,
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::PutConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutConfigRule",
);
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_config_rule(&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::PutConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_config_rule_input::Builder {
crate::input::put_config_rule_input::Builder::default()
}
}
pub mod put_configuration_aggregator_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) account_aggregation_sources:
std::option::Option<std::vec::Vec<crate::model::AccountAggregationSource>>,
pub(crate) organization_aggregation_source:
std::option::Option<crate::model::OrganizationAggregationSource>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn account_aggregation_sources(
mut self,
input: crate::model::AccountAggregationSource,
) -> Self {
let mut v = self.account_aggregation_sources.unwrap_or_default();
v.push(input);
self.account_aggregation_sources = Some(v);
self
}
pub fn set_account_aggregation_sources(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AccountAggregationSource>>,
) -> Self {
self.account_aggregation_sources = input;
self
}
pub fn organization_aggregation_source(
mut self,
input: crate::model::OrganizationAggregationSource,
) -> Self {
self.organization_aggregation_source = Some(input);
self
}
pub fn set_organization_aggregation_source(
mut self,
input: std::option::Option<crate::model::OrganizationAggregationSource>,
) -> Self {
self.organization_aggregation_source = 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::PutConfigurationAggregatorInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutConfigurationAggregatorInput {
configuration_aggregator_name: self.configuration_aggregator_name,
account_aggregation_sources: self.account_aggregation_sources,
organization_aggregation_source: self.organization_aggregation_source,
tags: self.tags,
})
}
}
}
impl PutConfigurationAggregatorInput {
#[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::PutConfigurationAggregator,
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::PutConfigurationAggregatorInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutConfigurationAggregatorInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutConfigurationAggregator",
);
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_configuration_aggregator(
&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::PutConfigurationAggregator::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutConfigurationAggregator",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_configuration_aggregator_input::Builder {
crate::input::put_configuration_aggregator_input::Builder::default()
}
}
pub mod put_configuration_recorder_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder: std::option::Option<crate::model::ConfigurationRecorder>,
}
impl Builder {
pub fn configuration_recorder(
mut self,
input: crate::model::ConfigurationRecorder,
) -> Self {
self.configuration_recorder = Some(input);
self
}
pub fn set_configuration_recorder(
mut self,
input: std::option::Option<crate::model::ConfigurationRecorder>,
) -> Self {
self.configuration_recorder = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutConfigurationRecorderInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutConfigurationRecorderInput {
configuration_recorder: self.configuration_recorder,
})
}
}
}
impl PutConfigurationRecorderInput {
#[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::PutConfigurationRecorder,
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::PutConfigurationRecorderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutConfigurationRecorderInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutConfigurationRecorder",
);
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_configuration_recorder(
&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::PutConfigurationRecorder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutConfigurationRecorder",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_configuration_recorder_input::Builder {
crate::input::put_configuration_recorder_input::Builder::default()
}
}
pub mod put_conformance_pack_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) conformance_pack_name: std::option::Option<std::string::String>,
pub(crate) template_s3_uri: std::option::Option<std::string::String>,
pub(crate) template_body: std::option::Option<std::string::String>,
pub(crate) delivery_s3_bucket: std::option::Option<std::string::String>,
pub(crate) delivery_s3_key_prefix: std::option::Option<std::string::String>,
pub(crate) conformance_pack_input_parameters:
std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
pub(crate) template_ssm_document_details:
std::option::Option<crate::model::TemplateSsmDocumentDetails>,
}
impl Builder {
pub fn conformance_pack_name(mut self, input: impl Into<std::string::String>) -> Self {
self.conformance_pack_name = Some(input.into());
self
}
pub fn set_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.conformance_pack_name = input;
self
}
pub fn template_s3_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.template_s3_uri = Some(input.into());
self
}
pub fn set_template_s3_uri(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_s3_uri = input;
self
}
pub fn template_body(mut self, input: impl Into<std::string::String>) -> Self {
self.template_body = Some(input.into());
self
}
pub fn set_template_body(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_body = input;
self
}
pub fn delivery_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_s3_bucket = Some(input.into());
self
}
pub fn set_delivery_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_s3_bucket = input;
self
}
pub fn delivery_s3_key_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_s3_key_prefix = Some(input.into());
self
}
pub fn set_delivery_s3_key_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_s3_key_prefix = input;
self
}
pub fn conformance_pack_input_parameters(
mut self,
input: crate::model::ConformancePackInputParameter,
) -> Self {
let mut v = self.conformance_pack_input_parameters.unwrap_or_default();
v.push(input);
self.conformance_pack_input_parameters = Some(v);
self
}
pub fn set_conformance_pack_input_parameters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
) -> Self {
self.conformance_pack_input_parameters = input;
self
}
pub fn template_ssm_document_details(
mut self,
input: crate::model::TemplateSsmDocumentDetails,
) -> Self {
self.template_ssm_document_details = Some(input);
self
}
pub fn set_template_ssm_document_details(
mut self,
input: std::option::Option<crate::model::TemplateSsmDocumentDetails>,
) -> Self {
self.template_ssm_document_details = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutConformancePackInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutConformancePackInput {
conformance_pack_name: self.conformance_pack_name,
template_s3_uri: self.template_s3_uri,
template_body: self.template_body,
delivery_s3_bucket: self.delivery_s3_bucket,
delivery_s3_key_prefix: self.delivery_s3_key_prefix,
conformance_pack_input_parameters: self.conformance_pack_input_parameters,
template_ssm_document_details: self.template_ssm_document_details,
})
}
}
}
impl PutConformancePackInput {
#[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::PutConformancePack,
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::PutConformancePackInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutConformancePackInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutConformancePack",
);
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_conformance_pack(&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::PutConformancePack::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutConformancePack",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_conformance_pack_input::Builder {
crate::input::put_conformance_pack_input::Builder::default()
}
}
pub mod put_delivery_channel_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) delivery_channel: std::option::Option<crate::model::DeliveryChannel>,
}
impl Builder {
pub fn delivery_channel(mut self, input: crate::model::DeliveryChannel) -> Self {
self.delivery_channel = Some(input);
self
}
pub fn set_delivery_channel(
mut self,
input: std::option::Option<crate::model::DeliveryChannel>,
) -> Self {
self.delivery_channel = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutDeliveryChannelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutDeliveryChannelInput {
delivery_channel: self.delivery_channel,
})
}
}
}
impl PutDeliveryChannelInput {
#[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::PutDeliveryChannel,
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::PutDeliveryChannelInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutDeliveryChannelInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutDeliveryChannel",
);
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_delivery_channel(&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::PutDeliveryChannel::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutDeliveryChannel",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_delivery_channel_input::Builder {
crate::input::put_delivery_channel_input::Builder::default()
}
}
pub mod put_evaluations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) evaluations: std::option::Option<std::vec::Vec<crate::model::Evaluation>>,
pub(crate) result_token: std::option::Option<std::string::String>,
pub(crate) test_mode: std::option::Option<bool>,
}
impl Builder {
pub fn evaluations(mut self, input: crate::model::Evaluation) -> Self {
let mut v = self.evaluations.unwrap_or_default();
v.push(input);
self.evaluations = Some(v);
self
}
pub fn set_evaluations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Evaluation>>,
) -> Self {
self.evaluations = input;
self
}
pub fn result_token(mut self, input: impl Into<std::string::String>) -> Self {
self.result_token = Some(input.into());
self
}
pub fn set_result_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.result_token = input;
self
}
pub fn test_mode(mut self, input: bool) -> Self {
self.test_mode = Some(input);
self
}
pub fn set_test_mode(mut self, input: std::option::Option<bool>) -> Self {
self.test_mode = input;
self
}
pub fn build(
self,
) -> Result<crate::input::PutEvaluationsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::PutEvaluationsInput {
evaluations: self.evaluations,
result_token: self.result_token,
test_mode: self.test_mode.unwrap_or_default(),
})
}
}
}
impl PutEvaluationsInput {
#[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::PutEvaluations,
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::PutEvaluationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutEvaluationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutEvaluations",
);
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_evaluations(&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::PutEvaluations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutEvaluations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_evaluations_input::Builder {
crate::input::put_evaluations_input::Builder::default()
}
}
pub mod put_external_evaluation_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) external_evaluation: std::option::Option<crate::model::ExternalEvaluation>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn external_evaluation(mut self, input: crate::model::ExternalEvaluation) -> Self {
self.external_evaluation = Some(input);
self
}
pub fn set_external_evaluation(
mut self,
input: std::option::Option<crate::model::ExternalEvaluation>,
) -> Self {
self.external_evaluation = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutExternalEvaluationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutExternalEvaluationInput {
config_rule_name: self.config_rule_name,
external_evaluation: self.external_evaluation,
})
}
}
}
impl PutExternalEvaluationInput {
#[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::PutExternalEvaluation,
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::PutExternalEvaluationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutExternalEvaluationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutExternalEvaluation",
);
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_external_evaluation(
&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::PutExternalEvaluation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutExternalEvaluation",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_external_evaluation_input::Builder {
crate::input::put_external_evaluation_input::Builder::default()
}
}
pub mod put_organization_config_rule_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_config_rule_name: std::option::Option<std::string::String>,
pub(crate) organization_managed_rule_metadata:
std::option::Option<crate::model::OrganizationManagedRuleMetadata>,
pub(crate) organization_custom_rule_metadata:
std::option::Option<crate::model::OrganizationCustomRuleMetadata>,
pub(crate) excluded_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) organization_custom_policy_rule_metadata:
std::option::Option<crate::model::OrganizationCustomPolicyRuleMetadata>,
}
impl Builder {
pub fn organization_config_rule_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_config_rule_name = Some(input.into());
self
}
pub fn set_organization_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_config_rule_name = input;
self
}
pub fn organization_managed_rule_metadata(
mut self,
input: crate::model::OrganizationManagedRuleMetadata,
) -> Self {
self.organization_managed_rule_metadata = Some(input);
self
}
pub fn set_organization_managed_rule_metadata(
mut self,
input: std::option::Option<crate::model::OrganizationManagedRuleMetadata>,
) -> Self {
self.organization_managed_rule_metadata = input;
self
}
pub fn organization_custom_rule_metadata(
mut self,
input: crate::model::OrganizationCustomRuleMetadata,
) -> Self {
self.organization_custom_rule_metadata = Some(input);
self
}
pub fn set_organization_custom_rule_metadata(
mut self,
input: std::option::Option<crate::model::OrganizationCustomRuleMetadata>,
) -> Self {
self.organization_custom_rule_metadata = input;
self
}
pub fn excluded_accounts(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.excluded_accounts.unwrap_or_default();
v.push(input.into());
self.excluded_accounts = Some(v);
self
}
pub fn set_excluded_accounts(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.excluded_accounts = input;
self
}
pub fn organization_custom_policy_rule_metadata(
mut self,
input: crate::model::OrganizationCustomPolicyRuleMetadata,
) -> Self {
self.organization_custom_policy_rule_metadata = Some(input);
self
}
pub fn set_organization_custom_policy_rule_metadata(
mut self,
input: std::option::Option<crate::model::OrganizationCustomPolicyRuleMetadata>,
) -> Self {
self.organization_custom_policy_rule_metadata = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutOrganizationConfigRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutOrganizationConfigRuleInput {
organization_config_rule_name: self.organization_config_rule_name,
organization_managed_rule_metadata: self.organization_managed_rule_metadata,
organization_custom_rule_metadata: self.organization_custom_rule_metadata,
excluded_accounts: self.excluded_accounts,
organization_custom_policy_rule_metadata: self
.organization_custom_policy_rule_metadata,
})
}
}
}
impl PutOrganizationConfigRuleInput {
#[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::PutOrganizationConfigRule,
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::PutOrganizationConfigRuleInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutOrganizationConfigRuleInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutOrganizationConfigRule",
);
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_organization_config_rule(
&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::PutOrganizationConfigRule::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutOrganizationConfigRule",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_organization_config_rule_input::Builder {
crate::input::put_organization_config_rule_input::Builder::default()
}
}
pub mod put_organization_conformance_pack_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) organization_conformance_pack_name: std::option::Option<std::string::String>,
pub(crate) template_s3_uri: std::option::Option<std::string::String>,
pub(crate) template_body: std::option::Option<std::string::String>,
pub(crate) delivery_s3_bucket: std::option::Option<std::string::String>,
pub(crate) delivery_s3_key_prefix: std::option::Option<std::string::String>,
pub(crate) conformance_pack_input_parameters:
std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
pub(crate) excluded_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn organization_conformance_pack_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = Some(input.into());
self
}
pub fn set_organization_conformance_pack_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_conformance_pack_name = input;
self
}
pub fn template_s3_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.template_s3_uri = Some(input.into());
self
}
pub fn set_template_s3_uri(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_s3_uri = input;
self
}
pub fn template_body(mut self, input: impl Into<std::string::String>) -> Self {
self.template_body = Some(input.into());
self
}
pub fn set_template_body(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_body = input;
self
}
pub fn delivery_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_s3_bucket = Some(input.into());
self
}
pub fn set_delivery_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_s3_bucket = input;
self
}
pub fn delivery_s3_key_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.delivery_s3_key_prefix = Some(input.into());
self
}
pub fn set_delivery_s3_key_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delivery_s3_key_prefix = input;
self
}
pub fn conformance_pack_input_parameters(
mut self,
input: crate::model::ConformancePackInputParameter,
) -> Self {
let mut v = self.conformance_pack_input_parameters.unwrap_or_default();
v.push(input);
self.conformance_pack_input_parameters = Some(v);
self
}
pub fn set_conformance_pack_input_parameters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
) -> Self {
self.conformance_pack_input_parameters = input;
self
}
pub fn excluded_accounts(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.excluded_accounts.unwrap_or_default();
v.push(input.into());
self.excluded_accounts = Some(v);
self
}
pub fn set_excluded_accounts(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.excluded_accounts = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutOrganizationConformancePackInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutOrganizationConformancePackInput {
organization_conformance_pack_name: self.organization_conformance_pack_name,
template_s3_uri: self.template_s3_uri,
template_body: self.template_body,
delivery_s3_bucket: self.delivery_s3_bucket,
delivery_s3_key_prefix: self.delivery_s3_key_prefix,
conformance_pack_input_parameters: self.conformance_pack_input_parameters,
excluded_accounts: self.excluded_accounts,
})
}
}
}
impl PutOrganizationConformancePackInput {
#[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::PutOrganizationConformancePack,
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::PutOrganizationConformancePackInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutOrganizationConformancePackInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutOrganizationConformancePack",
);
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_organization_conformance_pack(&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::PutOrganizationConformancePack::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutOrganizationConformancePack",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_organization_conformance_pack_input::Builder {
crate::input::put_organization_conformance_pack_input::Builder::default()
}
}
pub mod put_remediation_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) remediation_configurations:
std::option::Option<std::vec::Vec<crate::model::RemediationConfiguration>>,
}
impl Builder {
pub fn remediation_configurations(
mut self,
input: crate::model::RemediationConfiguration,
) -> Self {
let mut v = self.remediation_configurations.unwrap_or_default();
v.push(input);
self.remediation_configurations = Some(v);
self
}
pub fn set_remediation_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RemediationConfiguration>>,
) -> Self {
self.remediation_configurations = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutRemediationConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutRemediationConfigurationsInput {
remediation_configurations: self.remediation_configurations,
})
}
}
}
impl PutRemediationConfigurationsInput {
#[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::PutRemediationConfigurations,
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::PutRemediationConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutRemediationConfigurationsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutRemediationConfigurations",
);
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_remediation_configurations(&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::PutRemediationConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutRemediationConfigurations",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_remediation_configurations_input::Builder {
crate::input::put_remediation_configurations_input::Builder::default()
}
}
pub mod put_remediation_exceptions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) expiration_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn resource_keys(
mut self,
input: crate::model::RemediationExceptionResourceKey,
) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::RemediationExceptionResourceKey>,
>,
) -> Self {
self.resource_keys = input;
self
}
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn expiration_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.expiration_time = Some(input);
self
}
pub fn set_expiration_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.expiration_time = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutRemediationExceptionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutRemediationExceptionsInput {
config_rule_name: self.config_rule_name,
resource_keys: self.resource_keys,
message: self.message,
expiration_time: self.expiration_time,
})
}
}
}
impl PutRemediationExceptionsInput {
#[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::PutRemediationExceptions,
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::PutRemediationExceptionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutRemediationExceptionsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutRemediationExceptions",
);
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_remediation_exceptions(
&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::PutRemediationExceptions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutRemediationExceptions",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_remediation_exceptions_input::Builder {
crate::input::put_remediation_exceptions_input::Builder::default()
}
}
pub mod put_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) schema_version_id: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_name: std::option::Option<std::string::String>,
pub(crate) configuration: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
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 schema_version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.schema_version_id = Some(input.into());
self
}
pub fn set_schema_version_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.schema_version_id = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn configuration(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration = Some(input.into());
self
}
pub fn set_configuration(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutResourceConfigInput {
resource_type: self.resource_type,
schema_version_id: self.schema_version_id,
resource_id: self.resource_id,
resource_name: self.resource_name,
configuration: self.configuration,
tags: self.tags,
})
}
}
}
impl PutResourceConfigInput {
#[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::PutResourceConfig,
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::PutResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutResourceConfig",
);
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_config(&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::PutResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_resource_config_input::Builder {
crate::input::put_resource_config_input::Builder::default()
}
}
pub mod put_retention_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) retention_period_in_days: std::option::Option<i32>,
}
impl Builder {
pub fn retention_period_in_days(mut self, input: i32) -> Self {
self.retention_period_in_days = Some(input);
self
}
pub fn set_retention_period_in_days(mut self, input: std::option::Option<i32>) -> Self {
self.retention_period_in_days = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutRetentionConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutRetentionConfigurationInput {
retention_period_in_days: self.retention_period_in_days.unwrap_or_default(),
})
}
}
}
impl PutRetentionConfigurationInput {
#[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::PutRetentionConfiguration,
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::PutRetentionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutRetentionConfigurationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutRetentionConfiguration",
);
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_retention_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::PutRetentionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutRetentionConfiguration",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_retention_configuration_input::Builder {
crate::input::put_retention_configuration_input::Builder::default()
}
}
pub mod put_stored_query_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) stored_query: std::option::Option<crate::model::StoredQuery>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn stored_query(mut self, input: crate::model::StoredQuery) -> Self {
self.stored_query = Some(input);
self
}
pub fn set_stored_query(
mut self,
input: std::option::Option<crate::model::StoredQuery>,
) -> Self {
self.stored_query = 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::PutStoredQueryInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::PutStoredQueryInput {
stored_query: self.stored_query,
tags: self.tags,
})
}
}
}
impl PutStoredQueryInput {
#[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::PutStoredQuery,
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::PutStoredQueryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutStoredQueryInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.PutStoredQuery",
);
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_stored_query(&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::PutStoredQuery::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutStoredQuery",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_stored_query_input::Builder {
crate::input::put_stored_query_input::Builder::default()
}
}
pub mod select_aggregate_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) expression: std::option::Option<std::string::String>,
pub(crate) configuration_aggregator_name: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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 configuration_aggregator_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_aggregator_name = Some(input.into());
self
}
pub fn set_configuration_aggregator_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_aggregator_name = input;
self
}
pub fn limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::SelectAggregateResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SelectAggregateResourceConfigInput {
expression: self.expression,
configuration_aggregator_name: self.configuration_aggregator_name,
limit: self.limit.unwrap_or_default(),
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl SelectAggregateResourceConfigInput {
#[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::SelectAggregateResourceConfig,
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::SelectAggregateResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SelectAggregateResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.SelectAggregateResourceConfig",
);
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_select_aggregate_resource_config(&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::SelectAggregateResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SelectAggregateResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::select_aggregate_resource_config_input::Builder {
crate::input::select_aggregate_resource_config_input::Builder::default()
}
}
pub mod select_resource_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) expression: std::option::Option<std::string::String>,
pub(crate) limit: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
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 limit(mut self, input: i32) -> Self {
self.limit = Some(input);
self
}
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.limit = 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::SelectResourceConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SelectResourceConfigInput {
expression: self.expression,
limit: self.limit.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl SelectResourceConfigInput {
#[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::SelectResourceConfig,
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::SelectResourceConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SelectResourceConfigInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.SelectResourceConfig",
);
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_select_resource_config(
&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::SelectResourceConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SelectResourceConfig",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::select_resource_config_input::Builder {
crate::input::select_resource_config_input::Builder::default()
}
}
pub mod start_config_rules_evaluation_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn config_rule_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.config_rule_names.unwrap_or_default();
v.push(input.into());
self.config_rule_names = Some(v);
self
}
pub fn set_config_rule_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.config_rule_names = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartConfigRulesEvaluationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartConfigRulesEvaluationInput {
config_rule_names: self.config_rule_names,
})
}
}
}
impl StartConfigRulesEvaluationInput {
#[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::StartConfigRulesEvaluation,
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::StartConfigRulesEvaluationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartConfigRulesEvaluationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.StartConfigRulesEvaluation",
);
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_config_rules_evaluation(&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::StartConfigRulesEvaluation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartConfigRulesEvaluation",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_config_rules_evaluation_input::Builder {
crate::input::start_config_rules_evaluation_input::Builder::default()
}
}
pub mod start_configuration_recorder_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_recorder_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_recorder_name = Some(input.into());
self
}
pub fn set_configuration_recorder_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_recorder_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartConfigurationRecorderInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartConfigurationRecorderInput {
configuration_recorder_name: self.configuration_recorder_name,
})
}
}
}
impl StartConfigurationRecorderInput {
#[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::StartConfigurationRecorder,
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::StartConfigurationRecorderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartConfigurationRecorderInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.StartConfigurationRecorder",
);
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_configuration_recorder(
&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::StartConfigurationRecorder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartConfigurationRecorder",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_configuration_recorder_input::Builder {
crate::input::start_configuration_recorder_input::Builder::default()
}
}
pub mod start_remediation_execution_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) config_rule_name: std::option::Option<std::string::String>,
pub(crate) resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
}
impl Builder {
pub fn config_rule_name(mut self, input: impl Into<std::string::String>) -> Self {
self.config_rule_name = Some(input.into());
self
}
pub fn set_config_rule_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.config_rule_name = input;
self
}
pub fn resource_keys(mut self, input: crate::model::ResourceKey) -> Self {
let mut v = self.resource_keys.unwrap_or_default();
v.push(input);
self.resource_keys = Some(v);
self
}
pub fn set_resource_keys(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
) -> Self {
self.resource_keys = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartRemediationExecutionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartRemediationExecutionInput {
config_rule_name: self.config_rule_name,
resource_keys: self.resource_keys,
})
}
}
}
impl StartRemediationExecutionInput {
#[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::StartRemediationExecution,
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::StartRemediationExecutionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartRemediationExecutionInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.StartRemediationExecution",
);
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_remediation_execution(
&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::StartRemediationExecution::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartRemediationExecution",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_remediation_execution_input::Builder {
crate::input::start_remediation_execution_input::Builder::default()
}
}
pub mod start_resource_evaluation_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_details: std::option::Option<crate::model::ResourceDetails>,
pub(crate) evaluation_context: std::option::Option<crate::model::EvaluationContext>,
pub(crate) evaluation_mode: std::option::Option<crate::model::EvaluationMode>,
pub(crate) evaluation_timeout: std::option::Option<i32>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_details(mut self, input: crate::model::ResourceDetails) -> Self {
self.resource_details = Some(input);
self
}
pub fn set_resource_details(
mut self,
input: std::option::Option<crate::model::ResourceDetails>,
) -> Self {
self.resource_details = input;
self
}
pub fn evaluation_context(mut self, input: crate::model::EvaluationContext) -> Self {
self.evaluation_context = Some(input);
self
}
pub fn set_evaluation_context(
mut self,
input: std::option::Option<crate::model::EvaluationContext>,
) -> Self {
self.evaluation_context = input;
self
}
pub fn evaluation_mode(mut self, input: crate::model::EvaluationMode) -> Self {
self.evaluation_mode = Some(input);
self
}
pub fn set_evaluation_mode(
mut self,
input: std::option::Option<crate::model::EvaluationMode>,
) -> Self {
self.evaluation_mode = input;
self
}
pub fn evaluation_timeout(mut self, input: i32) -> Self {
self.evaluation_timeout = Some(input);
self
}
pub fn set_evaluation_timeout(mut self, input: std::option::Option<i32>) -> Self {
self.evaluation_timeout = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartResourceEvaluationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartResourceEvaluationInput {
resource_details: self.resource_details,
evaluation_context: self.evaluation_context,
evaluation_mode: self.evaluation_mode,
evaluation_timeout: self.evaluation_timeout.unwrap_or_default(),
client_token: self.client_token,
})
}
}
}
impl StartResourceEvaluationInput {
#[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::StartResourceEvaluation,
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::StartResourceEvaluationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartResourceEvaluationInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.StartResourceEvaluation",
);
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_resource_evaluation(
&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::StartResourceEvaluation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartResourceEvaluation",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_resource_evaluation_input::Builder {
crate::input::start_resource_evaluation_input::Builder::default()
}
}
pub mod stop_configuration_recorder_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_recorder_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_recorder_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.configuration_recorder_name = Some(input.into());
self
}
pub fn set_configuration_recorder_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_recorder_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StopConfigurationRecorderInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StopConfigurationRecorderInput {
configuration_recorder_name: self.configuration_recorder_name,
})
}
}
}
impl StopConfigurationRecorderInput {
#[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::StopConfigurationRecorder,
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::StopConfigurationRecorderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopConfigurationRecorderInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.StopConfigurationRecorder",
);
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_stop_configuration_recorder(
&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::StopConfigurationRecorder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopConfigurationRecorder",
"configservice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::stop_configuration_recorder_input::Builder {
crate::input::stop_configuration_recorder_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, "/").expect("formatting should succeed");
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)?;
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.TagResource",
);
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",
"configservice",
));
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 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, "/").expect("formatting should succeed");
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)?;
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"StarlingDoveService.UntagResource",
);
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_untag_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::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"configservice",
));
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()
}
}
#[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 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()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StopConfigurationRecorderInput {
#[doc(hidden)]
pub configuration_recorder_name: std::option::Option<std::string::String>,
}
impl StopConfigurationRecorderInput {
pub fn configuration_recorder_name(&self) -> std::option::Option<&str> {
self.configuration_recorder_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartResourceEvaluationInput {
#[doc(hidden)]
pub resource_details: std::option::Option<crate::model::ResourceDetails>,
#[doc(hidden)]
pub evaluation_context: std::option::Option<crate::model::EvaluationContext>,
#[doc(hidden)]
pub evaluation_mode: std::option::Option<crate::model::EvaluationMode>,
#[doc(hidden)]
pub evaluation_timeout: i32,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
}
impl StartResourceEvaluationInput {
pub fn resource_details(&self) -> std::option::Option<&crate::model::ResourceDetails> {
self.resource_details.as_ref()
}
pub fn evaluation_context(&self) -> std::option::Option<&crate::model::EvaluationContext> {
self.evaluation_context.as_ref()
}
pub fn evaluation_mode(&self) -> std::option::Option<&crate::model::EvaluationMode> {
self.evaluation_mode.as_ref()
}
pub fn evaluation_timeout(&self) -> i32 {
self.evaluation_timeout
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartRemediationExecutionInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
}
impl StartRemediationExecutionInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn resource_keys(&self) -> std::option::Option<&[crate::model::ResourceKey]> {
self.resource_keys.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartConfigurationRecorderInput {
#[doc(hidden)]
pub configuration_recorder_name: std::option::Option<std::string::String>,
}
impl StartConfigurationRecorderInput {
pub fn configuration_recorder_name(&self) -> std::option::Option<&str> {
self.configuration_recorder_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartConfigRulesEvaluationInput {
#[doc(hidden)]
pub config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl StartConfigRulesEvaluationInput {
pub fn config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.config_rule_names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SelectResourceConfigInput {
#[doc(hidden)]
pub expression: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl SelectResourceConfigInput {
pub fn expression(&self) -> std::option::Option<&str> {
self.expression.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 SelectAggregateResourceConfigInput {
#[doc(hidden)]
pub expression: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl SelectAggregateResourceConfigInput {
pub fn expression(&self) -> std::option::Option<&str> {
self.expression.as_deref()
}
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 PutStoredQueryInput {
#[doc(hidden)]
pub stored_query: std::option::Option<crate::model::StoredQuery>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl PutStoredQueryInput {
pub fn stored_query(&self) -> std::option::Option<&crate::model::StoredQuery> {
self.stored_query.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 PutRetentionConfigurationInput {
#[doc(hidden)]
pub retention_period_in_days: i32,
}
impl PutRetentionConfigurationInput {
pub fn retention_period_in_days(&self) -> i32 {
self.retention_period_in_days
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutResourceConfigInput {
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub schema_version_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configuration: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl PutResourceConfigInput {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn schema_version_id(&self) -> std::option::Option<&str> {
self.schema_version_id.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
pub fn configuration(&self) -> std::option::Option<&str> {
self.configuration.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutRemediationExceptionsInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expiration_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl PutRemediationExceptionsInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn resource_keys(
&self,
) -> std::option::Option<&[crate::model::RemediationExceptionResourceKey]> {
self.resource_keys.as_deref()
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
pub fn expiration_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.expiration_time.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutRemediationConfigurationsInput {
#[doc(hidden)]
pub remediation_configurations:
std::option::Option<std::vec::Vec<crate::model::RemediationConfiguration>>,
}
impl PutRemediationConfigurationsInput {
pub fn remediation_configurations(
&self,
) -> std::option::Option<&[crate::model::RemediationConfiguration]> {
self.remediation_configurations.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutOrganizationConformancePackInput {
#[doc(hidden)]
pub organization_conformance_pack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_s3_uri: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_body: std::option::Option<std::string::String>,
#[doc(hidden)]
pub delivery_s3_bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub delivery_s3_key_prefix: std::option::Option<std::string::String>,
#[doc(hidden)]
pub conformance_pack_input_parameters:
std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
#[doc(hidden)]
pub excluded_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl PutOrganizationConformancePackInput {
pub fn organization_conformance_pack_name(&self) -> std::option::Option<&str> {
self.organization_conformance_pack_name.as_deref()
}
pub fn template_s3_uri(&self) -> std::option::Option<&str> {
self.template_s3_uri.as_deref()
}
pub fn template_body(&self) -> std::option::Option<&str> {
self.template_body.as_deref()
}
pub fn delivery_s3_bucket(&self) -> std::option::Option<&str> {
self.delivery_s3_bucket.as_deref()
}
pub fn delivery_s3_key_prefix(&self) -> std::option::Option<&str> {
self.delivery_s3_key_prefix.as_deref()
}
pub fn conformance_pack_input_parameters(
&self,
) -> std::option::Option<&[crate::model::ConformancePackInputParameter]> {
self.conformance_pack_input_parameters.as_deref()
}
pub fn excluded_accounts(&self) -> std::option::Option<&[std::string::String]> {
self.excluded_accounts.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutOrganizationConfigRuleInput {
#[doc(hidden)]
pub organization_config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub organization_managed_rule_metadata:
std::option::Option<crate::model::OrganizationManagedRuleMetadata>,
#[doc(hidden)]
pub organization_custom_rule_metadata:
std::option::Option<crate::model::OrganizationCustomRuleMetadata>,
#[doc(hidden)]
pub excluded_accounts: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub organization_custom_policy_rule_metadata:
std::option::Option<crate::model::OrganizationCustomPolicyRuleMetadata>,
}
impl PutOrganizationConfigRuleInput {
pub fn organization_config_rule_name(&self) -> std::option::Option<&str> {
self.organization_config_rule_name.as_deref()
}
pub fn organization_managed_rule_metadata(
&self,
) -> std::option::Option<&crate::model::OrganizationManagedRuleMetadata> {
self.organization_managed_rule_metadata.as_ref()
}
pub fn organization_custom_rule_metadata(
&self,
) -> std::option::Option<&crate::model::OrganizationCustomRuleMetadata> {
self.organization_custom_rule_metadata.as_ref()
}
pub fn excluded_accounts(&self) -> std::option::Option<&[std::string::String]> {
self.excluded_accounts.as_deref()
}
pub fn organization_custom_policy_rule_metadata(
&self,
) -> std::option::Option<&crate::model::OrganizationCustomPolicyRuleMetadata> {
self.organization_custom_policy_rule_metadata.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutExternalEvaluationInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub external_evaluation: std::option::Option<crate::model::ExternalEvaluation>,
}
impl PutExternalEvaluationInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn external_evaluation(&self) -> std::option::Option<&crate::model::ExternalEvaluation> {
self.external_evaluation.as_ref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutEvaluationsInput {
#[doc(hidden)]
pub evaluations: std::option::Option<std::vec::Vec<crate::model::Evaluation>>,
#[doc(hidden)]
pub result_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub test_mode: bool,
}
impl PutEvaluationsInput {
pub fn evaluations(&self) -> std::option::Option<&[crate::model::Evaluation]> {
self.evaluations.as_deref()
}
pub fn result_token(&self) -> std::option::Option<&str> {
self.result_token.as_deref()
}
pub fn test_mode(&self) -> bool {
self.test_mode
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutDeliveryChannelInput {
#[doc(hidden)]
pub delivery_channel: std::option::Option<crate::model::DeliveryChannel>,
}
impl PutDeliveryChannelInput {
pub fn delivery_channel(&self) -> std::option::Option<&crate::model::DeliveryChannel> {
self.delivery_channel.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutConformancePackInput {
#[doc(hidden)]
pub conformance_pack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_s3_uri: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_body: std::option::Option<std::string::String>,
#[doc(hidden)]
pub delivery_s3_bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub delivery_s3_key_prefix: std::option::Option<std::string::String>,
#[doc(hidden)]
pub conformance_pack_input_parameters:
std::option::Option<std::vec::Vec<crate::model::ConformancePackInputParameter>>,
#[doc(hidden)]
pub template_ssm_document_details:
std::option::Option<crate::model::TemplateSsmDocumentDetails>,
}
impl PutConformancePackInput {
pub fn conformance_pack_name(&self) -> std::option::Option<&str> {
self.conformance_pack_name.as_deref()
}
pub fn template_s3_uri(&self) -> std::option::Option<&str> {
self.template_s3_uri.as_deref()
}
pub fn template_body(&self) -> std::option::Option<&str> {
self.template_body.as_deref()
}
pub fn delivery_s3_bucket(&self) -> std::option::Option<&str> {
self.delivery_s3_bucket.as_deref()
}
pub fn delivery_s3_key_prefix(&self) -> std::option::Option<&str> {
self.delivery_s3_key_prefix.as_deref()
}
pub fn conformance_pack_input_parameters(
&self,
) -> std::option::Option<&[crate::model::ConformancePackInputParameter]> {
self.conformance_pack_input_parameters.as_deref()
}
pub fn template_ssm_document_details(
&self,
) -> std::option::Option<&crate::model::TemplateSsmDocumentDetails> {
self.template_ssm_document_details.as_ref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutConfigurationRecorderInput {
#[doc(hidden)]
pub configuration_recorder: std::option::Option<crate::model::ConfigurationRecorder>,
}
impl PutConfigurationRecorderInput {
pub fn configuration_recorder(
&self,
) -> std::option::Option<&crate::model::ConfigurationRecorder> {
self.configuration_recorder.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutConfigurationAggregatorInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub account_aggregation_sources:
std::option::Option<std::vec::Vec<crate::model::AccountAggregationSource>>,
#[doc(hidden)]
pub organization_aggregation_source:
std::option::Option<crate::model::OrganizationAggregationSource>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl PutConfigurationAggregatorInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn account_aggregation_sources(
&self,
) -> std::option::Option<&[crate::model::AccountAggregationSource]> {
self.account_aggregation_sources.as_deref()
}
pub fn organization_aggregation_source(
&self,
) -> std::option::Option<&crate::model::OrganizationAggregationSource> {
self.organization_aggregation_source.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 PutConfigRuleInput {
#[doc(hidden)]
pub config_rule: std::option::Option<crate::model::ConfigRule>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl PutConfigRuleInput {
pub fn config_rule(&self) -> std::option::Option<&crate::model::ConfigRule> {
self.config_rule.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 PutAggregationAuthorizationInput {
#[doc(hidden)]
pub authorized_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub authorized_aws_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl PutAggregationAuthorizationInput {
pub fn authorized_account_id(&self) -> std::option::Option<&str> {
self.authorized_account_id.as_deref()
}
pub fn authorized_aws_region(&self) -> std::option::Option<&str> {
self.authorized_aws_region.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 ListTagsForResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 ListStoredQueriesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListStoredQueriesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListResourceEvaluationsInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ResourceEvaluationFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListResourceEvaluationsInput {
pub fn filters(&self) -> std::option::Option<&crate::model::ResourceEvaluationFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListDiscoveredResourcesInput {
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::ResourceType>,
#[doc(hidden)]
pub resource_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub include_deleted_resources: bool,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListDiscoveredResourcesInput {
pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
self.resource_type.as_ref()
}
pub fn resource_ids(&self) -> std::option::Option<&[std::string::String]> {
self.resource_ids.as_deref()
}
pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn include_deleted_resources(&self) -> bool {
self.include_deleted_resources
}
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 ListConformancePackComplianceScoresInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ConformancePackComplianceScoresFilters>,
#[doc(hidden)]
pub sort_order: std::option::Option<crate::model::SortOrder>,
#[doc(hidden)]
pub sort_by: std::option::Option<crate::model::SortBy>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListConformancePackComplianceScoresInput {
pub fn filters(
&self,
) -> std::option::Option<&crate::model::ConformancePackComplianceScoresFilters> {
self.filters.as_ref()
}
pub fn sort_order(&self) -> std::option::Option<&crate::model::SortOrder> {
self.sort_order.as_ref()
}
pub fn sort_by(&self) -> std::option::Option<&crate::model::SortBy> {
self.sort_by.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 ListAggregateDiscoveredResourcesInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::ResourceType>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ResourceFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListAggregateDiscoveredResourcesInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
self.resource_type.as_ref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::ResourceFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetStoredQueryInput {
#[doc(hidden)]
pub query_name: std::option::Option<std::string::String>,
}
impl GetStoredQueryInput {
pub fn query_name(&self) -> std::option::Option<&str> {
self.query_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourceEvaluationSummaryInput {
#[doc(hidden)]
pub resource_evaluation_id: std::option::Option<std::string::String>,
}
impl GetResourceEvaluationSummaryInput {
pub fn resource_evaluation_id(&self) -> std::option::Option<&str> {
self.resource_evaluation_id.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetResourceConfigHistoryInput {
#[doc(hidden)]
pub resource_type: std::option::Option<crate::model::ResourceType>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub later_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub earlier_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub chronological_order: std::option::Option<crate::model::ChronologicalOrder>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetResourceConfigHistoryInput {
pub fn resource_type(&self) -> std::option::Option<&crate::model::ResourceType> {
self.resource_type.as_ref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn later_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.later_time.as_ref()
}
pub fn earlier_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.earlier_time.as_ref()
}
pub fn chronological_order(&self) -> std::option::Option<&crate::model::ChronologicalOrder> {
self.chronological_order.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetOrganizationCustomRulePolicyInput {
#[doc(hidden)]
pub organization_config_rule_name: std::option::Option<std::string::String>,
}
impl GetOrganizationCustomRulePolicyInput {
pub fn organization_config_rule_name(&self) -> std::option::Option<&str> {
self.organization_config_rule_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetOrganizationConformancePackDetailedStatusInput {
#[doc(hidden)]
pub organization_conformance_pack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::OrganizationResourceDetailedStatusFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetOrganizationConformancePackDetailedStatusInput {
pub fn organization_conformance_pack_name(&self) -> std::option::Option<&str> {
self.organization_conformance_pack_name.as_deref()
}
pub fn filters(
&self,
) -> std::option::Option<&crate::model::OrganizationResourceDetailedStatusFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetOrganizationConfigRuleDetailedStatusInput {
#[doc(hidden)]
pub organization_config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::StatusDetailFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetOrganizationConfigRuleDetailedStatusInput {
pub fn organization_config_rule_name(&self) -> std::option::Option<&str> {
self.organization_config_rule_name.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::StatusDetailFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetDiscoveredResourceCountsInput {
#[doc(hidden)]
pub resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetDiscoveredResourceCountsInput {
pub fn resource_types(&self) -> std::option::Option<&[std::string::String]> {
self.resource_types.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetCustomRulePolicyInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
}
impl GetCustomRulePolicyInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetConformancePackComplianceSummaryInput {
#[doc(hidden)]
pub conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetConformancePackComplianceSummaryInput {
pub fn conformance_pack_names(&self) -> std::option::Option<&[std::string::String]> {
self.conformance_pack_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetConformancePackComplianceDetailsInput {
#[doc(hidden)]
pub conformance_pack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ConformancePackEvaluationFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetConformancePackComplianceDetailsInput {
pub fn conformance_pack_name(&self) -> std::option::Option<&str> {
self.conformance_pack_name.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::ConformancePackEvaluationFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetComplianceSummaryByResourceTypeInput {
#[doc(hidden)]
pub resource_types: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl GetComplianceSummaryByResourceTypeInput {
pub fn resource_types(&self) -> std::option::Option<&[std::string::String]> {
self.resource_types.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetComplianceSummaryByConfigRuleInput {}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetComplianceDetailsByResourceInput {
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub compliance_types: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_evaluation_id: std::option::Option<std::string::String>,
}
impl GetComplianceDetailsByResourceInput {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn compliance_types(&self) -> std::option::Option<&[crate::model::ComplianceType]> {
self.compliance_types.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn resource_evaluation_id(&self) -> std::option::Option<&str> {
self.resource_evaluation_id.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetComplianceDetailsByConfigRuleInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub compliance_types: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetComplianceDetailsByConfigRuleInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn compliance_types(&self) -> std::option::Option<&[crate::model::ComplianceType]> {
self.compliance_types.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetAggregateResourceConfigInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_identifier: std::option::Option<crate::model::AggregateResourceIdentifier>,
}
impl GetAggregateResourceConfigInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn resource_identifier(
&self,
) -> std::option::Option<&crate::model::AggregateResourceIdentifier> {
self.resource_identifier.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetAggregateDiscoveredResourceCountsInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ResourceCountFilters>,
#[doc(hidden)]
pub group_by_key: std::option::Option<crate::model::ResourceCountGroupKey>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetAggregateDiscoveredResourceCountsInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::ResourceCountFilters> {
self.filters.as_ref()
}
pub fn group_by_key(&self) -> std::option::Option<&crate::model::ResourceCountGroupKey> {
self.group_by_key.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetAggregateConformancePackComplianceSummaryInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters:
std::option::Option<crate::model::AggregateConformancePackComplianceSummaryFilters>,
#[doc(hidden)]
pub group_by_key:
std::option::Option<crate::model::AggregateConformancePackComplianceSummaryGroupKey>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetAggregateConformancePackComplianceSummaryInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn filters(
&self,
) -> std::option::Option<&crate::model::AggregateConformancePackComplianceSummaryFilters> {
self.filters.as_ref()
}
pub fn group_by_key(
&self,
) -> std::option::Option<&crate::model::AggregateConformancePackComplianceSummaryGroupKey> {
self.group_by_key.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetAggregateConfigRuleComplianceSummaryInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ConfigRuleComplianceSummaryFilters>,
#[doc(hidden)]
pub group_by_key: std::option::Option<crate::model::ConfigRuleComplianceSummaryGroupKey>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetAggregateConfigRuleComplianceSummaryInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn filters(
&self,
) -> std::option::Option<&crate::model::ConfigRuleComplianceSummaryFilters> {
self.filters.as_ref()
}
pub fn group_by_key(
&self,
) -> std::option::Option<&crate::model::ConfigRuleComplianceSummaryGroupKey> {
self.group_by_key.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 GetAggregateComplianceDetailsByConfigRuleInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub aws_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub compliance_type: std::option::Option<crate::model::ComplianceType>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl GetAggregateComplianceDetailsByConfigRuleInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn account_id(&self) -> std::option::Option<&str> {
self.account_id.as_deref()
}
pub fn aws_region(&self) -> std::option::Option<&str> {
self.aws_region.as_deref()
}
pub fn compliance_type(&self) -> std::option::Option<&crate::model::ComplianceType> {
self.compliance_type.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeRetentionConfigurationsInput {
#[doc(hidden)]
pub retention_configuration_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeRetentionConfigurationsInput {
pub fn retention_configuration_names(&self) -> std::option::Option<&[std::string::String]> {
self.retention_configuration_names.as_deref()
}
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 DescribeRemediationExecutionStatusInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeRemediationExecutionStatusInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn resource_keys(&self) -> std::option::Option<&[crate::model::ResourceKey]> {
self.resource_keys.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeRemediationExceptionsInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeRemediationExceptionsInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn resource_keys(
&self,
) -> std::option::Option<&[crate::model::RemediationExceptionResourceKey]> {
self.resource_keys.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeRemediationConfigurationsInput {
#[doc(hidden)]
pub config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeRemediationConfigurationsInput {
pub fn config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.config_rule_names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribePendingAggregationRequestsInput {
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribePendingAggregationRequestsInput {
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeOrganizationConformancePackStatusesInput {
#[doc(hidden)]
pub organization_conformance_pack_names:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeOrganizationConformancePackStatusesInput {
pub fn organization_conformance_pack_names(
&self,
) -> std::option::Option<&[std::string::String]> {
self.organization_conformance_pack_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeOrganizationConformancePacksInput {
#[doc(hidden)]
pub organization_conformance_pack_names:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeOrganizationConformancePacksInput {
pub fn organization_conformance_pack_names(
&self,
) -> std::option::Option<&[std::string::String]> {
self.organization_conformance_pack_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeOrganizationConfigRuleStatusesInput {
#[doc(hidden)]
pub organization_config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeOrganizationConfigRuleStatusesInput {
pub fn organization_config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.organization_config_rule_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeOrganizationConfigRulesInput {
#[doc(hidden)]
pub organization_config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeOrganizationConfigRulesInput {
pub fn organization_config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.organization_config_rule_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDeliveryChannelStatusInput {
#[doc(hidden)]
pub delivery_channel_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeDeliveryChannelStatusInput {
pub fn delivery_channel_names(&self) -> std::option::Option<&[std::string::String]> {
self.delivery_channel_names.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDeliveryChannelsInput {
#[doc(hidden)]
pub delivery_channel_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeDeliveryChannelsInput {
pub fn delivery_channel_names(&self) -> std::option::Option<&[std::string::String]> {
self.delivery_channel_names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConformancePackStatusInput {
#[doc(hidden)]
pub conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeConformancePackStatusInput {
pub fn conformance_pack_names(&self) -> std::option::Option<&[std::string::String]> {
self.conformance_pack_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeConformancePacksInput {
#[doc(hidden)]
pub conformance_pack_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeConformancePacksInput {
pub fn conformance_pack_names(&self) -> std::option::Option<&[std::string::String]> {
self.conformance_pack_names.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeConformancePackComplianceInput {
#[doc(hidden)]
pub conformance_pack_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ConformancePackComplianceFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeConformancePackComplianceInput {
pub fn conformance_pack_name(&self) -> std::option::Option<&str> {
self.conformance_pack_name.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::ConformancePackComplianceFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigurationRecorderStatusInput {
#[doc(hidden)]
pub configuration_recorder_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeConfigurationRecorderStatusInput {
pub fn configuration_recorder_names(&self) -> std::option::Option<&[std::string::String]> {
self.configuration_recorder_names.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigurationRecordersInput {
#[doc(hidden)]
pub configuration_recorder_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeConfigurationRecordersInput {
pub fn configuration_recorder_names(&self) -> std::option::Option<&[std::string::String]> {
self.configuration_recorder_names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigurationAggregatorSourcesStatusInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub update_status: std::option::Option<std::vec::Vec<crate::model::AggregatedSourceStatusType>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
}
impl DescribeConfigurationAggregatorSourcesStatusInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn update_status(
&self,
) -> std::option::Option<&[crate::model::AggregatedSourceStatusType]> {
self.update_status.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigurationAggregatorsInput {
#[doc(hidden)]
pub configuration_aggregator_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
}
impl DescribeConfigurationAggregatorsInput {
pub fn configuration_aggregator_names(&self) -> std::option::Option<&[std::string::String]> {
self.configuration_aggregator_names.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigRulesInput {
#[doc(hidden)]
pub config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::DescribeConfigRulesFilters>,
}
impl DescribeConfigRulesInput {
pub fn config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.config_rule_names.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::DescribeConfigRulesFilters> {
self.filters.as_ref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConfigRuleEvaluationStatusInput {
#[doc(hidden)]
pub config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit: i32,
}
impl DescribeConfigRuleEvaluationStatusInput {
pub fn config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.config_rule_names.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeComplianceByResourceInput {
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub compliance_types: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeComplianceByResourceInput {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn compliance_types(&self) -> std::option::Option<&[crate::model::ComplianceType]> {
self.compliance_types.as_deref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeComplianceByConfigRuleInput {
#[doc(hidden)]
pub config_rule_names: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub compliance_types: std::option::Option<std::vec::Vec<crate::model::ComplianceType>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeComplianceByConfigRuleInput {
pub fn config_rule_names(&self) -> std::option::Option<&[std::string::String]> {
self.config_rule_names.as_deref()
}
pub fn compliance_types(&self) -> std::option::Option<&[crate::model::ComplianceType]> {
self.compliance_types.as_deref()
}
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 DescribeAggregationAuthorizationsInput {
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeAggregationAuthorizationsInput {
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeAggregateComplianceByConformancePacksInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::AggregateConformancePackComplianceFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeAggregateComplianceByConformancePacksInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn filters(
&self,
) -> std::option::Option<&crate::model::AggregateConformancePackComplianceFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
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 DescribeAggregateComplianceByConfigRulesInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ConfigRuleComplianceFilters>,
#[doc(hidden)]
pub limit: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeAggregateComplianceByConfigRulesInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::ConfigRuleComplianceFilters> {
self.filters.as_ref()
}
pub fn limit(&self) -> i32 {
self.limit
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeliverConfigSnapshotInput {
#[doc(hidden)]
pub delivery_channel_name: std::option::Option<std::string::String>,
}
impl DeliverConfigSnapshotInput {
pub fn delivery_channel_name(&self) -> std::option::Option<&str> {
self.delivery_channel_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStoredQueryInput {
#[doc(hidden)]
pub query_name: std::option::Option<std::string::String>,
}
impl DeleteStoredQueryInput {
pub fn query_name(&self) -> std::option::Option<&str> {
self.query_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRetentionConfigurationInput {
#[doc(hidden)]
pub retention_configuration_name: std::option::Option<std::string::String>,
}
impl DeleteRetentionConfigurationInput {
pub fn retention_configuration_name(&self) -> std::option::Option<&str> {
self.retention_configuration_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteResourceConfigInput {
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
}
impl DeleteResourceConfigInput {
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRemediationExceptionsInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_keys:
std::option::Option<std::vec::Vec<crate::model::RemediationExceptionResourceKey>>,
}
impl DeleteRemediationExceptionsInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
pub fn resource_keys(
&self,
) -> std::option::Option<&[crate::model::RemediationExceptionResourceKey]> {
self.resource_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRemediationConfigurationInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl DeleteRemediationConfigurationInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.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 DeletePendingAggregationRequestInput {
#[doc(hidden)]
pub requester_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub requester_aws_region: std::option::Option<std::string::String>,
}
impl DeletePendingAggregationRequestInput {
pub fn requester_account_id(&self) -> std::option::Option<&str> {
self.requester_account_id.as_deref()
}
pub fn requester_aws_region(&self) -> std::option::Option<&str> {
self.requester_aws_region.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteOrganizationConformancePackInput {
#[doc(hidden)]
pub organization_conformance_pack_name: std::option::Option<std::string::String>,
}
impl DeleteOrganizationConformancePackInput {
pub fn organization_conformance_pack_name(&self) -> std::option::Option<&str> {
self.organization_conformance_pack_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteOrganizationConfigRuleInput {
#[doc(hidden)]
pub organization_config_rule_name: std::option::Option<std::string::String>,
}
impl DeleteOrganizationConfigRuleInput {
pub fn organization_config_rule_name(&self) -> std::option::Option<&str> {
self.organization_config_rule_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteEvaluationResultsInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
}
impl DeleteEvaluationResultsInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDeliveryChannelInput {
#[doc(hidden)]
pub delivery_channel_name: std::option::Option<std::string::String>,
}
impl DeleteDeliveryChannelInput {
pub fn delivery_channel_name(&self) -> std::option::Option<&str> {
self.delivery_channel_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConformancePackInput {
#[doc(hidden)]
pub conformance_pack_name: std::option::Option<std::string::String>,
}
impl DeleteConformancePackInput {
pub fn conformance_pack_name(&self) -> std::option::Option<&str> {
self.conformance_pack_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfigurationRecorderInput {
#[doc(hidden)]
pub configuration_recorder_name: std::option::Option<std::string::String>,
}
impl DeleteConfigurationRecorderInput {
pub fn configuration_recorder_name(&self) -> std::option::Option<&str> {
self.configuration_recorder_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfigurationAggregatorInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
}
impl DeleteConfigurationAggregatorInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfigRuleInput {
#[doc(hidden)]
pub config_rule_name: std::option::Option<std::string::String>,
}
impl DeleteConfigRuleInput {
pub fn config_rule_name(&self) -> std::option::Option<&str> {
self.config_rule_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteAggregationAuthorizationInput {
#[doc(hidden)]
pub authorized_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub authorized_aws_region: std::option::Option<std::string::String>,
}
impl DeleteAggregationAuthorizationInput {
pub fn authorized_account_id(&self) -> std::option::Option<&str> {
self.authorized_account_id.as_deref()
}
pub fn authorized_aws_region(&self) -> std::option::Option<&str> {
self.authorized_aws_region.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGetResourceConfigInput {
#[doc(hidden)]
pub resource_keys: std::option::Option<std::vec::Vec<crate::model::ResourceKey>>,
}
impl BatchGetResourceConfigInput {
pub fn resource_keys(&self) -> std::option::Option<&[crate::model::ResourceKey]> {
self.resource_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGetAggregateResourceConfigInput {
#[doc(hidden)]
pub configuration_aggregator_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_identifiers:
std::option::Option<std::vec::Vec<crate::model::AggregateResourceIdentifier>>,
}
impl BatchGetAggregateResourceConfigInput {
pub fn configuration_aggregator_name(&self) -> std::option::Option<&str> {
self.configuration_aggregator_name.as_deref()
}
pub fn resource_identifiers(
&self,
) -> std::option::Option<&[crate::model::AggregateResourceIdentifier]> {
self.resource_identifiers.as_deref()
}
}