use std::fmt::Write;
pub mod associate_assessment_report_evidence_folder_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::AssociateAssessmentReportEvidenceFolderInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::AssociateAssessmentReportEvidenceFolderInput {
assessment_id: self.assessment_id,
evidence_folder_id: self.evidence_folder_id,
})
}
}
}
#[doc(hidden)]
pub type AssociateAssessmentReportEvidenceFolderInputOperationOutputAlias =
crate::operation::AssociateAssessmentReportEvidenceFolder;
#[doc(hidden)]
pub type AssociateAssessmentReportEvidenceFolderInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl AssociateAssessmentReportEvidenceFolderInput {
#[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::AssociateAssessmentReportEvidenceFolder,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::AssociateAssessmentReportEvidenceFolderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_1 = &_input.assessment_id;
let input_1 = input_1.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_1, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/associateToAssessmentReport",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateAssessmentReportEvidenceFolderInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_assessment_report_evidence_folder(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateAssessmentReportEvidenceFolder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateAssessmentReportEvidenceFolder",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_assessment_report_evidence_folder_input::Builder {
crate::input::associate_assessment_report_evidence_folder_input::Builder::default()
}
}
pub mod batch_associate_assessment_report_evidence_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
pub(crate) evidence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn evidence_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.evidence_ids.unwrap_or_default();
v.push(input.into());
self.evidence_ids = Some(v);
self
}
pub fn set_evidence_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.evidence_ids = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchAssociateAssessmentReportEvidenceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchAssociateAssessmentReportEvidenceInput {
assessment_id: self.assessment_id,
evidence_folder_id: self.evidence_folder_id,
evidence_ids: self.evidence_ids,
})
}
}
}
#[doc(hidden)]
pub type BatchAssociateAssessmentReportEvidenceInputOperationOutputAlias =
crate::operation::BatchAssociateAssessmentReportEvidence;
#[doc(hidden)]
pub type BatchAssociateAssessmentReportEvidenceInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchAssociateAssessmentReportEvidenceInput {
#[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::BatchAssociateAssessmentReportEvidence,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchAssociateAssessmentReportEvidenceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_2 = &_input.assessment_id;
let input_2 = input_2.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_2, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/batchAssociateToAssessmentReport",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchAssociateAssessmentReportEvidenceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_associate_assessment_report_evidence(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchAssociateAssessmentReportEvidence::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchAssociateAssessmentReportEvidence",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_associate_assessment_report_evidence_input::Builder {
crate::input::batch_associate_assessment_report_evidence_input::Builder::default()
}
}
pub mod batch_create_delegation_by_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) create_delegation_requests:
std::option::Option<std::vec::Vec<crate::model::CreateDelegationRequest>>,
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn create_delegation_requests(
mut self,
input: crate::model::CreateDelegationRequest,
) -> Self {
let mut v = self.create_delegation_requests.unwrap_or_default();
v.push(input);
self.create_delegation_requests = Some(v);
self
}
pub fn set_create_delegation_requests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CreateDelegationRequest>>,
) -> Self {
self.create_delegation_requests = input;
self
}
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchCreateDelegationByAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchCreateDelegationByAssessmentInput {
create_delegation_requests: self.create_delegation_requests,
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type BatchCreateDelegationByAssessmentInputOperationOutputAlias =
crate::operation::BatchCreateDelegationByAssessment;
#[doc(hidden)]
pub type BatchCreateDelegationByAssessmentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchCreateDelegationByAssessmentInput {
#[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::BatchCreateDelegationByAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchCreateDelegationByAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_3 = &_input.assessment_id;
let input_3 = input_3.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_3, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/delegations",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchCreateDelegationByAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_create_delegation_by_assessment(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchCreateDelegationByAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchCreateDelegationByAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_create_delegation_by_assessment_input::Builder {
crate::input::batch_create_delegation_by_assessment_input::Builder::default()
}
}
pub mod batch_delete_delegation_by_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) delegation_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn delegation_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.delegation_ids.unwrap_or_default();
v.push(input.into());
self.delegation_ids = Some(v);
self
}
pub fn set_delegation_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.delegation_ids = input;
self
}
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDeleteDelegationByAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDeleteDelegationByAssessmentInput {
delegation_ids: self.delegation_ids,
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type BatchDeleteDelegationByAssessmentInputOperationOutputAlias =
crate::operation::BatchDeleteDelegationByAssessment;
#[doc(hidden)]
pub type BatchDeleteDelegationByAssessmentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchDeleteDelegationByAssessmentInput {
#[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::BatchDeleteDelegationByAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchDeleteDelegationByAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_4 = &_input.assessment_id;
let input_4 = input_4.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_4, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/delegations",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchDeleteDelegationByAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_delete_delegation_by_assessment(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDeleteDelegationByAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDeleteDelegationByAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_delete_delegation_by_assessment_input::Builder {
crate::input::batch_delete_delegation_by_assessment_input::Builder::default()
}
}
pub mod batch_disassociate_assessment_report_evidence_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
pub(crate) evidence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn evidence_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.evidence_ids.unwrap_or_default();
v.push(input.into());
self.evidence_ids = Some(v);
self
}
pub fn set_evidence_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.evidence_ids = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDisassociateAssessmentReportEvidenceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::BatchDisassociateAssessmentReportEvidenceInput {
assessment_id: self.assessment_id,
evidence_folder_id: self.evidence_folder_id,
evidence_ids: self.evidence_ids,
},
)
}
}
}
#[doc(hidden)]
pub type BatchDisassociateAssessmentReportEvidenceInputOperationOutputAlias =
crate::operation::BatchDisassociateAssessmentReportEvidence;
#[doc(hidden)]
pub type BatchDisassociateAssessmentReportEvidenceInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchDisassociateAssessmentReportEvidenceInput {
#[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::BatchDisassociateAssessmentReportEvidence,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchDisassociateAssessmentReportEvidenceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_5 = &_input.assessment_id;
let input_5 = input_5.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_5, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/batchDisassociateFromAssessmentReport",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchDisassociateAssessmentReportEvidenceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_disassociate_assessment_report_evidence(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDisassociateAssessmentReportEvidence::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDisassociateAssessmentReportEvidence",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_disassociate_assessment_report_evidence_input::Builder {
crate::input::batch_disassociate_assessment_report_evidence_input::Builder::default()
}
}
pub mod batch_import_evidence_to_assessment_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) control_id: std::option::Option<std::string::String>,
pub(crate) manual_evidence:
std::option::Option<std::vec::Vec<crate::model::ManualEvidence>>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn manual_evidence(mut self, input: crate::model::ManualEvidence) -> Self {
let mut v = self.manual_evidence.unwrap_or_default();
v.push(input);
self.manual_evidence = Some(v);
self
}
pub fn set_manual_evidence(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ManualEvidence>>,
) -> Self {
self.manual_evidence = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchImportEvidenceToAssessmentControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchImportEvidenceToAssessmentControlInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
control_id: self.control_id,
manual_evidence: self.manual_evidence,
})
}
}
}
#[doc(hidden)]
pub type BatchImportEvidenceToAssessmentControlInputOperationOutputAlias =
crate::operation::BatchImportEvidenceToAssessmentControl;
#[doc(hidden)]
pub type BatchImportEvidenceToAssessmentControlInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl BatchImportEvidenceToAssessmentControlInput {
#[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::BatchImportEvidenceToAssessmentControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::BatchImportEvidenceToAssessmentControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_6 = &_input.assessment_id;
let input_6 = input_6.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_6, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_7 = &_input.control_set_id;
let input_7 = input_7.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_7, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_8 = &_input.control_id;
let input_8 = input_8.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_8, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(output, "/assessments/{assessmentId}/controlSets/{controlSetId}/controls/{controlId}/evidence", assessmentId = assessment_id, controlSetId = control_set_id, controlId = control_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchImportEvidenceToAssessmentControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_import_evidence_to_assessment_control(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchImportEvidenceToAssessmentControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchImportEvidenceToAssessmentControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_import_evidence_to_assessment_control_input::Builder {
crate::input::batch_import_evidence_to_assessment_control_input::Builder::default()
}
}
pub mod create_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub(crate) scope: std::option::Option<crate::model::Scope>,
pub(crate) roles: std::option::Option<std::vec::Vec<crate::model::Role>>,
pub(crate) framework_id: 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 name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn assessment_reports_destination(
mut self,
input: crate::model::AssessmentReportsDestination,
) -> Self {
self.assessment_reports_destination = Some(input);
self
}
pub fn set_assessment_reports_destination(
mut self,
input: std::option::Option<crate::model::AssessmentReportsDestination>,
) -> Self {
self.assessment_reports_destination = input;
self
}
pub fn scope(mut self, input: crate::model::Scope) -> Self {
self.scope = Some(input);
self
}
pub fn set_scope(mut self, input: std::option::Option<crate::model::Scope>) -> Self {
self.scope = input;
self
}
pub fn roles(mut self, input: crate::model::Role) -> Self {
let mut v = self.roles.unwrap_or_default();
v.push(input);
self.roles = Some(v);
self
}
pub fn set_roles(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Role>>,
) -> Self {
self.roles = input;
self
}
pub fn framework_id(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_id = Some(input.into());
self
}
pub fn set_framework_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.framework_id = 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,
) -> std::result::Result<
crate::input::CreateAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateAssessmentInput {
name: self.name,
description: self.description,
assessment_reports_destination: self.assessment_reports_destination,
scope: self.scope,
roles: self.roles,
framework_id: self.framework_id,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateAssessmentInputOperationOutputAlias = crate::operation::CreateAssessment;
#[doc(hidden)]
pub type CreateAssessmentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateAssessmentInput {
#[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::CreateAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessments").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_assessment(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_assessment_input::Builder {
crate::input::create_assessment_input::Builder::default()
}
}
pub mod create_assessment_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) compliance_type: std::option::Option<std::string::String>,
pub(crate) control_sets:
std::option::Option<std::vec::Vec<crate::model::CreateAssessmentFrameworkControlSet>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn compliance_type(mut self, input: impl Into<std::string::String>) -> Self {
self.compliance_type = Some(input.into());
self
}
pub fn set_compliance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.compliance_type = input;
self
}
pub fn control_sets(
mut self,
input: crate::model::CreateAssessmentFrameworkControlSet,
) -> Self {
let mut v = self.control_sets.unwrap_or_default();
v.push(input);
self.control_sets = Some(v);
self
}
pub fn set_control_sets(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CreateAssessmentFrameworkControlSet>,
>,
) -> Self {
self.control_sets = 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,
) -> std::result::Result<
crate::input::CreateAssessmentFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateAssessmentFrameworkInput {
name: self.name,
description: self.description,
compliance_type: self.compliance_type,
control_sets: self.control_sets,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateAssessmentFrameworkInputOperationOutputAlias =
crate::operation::CreateAssessmentFramework;
#[doc(hidden)]
pub type CreateAssessmentFrameworkInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateAssessmentFrameworkInput {
#[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::CreateAssessmentFramework,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateAssessmentFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessmentFrameworks").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateAssessmentFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_assessment_framework(
&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateAssessmentFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateAssessmentFramework",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_assessment_framework_input::Builder {
crate::input::create_assessment_framework_input::Builder::default()
}
}
pub mod create_assessment_report_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateAssessmentReportInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateAssessmentReportInput {
name: self.name,
description: self.description,
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type CreateAssessmentReportInputOperationOutputAlias = crate::operation::CreateAssessmentReport;
#[doc(hidden)]
pub type CreateAssessmentReportInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateAssessmentReportInput {
#[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::CreateAssessmentReport,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateAssessmentReportInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_9 = &_input.assessment_id;
let input_9 = input_9.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_9, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/reports",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateAssessmentReportInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_assessment_report(
&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateAssessmentReport::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateAssessmentReport",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_assessment_report_input::Builder {
crate::input::create_assessment_report_input::Builder::default()
}
}
pub mod create_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) testing_information: std::option::Option<std::string::String>,
pub(crate) action_plan_title: std::option::Option<std::string::String>,
pub(crate) action_plan_instructions: std::option::Option<std::string::String>,
pub(crate) control_mapping_sources:
std::option::Option<std::vec::Vec<crate::model::CreateControlMappingSource>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn testing_information(mut self, input: impl Into<std::string::String>) -> Self {
self.testing_information = Some(input.into());
self
}
pub fn set_testing_information(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.testing_information = input;
self
}
pub fn action_plan_title(mut self, input: impl Into<std::string::String>) -> Self {
self.action_plan_title = Some(input.into());
self
}
pub fn set_action_plan_title(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.action_plan_title = input;
self
}
pub fn action_plan_instructions(mut self, input: impl Into<std::string::String>) -> Self {
self.action_plan_instructions = Some(input.into());
self
}
pub fn set_action_plan_instructions(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.action_plan_instructions = input;
self
}
pub fn control_mapping_sources(
mut self,
input: crate::model::CreateControlMappingSource,
) -> Self {
let mut v = self.control_mapping_sources.unwrap_or_default();
v.push(input);
self.control_mapping_sources = Some(v);
self
}
pub fn set_control_mapping_sources(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CreateControlMappingSource>>,
) -> Self {
self.control_mapping_sources = 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,
) -> std::result::Result<
crate::input::CreateControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateControlInput {
name: self.name,
description: self.description,
testing_information: self.testing_information,
action_plan_title: self.action_plan_title,
action_plan_instructions: self.action_plan_instructions,
control_mapping_sources: self.control_mapping_sources,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateControlInputOperationOutputAlias = crate::operation::CreateControl;
#[doc(hidden)]
pub type CreateControlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateControlInput {
#[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::CreateControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::CreateControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/controls").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_control(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_control_input::Builder {
crate::input::create_control_input::Builder::default()
}
}
pub mod delete_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteAssessmentInput {
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteAssessmentInputOperationOutputAlias = crate::operation::DeleteAssessment;
#[doc(hidden)]
pub type DeleteAssessmentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteAssessmentInput {
#[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::DeleteAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_10 = &_input.assessment_id;
let input_10 = input_10.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_10, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_assessment_input::Builder {
crate::input::delete_assessment_input::Builder::default()
}
}
pub mod delete_assessment_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_id(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_id = Some(input.into());
self
}
pub fn set_framework_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.framework_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteAssessmentFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteAssessmentFrameworkInput {
framework_id: self.framework_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteAssessmentFrameworkInputOperationOutputAlias =
crate::operation::DeleteAssessmentFramework;
#[doc(hidden)]
pub type DeleteAssessmentFrameworkInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteAssessmentFrameworkInput {
#[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::DeleteAssessmentFramework,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteAssessmentFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_11 = &_input.framework_id;
let input_11 = input_11.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
},
)?;
let framework_id = aws_smithy_http::label::fmt_string(input_11, false);
if framework_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworks/{frameworkId}",
frameworkId = framework_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAssessmentFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteAssessmentFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAssessmentFramework",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_assessment_framework_input::Builder {
crate::input::delete_assessment_framework_input::Builder::default()
}
}
pub mod delete_assessment_framework_share_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) request_id: std::option::Option<std::string::String>,
pub(crate) request_type: std::option::Option<crate::model::ShareRequestType>,
}
impl Builder {
pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn request_type(mut self, input: crate::model::ShareRequestType) -> Self {
self.request_type = Some(input);
self
}
pub fn set_request_type(
mut self,
input: std::option::Option<crate::model::ShareRequestType>,
) -> Self {
self.request_type = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteAssessmentFrameworkShareInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteAssessmentFrameworkShareInput {
request_id: self.request_id,
request_type: self.request_type,
})
}
}
}
#[doc(hidden)]
pub type DeleteAssessmentFrameworkShareInputOperationOutputAlias =
crate::operation::DeleteAssessmentFrameworkShare;
#[doc(hidden)]
pub type DeleteAssessmentFrameworkShareInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DeleteAssessmentFrameworkShareInput {
#[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::DeleteAssessmentFrameworkShare,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteAssessmentFrameworkShareInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_12 = &_input.request_id;
let input_12 = input_12.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "request_id",
details: "cannot be empty or unset",
},
)?;
let request_id = aws_smithy_http::label::fmt_string(input_12, false);
if request_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "request_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworkShareRequests/{requestId}",
requestId = request_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteAssessmentFrameworkShareInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_13) = &_input.request_type {
query.push_kv(
"requestType",
&aws_smithy_http::query::fmt_string(&inner_13),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAssessmentFrameworkShareInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteAssessmentFrameworkShare::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAssessmentFrameworkShare",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_assessment_framework_share_input::Builder {
crate::input::delete_assessment_framework_share_input::Builder::default()
}
}
pub mod delete_assessment_report_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) assessment_report_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn assessment_report_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_report_id = Some(input.into());
self
}
pub fn set_assessment_report_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_report_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteAssessmentReportInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteAssessmentReportInput {
assessment_id: self.assessment_id,
assessment_report_id: self.assessment_report_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteAssessmentReportInputOperationOutputAlias = crate::operation::DeleteAssessmentReport;
#[doc(hidden)]
pub type DeleteAssessmentReportInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteAssessmentReportInput {
#[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::DeleteAssessmentReport,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteAssessmentReportInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_14 = &_input.assessment_id;
let input_14 = input_14.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_14, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_15 = &_input.assessment_report_id;
let input_15 = input_15.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_report_id",
details: "cannot be empty or unset",
},
)?;
let assessment_report_id = aws_smithy_http::label::fmt_string(input_15, false);
if assessment_report_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_report_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/reports/{assessmentReportId}",
assessmentId = assessment_id,
assessmentReportId = assessment_report_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAssessmentReportInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteAssessmentReport::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAssessmentReport",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_assessment_report_input::Builder {
crate::input::delete_assessment_report_input::Builder::default()
}
}
pub mod delete_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteControlInput {
control_id: self.control_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteControlInputOperationOutputAlias = crate::operation::DeleteControl;
#[doc(hidden)]
pub type DeleteControlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteControlInput {
#[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::DeleteControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_16 = &_input.control_id;
let input_16 = input_16.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_16, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(output, "/controls/{controlId}", controlId = control_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_control_input::Builder {
crate::input::delete_control_input::Builder::default()
}
}
pub mod deregister_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::DeregisterAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeregisterAccountInput {})
}
}
}
#[doc(hidden)]
pub type DeregisterAccountInputOperationOutputAlias = crate::operation::DeregisterAccount;
#[doc(hidden)]
pub type DeregisterAccountInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeregisterAccountInput {
#[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::DeregisterAccount,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeregisterAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/deregisterAccount").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeregisterAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeregisterAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeregisterAccount",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::deregister_account_input::Builder {
crate::input::deregister_account_input::Builder::default()
}
}
pub mod deregister_organization_admin_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) admin_account_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn admin_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.admin_account_id = Some(input.into());
self
}
pub fn set_admin_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.admin_account_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeregisterOrganizationAdminAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeregisterOrganizationAdminAccountInput {
admin_account_id: self.admin_account_id,
})
}
}
}
#[doc(hidden)]
pub type DeregisterOrganizationAdminAccountInputOperationOutputAlias =
crate::operation::DeregisterOrganizationAdminAccount;
#[doc(hidden)]
pub type DeregisterOrganizationAdminAccountInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DeregisterOrganizationAdminAccountInput {
#[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::DeregisterOrganizationAdminAccount,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeregisterOrganizationAdminAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/deregisterOrganizationAdminAccount")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeregisterOrganizationAdminAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_deregister_organization_admin_account(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeregisterOrganizationAdminAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeregisterOrganizationAdminAccount",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::deregister_organization_admin_account_input::Builder {
crate::input::deregister_organization_admin_account_input::Builder::default()
}
}
pub mod disassociate_assessment_report_evidence_folder_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DisassociateAssessmentReportEvidenceFolderInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::DisassociateAssessmentReportEvidenceFolderInput {
assessment_id: self.assessment_id,
evidence_folder_id: self.evidence_folder_id,
},
)
}
}
}
#[doc(hidden)]
pub type DisassociateAssessmentReportEvidenceFolderInputOperationOutputAlias =
crate::operation::DisassociateAssessmentReportEvidenceFolder;
#[doc(hidden)]
pub type DisassociateAssessmentReportEvidenceFolderInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DisassociateAssessmentReportEvidenceFolderInput {
#[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::DisassociateAssessmentReportEvidenceFolder,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateAssessmentReportEvidenceFolderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_17 = &_input.assessment_id;
let input_17 = input_17.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_17, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/disassociateFromAssessmentReport",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateAssessmentReportEvidenceFolderInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_assessment_report_evidence_folder(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateAssessmentReportEvidenceFolder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateAssessmentReportEvidenceFolder",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_assessment_report_evidence_folder_input::Builder
{
crate::input::disassociate_assessment_report_evidence_folder_input::Builder::default()
}
}
pub mod get_account_status_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::GetAccountStatusInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetAccountStatusInput {})
}
}
}
#[doc(hidden)]
pub type GetAccountStatusInputOperationOutputAlias = crate::operation::GetAccountStatus;
#[doc(hidden)]
pub type GetAccountStatusInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetAccountStatusInput {
#[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::GetAccountStatus,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetAccountStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/status").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAccountStatusInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAccountStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAccountStatus",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_account_status_input::Builder {
crate::input::get_account_status_input::Builder::default()
}
}
pub mod get_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetAssessmentInput {
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type GetAssessmentInputOperationOutputAlias = crate::operation::GetAssessment;
#[doc(hidden)]
pub type GetAssessmentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetAssessmentInput {
#[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::GetAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_18 = &_input.assessment_id;
let input_18 = input_18.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_18, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_assessment_input::Builder {
crate::input::get_assessment_input::Builder::default()
}
}
pub mod get_assessment_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_id(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_id = Some(input.into());
self
}
pub fn set_framework_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.framework_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetAssessmentFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetAssessmentFrameworkInput {
framework_id: self.framework_id,
})
}
}
}
#[doc(hidden)]
pub type GetAssessmentFrameworkInputOperationOutputAlias = crate::operation::GetAssessmentFramework;
#[doc(hidden)]
pub type GetAssessmentFrameworkInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetAssessmentFrameworkInput {
#[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::GetAssessmentFramework,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetAssessmentFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_19 = &_input.framework_id;
let input_19 = input_19.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
},
)?;
let framework_id = aws_smithy_http::label::fmt_string(input_19, false);
if framework_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworks/{frameworkId}",
frameworkId = framework_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAssessmentFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAssessmentFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAssessmentFramework",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_assessment_framework_input::Builder {
crate::input::get_assessment_framework_input::Builder::default()
}
}
pub mod get_assessment_report_url_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_report_id: std::option::Option<std::string::String>,
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_report_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_report_id = Some(input.into());
self
}
pub fn set_assessment_report_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_report_id = input;
self
}
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetAssessmentReportUrlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetAssessmentReportUrlInput {
assessment_report_id: self.assessment_report_id,
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type GetAssessmentReportUrlInputOperationOutputAlias = crate::operation::GetAssessmentReportUrl;
#[doc(hidden)]
pub type GetAssessmentReportUrlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetAssessmentReportUrlInput {
#[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::GetAssessmentReportUrl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetAssessmentReportUrlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_20 = &_input.assessment_id;
let input_20 = input_20.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_20, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_21 = &_input.assessment_report_id;
let input_21 = input_21.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_report_id",
details: "cannot be empty or unset",
},
)?;
let assessment_report_id = aws_smithy_http::label::fmt_string(input_21, false);
if assessment_report_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_report_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/reports/{assessmentReportId}/url",
assessmentId = assessment_id,
assessmentReportId = assessment_report_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAssessmentReportUrlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAssessmentReportUrl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAssessmentReportUrl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_assessment_report_url_input::Builder {
crate::input::get_assessment_report_url_input::Builder::default()
}
}
pub mod get_change_logs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) control_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetChangeLogsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetChangeLogsInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
control_id: self.control_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetChangeLogsInputOperationOutputAlias = crate::operation::GetChangeLogs;
#[doc(hidden)]
pub type GetChangeLogsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetChangeLogsInput {
#[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::GetChangeLogs,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetChangeLogsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_22 = &_input.assessment_id;
let input_22 = input_22.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_22, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/changelogs",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetChangeLogsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_23) = &_input.control_set_id {
query.push_kv(
"controlSetId",
&aws_smithy_http::query::fmt_string(&inner_23),
);
}
if let Some(inner_24) = &_input.control_id {
query.push_kv("controlId", &aws_smithy_http::query::fmt_string(&inner_24));
}
if let Some(inner_25) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_25));
}
if let Some(inner_26) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_26).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetChangeLogsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetChangeLogs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetChangeLogs",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_change_logs_input::Builder {
crate::input::get_change_logs_input::Builder::default()
}
}
pub mod get_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetControlInput {
control_id: self.control_id,
})
}
}
}
#[doc(hidden)]
pub type GetControlInputOperationOutputAlias = crate::operation::GetControl;
#[doc(hidden)]
pub type GetControlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetControlInput {
#[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::GetControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_27 = &_input.control_id;
let input_27 = input_27.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_27, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(output, "/controls/{controlId}", controlId = control_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_control_input::Builder {
crate::input::get_control_input::Builder::default()
}
}
pub mod get_delegations_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::GetDelegationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDelegationsInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetDelegationsInputOperationOutputAlias = crate::operation::GetDelegations;
#[doc(hidden)]
pub type GetDelegationsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetDelegationsInput {
#[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::GetDelegations,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetDelegationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/delegations").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetDelegationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_28) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_28));
}
if let Some(inner_29) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_29).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDelegationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDelegations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDelegations",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_delegations_input::Builder {
crate::input::get_delegations_input::Builder::default()
}
}
pub mod get_evidence_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
pub(crate) evidence_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn evidence_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_id = Some(input.into());
self
}
pub fn set_evidence_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.evidence_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetEvidenceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetEvidenceInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
evidence_folder_id: self.evidence_folder_id,
evidence_id: self.evidence_id,
})
}
}
}
#[doc(hidden)]
pub type GetEvidenceInputOperationOutputAlias = crate::operation::GetEvidence;
#[doc(hidden)]
pub type GetEvidenceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetEvidenceInput {
#[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::GetEvidence,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetEvidenceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_30 = &_input.assessment_id;
let input_30 = input_30.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_30, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_31 = &_input.control_set_id;
let input_31 = input_31.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_31, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_32 = &_input.evidence_folder_id;
let input_32 = input_32.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
},
)?;
let evidence_folder_id = aws_smithy_http::label::fmt_string(input_32, false);
if evidence_folder_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
});
}
let input_33 = &_input.evidence_id;
let input_33 = input_33.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_id",
details: "cannot be empty or unset",
},
)?;
let evidence_id = aws_smithy_http::label::fmt_string(input_33, false);
if evidence_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_id",
details: "cannot be empty or unset",
});
}
write!(output, "/assessments/{assessmentId}/controlSets/{controlSetId}/evidenceFolders/{evidenceFolderId}/evidence/{evidenceId}", assessmentId = assessment_id, controlSetId = control_set_id, evidenceFolderId = evidence_folder_id, evidenceId = evidence_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEvidenceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEvidence::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEvidence",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_evidence_input::Builder {
crate::input::get_evidence_input::Builder::default()
}
}
pub mod get_evidence_by_evidence_folder_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetEvidenceByEvidenceFolderInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetEvidenceByEvidenceFolderInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
evidence_folder_id: self.evidence_folder_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetEvidenceByEvidenceFolderInputOperationOutputAlias =
crate::operation::GetEvidenceByEvidenceFolder;
#[doc(hidden)]
pub type GetEvidenceByEvidenceFolderInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetEvidenceByEvidenceFolderInput {
#[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::GetEvidenceByEvidenceFolder,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetEvidenceByEvidenceFolderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_34 = &_input.assessment_id;
let input_34 = input_34.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_34, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_35 = &_input.control_set_id;
let input_35 = input_35.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_35, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_36 = &_input.evidence_folder_id;
let input_36 = input_36.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
},
)?;
let evidence_folder_id = aws_smithy_http::label::fmt_string(input_36, false);
if evidence_folder_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
});
}
write!(output, "/assessments/{assessmentId}/controlSets/{controlSetId}/evidenceFolders/{evidenceFolderId}/evidence", assessmentId = assessment_id, controlSetId = control_set_id, evidenceFolderId = evidence_folder_id).expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetEvidenceByEvidenceFolderInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_37) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_37));
}
if let Some(inner_38) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_38).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEvidenceByEvidenceFolderInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEvidenceByEvidenceFolder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEvidenceByEvidenceFolder",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_evidence_by_evidence_folder_input::Builder {
crate::input::get_evidence_by_evidence_folder_input::Builder::default()
}
}
pub mod get_evidence_folder_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) evidence_folder_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn evidence_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.evidence_folder_id = Some(input.into());
self
}
pub fn set_evidence_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.evidence_folder_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetEvidenceFolderInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetEvidenceFolderInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
evidence_folder_id: self.evidence_folder_id,
})
}
}
}
#[doc(hidden)]
pub type GetEvidenceFolderInputOperationOutputAlias = crate::operation::GetEvidenceFolder;
#[doc(hidden)]
pub type GetEvidenceFolderInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetEvidenceFolderInput {
#[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::GetEvidenceFolder,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetEvidenceFolderInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_39 = &_input.assessment_id;
let input_39 = input_39.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_39, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_40 = &_input.control_set_id;
let input_40 = input_40.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_40, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_41 = &_input.evidence_folder_id;
let input_41 = input_41.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
},
)?;
let evidence_folder_id = aws_smithy_http::label::fmt_string(input_41, false);
if evidence_folder_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "evidence_folder_id",
details: "cannot be empty or unset",
});
}
write!(output, "/assessments/{assessmentId}/controlSets/{controlSetId}/evidenceFolders/{evidenceFolderId}", assessmentId = assessment_id, controlSetId = control_set_id, evidenceFolderId = evidence_folder_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEvidenceFolderInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEvidenceFolder::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEvidenceFolder",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_evidence_folder_input::Builder {
crate::input::get_evidence_folder_input::Builder::default()
}
}
pub mod get_evidence_folders_by_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetEvidenceFoldersByAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetEvidenceFoldersByAssessmentInput {
assessment_id: self.assessment_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetEvidenceFoldersByAssessmentInputOperationOutputAlias =
crate::operation::GetEvidenceFoldersByAssessment;
#[doc(hidden)]
pub type GetEvidenceFoldersByAssessmentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl GetEvidenceFoldersByAssessmentInput {
#[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::GetEvidenceFoldersByAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetEvidenceFoldersByAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_42 = &_input.assessment_id;
let input_42 = input_42.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_42, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/evidenceFolders",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetEvidenceFoldersByAssessmentInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_43) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_43));
}
if let Some(inner_44) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_44).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEvidenceFoldersByAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEvidenceFoldersByAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEvidenceFoldersByAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_evidence_folders_by_assessment_input::Builder {
crate::input::get_evidence_folders_by_assessment_input::Builder::default()
}
}
pub mod get_evidence_folders_by_assessment_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) control_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetEvidenceFoldersByAssessmentControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetEvidenceFoldersByAssessmentControlInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
control_id: self.control_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type GetEvidenceFoldersByAssessmentControlInputOperationOutputAlias =
crate::operation::GetEvidenceFoldersByAssessmentControl;
#[doc(hidden)]
pub type GetEvidenceFoldersByAssessmentControlInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl GetEvidenceFoldersByAssessmentControlInput {
#[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::GetEvidenceFoldersByAssessmentControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetEvidenceFoldersByAssessmentControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_45 = &_input.assessment_id;
let input_45 = input_45.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_45, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_46 = &_input.control_set_id;
let input_46 = input_46.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_46, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_47 = &_input.control_id;
let input_47 = input_47.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_47, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(output, "/assessments/{assessmentId}/evidenceFolders-by-assessment-control/{controlSetId}/{controlId}", assessmentId = assessment_id, controlSetId = control_set_id, controlId = control_id).expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetEvidenceFoldersByAssessmentControlInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_48) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_48));
}
if let Some(inner_49) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_49).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEvidenceFoldersByAssessmentControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetEvidenceFoldersByAssessmentControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEvidenceFoldersByAssessmentControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_evidence_folders_by_assessment_control_input::Builder {
crate::input::get_evidence_folders_by_assessment_control_input::Builder::default()
}
}
pub mod get_insights_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::GetInsightsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetInsightsInput {})
}
}
}
#[doc(hidden)]
pub type GetInsightsInputOperationOutputAlias = crate::operation::GetInsights;
#[doc(hidden)]
pub type GetInsightsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetInsightsInput {
#[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::GetInsights,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetInsightsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/insights").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetInsightsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetInsights::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetInsights",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_insights_input::Builder {
crate::input::get_insights_input::Builder::default()
}
}
pub mod get_insights_by_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetInsightsByAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetInsightsByAssessmentInput {
assessment_id: self.assessment_id,
})
}
}
}
#[doc(hidden)]
pub type GetInsightsByAssessmentInputOperationOutputAlias =
crate::operation::GetInsightsByAssessment;
#[doc(hidden)]
pub type GetInsightsByAssessmentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetInsightsByAssessmentInput {
#[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::GetInsightsByAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetInsightsByAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_50 = &_input.assessment_id;
let input_50 = input_50.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_50, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/insights/assessments/{assessmentId}",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetInsightsByAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetInsightsByAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetInsightsByAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_insights_by_assessment_input::Builder {
crate::input::get_insights_by_assessment_input::Builder::default()
}
}
pub mod get_organization_admin_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::GetOrganizationAdminAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetOrganizationAdminAccountInput {})
}
}
}
#[doc(hidden)]
pub type GetOrganizationAdminAccountInputOperationOutputAlias =
crate::operation::GetOrganizationAdminAccount;
#[doc(hidden)]
pub type GetOrganizationAdminAccountInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetOrganizationAdminAccountInput {
#[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::GetOrganizationAdminAccount,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetOrganizationAdminAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/organizationAdminAccount")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetOrganizationAdminAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetOrganizationAdminAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetOrganizationAdminAccount",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_organization_admin_account_input::Builder {
crate::input::get_organization_admin_account_input::Builder::default()
}
}
pub mod get_services_in_scope_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> std::result::Result<
crate::input::GetServicesInScopeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetServicesInScopeInput {})
}
}
}
#[doc(hidden)]
pub type GetServicesInScopeInputOperationOutputAlias = crate::operation::GetServicesInScope;
#[doc(hidden)]
pub type GetServicesInScopeInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetServicesInScopeInput {
#[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::GetServicesInScope,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetServicesInScopeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/services").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServicesInScopeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetServicesInScope::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServicesInScope",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_services_in_scope_input::Builder {
crate::input::get_services_in_scope_input::Builder::default()
}
}
pub mod get_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) attribute: std::option::Option<crate::model::SettingAttribute>,
}
impl Builder {
pub fn attribute(mut self, input: crate::model::SettingAttribute) -> Self {
self.attribute = Some(input);
self
}
pub fn set_attribute(
mut self,
input: std::option::Option<crate::model::SettingAttribute>,
) -> Self {
self.attribute = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetSettingsInput {
attribute: self.attribute,
})
}
}
}
#[doc(hidden)]
pub type GetSettingsInputOperationOutputAlias = crate::operation::GetSettings;
#[doc(hidden)]
pub type GetSettingsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl GetSettingsInput {
#[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::GetSettings,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_51 = &_input.attribute;
let input_51 = input_51.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "attribute",
details: "cannot be empty or unset",
},
)?;
let attribute = aws_smithy_http::label::fmt_string(input_51, false);
if attribute.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "attribute",
details: "cannot be empty or unset",
});
}
write!(output, "/settings/{attribute}", attribute = attribute)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetSettings",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::get_settings_input::Builder {
crate::input::get_settings_input::Builder::default()
}
}
pub mod list_assessment_control_insights_by_control_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_domain_id: std::option::Option<std::string::String>,
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn control_domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_domain_id = Some(input.into());
self
}
pub fn set_control_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_domain_id = input;
self
}
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListAssessmentControlInsightsByControlDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(
crate::input::ListAssessmentControlInsightsByControlDomainInput {
control_domain_id: self.control_domain_id,
assessment_id: self.assessment_id,
next_token: self.next_token,
max_results: self.max_results,
},
)
}
}
}
#[doc(hidden)]
pub type ListAssessmentControlInsightsByControlDomainInputOperationOutputAlias =
crate::operation::ListAssessmentControlInsightsByControlDomain;
#[doc(hidden)]
pub type ListAssessmentControlInsightsByControlDomainInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListAssessmentControlInsightsByControlDomainInput {
#[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::ListAssessmentControlInsightsByControlDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssessmentControlInsightsByControlDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/insights/controls-by-assessment")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAssessmentControlInsightsByControlDomainInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_52) = &_input.control_domain_id {
query.push_kv(
"controlDomainId",
&aws_smithy_http::query::fmt_string(&inner_52),
);
}
if let Some(inner_53) = &_input.assessment_id {
query.push_kv(
"assessmentId",
&aws_smithy_http::query::fmt_string(&inner_53),
);
}
if let Some(inner_54) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_54));
}
if let Some(inner_55) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_55).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssessmentControlInsightsByControlDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssessmentControlInsightsByControlDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssessmentControlInsightsByControlDomain",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder(
) -> crate::input::list_assessment_control_insights_by_control_domain_input::Builder {
crate::input::list_assessment_control_insights_by_control_domain_input::Builder::default()
}
}
pub mod list_assessment_frameworks_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_type: std::option::Option<crate::model::FrameworkType>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn framework_type(mut self, input: crate::model::FrameworkType) -> Self {
self.framework_type = Some(input);
self
}
pub fn set_framework_type(
mut self,
input: std::option::Option<crate::model::FrameworkType>,
) -> Self {
self.framework_type = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListAssessmentFrameworksInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListAssessmentFrameworksInput {
framework_type: self.framework_type,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListAssessmentFrameworksInputOperationOutputAlias =
crate::operation::ListAssessmentFrameworks;
#[doc(hidden)]
pub type ListAssessmentFrameworksInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListAssessmentFrameworksInput {
#[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::ListAssessmentFrameworks,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssessmentFrameworksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessmentFrameworks").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAssessmentFrameworksInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_56) = &_input.framework_type {
query.push_kv(
"frameworkType",
&aws_smithy_http::query::fmt_string(&inner_56),
);
}
if let Some(inner_57) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_57));
}
if let Some(inner_58) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_58).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssessmentFrameworksInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssessmentFrameworks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssessmentFrameworks",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_assessment_frameworks_input::Builder {
crate::input::list_assessment_frameworks_input::Builder::default()
}
}
pub mod list_assessment_framework_share_requests_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) request_type: std::option::Option<crate::model::ShareRequestType>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn request_type(mut self, input: crate::model::ShareRequestType) -> Self {
self.request_type = Some(input);
self
}
pub fn set_request_type(
mut self,
input: std::option::Option<crate::model::ShareRequestType>,
) -> Self {
self.request_type = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListAssessmentFrameworkShareRequestsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListAssessmentFrameworkShareRequestsInput {
request_type: self.request_type,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListAssessmentFrameworkShareRequestsInputOperationOutputAlias =
crate::operation::ListAssessmentFrameworkShareRequests;
#[doc(hidden)]
pub type ListAssessmentFrameworkShareRequestsInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListAssessmentFrameworkShareRequestsInput {
#[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::ListAssessmentFrameworkShareRequests,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssessmentFrameworkShareRequestsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessmentFrameworkShareRequests")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAssessmentFrameworkShareRequestsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_59) = &_input.request_type {
query.push_kv(
"requestType",
&aws_smithy_http::query::fmt_string(&inner_59),
);
}
if let Some(inner_60) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_60));
}
if let Some(inner_61) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_61).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssessmentFrameworkShareRequestsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssessmentFrameworkShareRequests::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssessmentFrameworkShareRequests",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_assessment_framework_share_requests_input::Builder {
crate::input::list_assessment_framework_share_requests_input::Builder::default()
}
}
pub mod list_assessment_reports_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::ListAssessmentReportsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListAssessmentReportsInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListAssessmentReportsInputOperationOutputAlias = crate::operation::ListAssessmentReports;
#[doc(hidden)]
pub type ListAssessmentReportsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListAssessmentReportsInput {
#[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::ListAssessmentReports,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssessmentReportsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessmentReports").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAssessmentReportsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_62) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_62));
}
if let Some(inner_63) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_63).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssessmentReportsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssessmentReports::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssessmentReports",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_assessment_reports_input::Builder {
crate::input::list_assessment_reports_input::Builder::default()
}
}
pub mod list_assessments_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) status: std::option::Option<crate::model::AssessmentStatus>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn status(mut self, input: crate::model::AssessmentStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::AssessmentStatus>,
) -> Self {
self.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 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,
) -> std::result::Result<
crate::input::ListAssessmentsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListAssessmentsInput {
status: self.status,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListAssessmentsInputOperationOutputAlias = crate::operation::ListAssessments;
#[doc(hidden)]
pub type ListAssessmentsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListAssessmentsInput {
#[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::ListAssessments,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAssessmentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessments").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAssessmentsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_64) = &_input.status {
query.push_kv("status", &aws_smithy_http::query::fmt_string(&inner_64));
}
if let Some(inner_65) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_65));
}
if let Some(inner_66) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_66).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAssessmentsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAssessments::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAssessments",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_assessments_input::Builder {
crate::input::list_assessments_input::Builder::default()
}
}
pub mod list_control_domain_insights_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::ListControlDomainInsightsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListControlDomainInsightsInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListControlDomainInsightsInputOperationOutputAlias =
crate::operation::ListControlDomainInsights;
#[doc(hidden)]
pub type ListControlDomainInsightsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListControlDomainInsightsInput {
#[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::ListControlDomainInsights,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListControlDomainInsightsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/insights/control-domains").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListControlDomainInsightsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_67) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_67));
}
if let Some(inner_68) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_68).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListControlDomainInsightsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListControlDomainInsights::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListControlDomainInsights",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_control_domain_insights_input::Builder {
crate::input::list_control_domain_insights_input::Builder::default()
}
}
pub mod list_control_domain_insights_by_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListControlDomainInsightsByAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListControlDomainInsightsByAssessmentInput {
assessment_id: self.assessment_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListControlDomainInsightsByAssessmentInputOperationOutputAlias =
crate::operation::ListControlDomainInsightsByAssessment;
#[doc(hidden)]
pub type ListControlDomainInsightsByAssessmentInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListControlDomainInsightsByAssessmentInput {
#[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::ListControlDomainInsightsByAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListControlDomainInsightsByAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/insights/control-domains-by-assessment")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListControlDomainInsightsByAssessmentInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_69) = &_input.assessment_id {
query.push_kv(
"assessmentId",
&aws_smithy_http::query::fmt_string(&inner_69),
);
}
if let Some(inner_70) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_70));
}
if let Some(inner_71) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_71).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListControlDomainInsightsByAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListControlDomainInsightsByAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListControlDomainInsightsByAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_control_domain_insights_by_assessment_input::Builder {
crate::input::list_control_domain_insights_by_assessment_input::Builder::default()
}
}
pub mod list_control_insights_by_control_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_domain_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn control_domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_domain_id = Some(input.into());
self
}
pub fn set_control_domain_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_domain_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListControlInsightsByControlDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListControlInsightsByControlDomainInput {
control_domain_id: self.control_domain_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListControlInsightsByControlDomainInputOperationOutputAlias =
crate::operation::ListControlInsightsByControlDomain;
#[doc(hidden)]
pub type ListControlInsightsByControlDomainInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListControlInsightsByControlDomainInput {
#[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::ListControlInsightsByControlDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListControlInsightsByControlDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/insights/controls").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListControlInsightsByControlDomainInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_72) = &_input.control_domain_id {
query.push_kv(
"controlDomainId",
&aws_smithy_http::query::fmt_string(&inner_72),
);
}
if let Some(inner_73) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_73));
}
if let Some(inner_74) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_74).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListControlInsightsByControlDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListControlInsightsByControlDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListControlInsightsByControlDomain",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_control_insights_by_control_domain_input::Builder {
crate::input::list_control_insights_by_control_domain_input::Builder::default()
}
}
pub mod list_controls_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_type: std::option::Option<crate::model::ControlType>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn control_type(mut self, input: crate::model::ControlType) -> Self {
self.control_type = Some(input);
self
}
pub fn set_control_type(
mut self,
input: std::option::Option<crate::model::ControlType>,
) -> Self {
self.control_type = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListControlsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListControlsInput {
control_type: self.control_type,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListControlsInputOperationOutputAlias = crate::operation::ListControls;
#[doc(hidden)]
pub type ListControlsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListControlsInput {
#[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::ListControls,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListControlsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/controls").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListControlsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_75) = &_input.control_type {
query.push_kv(
"controlType",
&aws_smithy_http::query::fmt_string(&inner_75),
);
}
if let Some(inner_76) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_76));
}
if let Some(inner_77) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_77).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListControlsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListControls::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListControls",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_controls_input::Builder {
crate::input::list_controls_input::Builder::default()
}
}
pub mod list_keywords_for_data_source_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) source: std::option::Option<crate::model::SourceType>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn source(mut self, input: crate::model::SourceType) -> Self {
self.source = Some(input);
self
}
pub fn set_source(mut self, input: std::option::Option<crate::model::SourceType>) -> Self {
self.source = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListKeywordsForDataSourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListKeywordsForDataSourceInput {
source: self.source,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListKeywordsForDataSourceInputOperationOutputAlias =
crate::operation::ListKeywordsForDataSource;
#[doc(hidden)]
pub type ListKeywordsForDataSourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListKeywordsForDataSourceInput {
#[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::ListKeywordsForDataSource,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListKeywordsForDataSourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/dataSourceKeywords").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListKeywordsForDataSourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_78) = &_input.source {
query.push_kv("source", &aws_smithy_http::query::fmt_string(&inner_78));
}
if let Some(inner_79) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_79));
}
if let Some(inner_80) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_80).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListKeywordsForDataSourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListKeywordsForDataSource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListKeywordsForDataSource",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_keywords_for_data_source_input::Builder {
crate::input::list_keywords_for_data_source_input::Builder::default()
}
}
pub mod list_notifications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::ListNotificationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListNotificationsInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListNotificationsInputOperationOutputAlias = crate::operation::ListNotifications;
#[doc(hidden)]
pub type ListNotificationsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListNotificationsInput {
#[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::ListNotifications,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListNotificationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/notifications").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListNotificationsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_81) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_81));
}
if let Some(inner_82) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_82).encode(),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListNotificationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListNotifications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListNotifications",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_notifications_input::Builder {
crate::input::list_notifications_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
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::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_83 = &_input.resource_arn;
let input_83 = input_83.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
},
)?;
let resource_arn = aws_smithy_http::label::fmt_string(input_83, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::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 register_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) kms_key: std::option::Option<std::string::String>,
pub(crate) delegated_admin_account: std::option::Option<std::string::String>,
}
impl Builder {
pub fn kms_key(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key = Some(input.into());
self
}
pub fn set_kms_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key = input;
self
}
pub fn delegated_admin_account(mut self, input: impl Into<std::string::String>) -> Self {
self.delegated_admin_account = Some(input.into());
self
}
pub fn set_delegated_admin_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.delegated_admin_account = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::RegisterAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::RegisterAccountInput {
kms_key: self.kms_key,
delegated_admin_account: self.delegated_admin_account,
})
}
}
}
#[doc(hidden)]
pub type RegisterAccountInputOperationOutputAlias = crate::operation::RegisterAccount;
#[doc(hidden)]
pub type RegisterAccountInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl RegisterAccountInput {
#[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::RegisterAccount,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::RegisterAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/registerAccount").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RegisterAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_register_account(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RegisterAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RegisterAccount",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::register_account_input::Builder {
crate::input::register_account_input::Builder::default()
}
}
pub mod register_organization_admin_account_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) admin_account_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn admin_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.admin_account_id = Some(input.into());
self
}
pub fn set_admin_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.admin_account_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::RegisterOrganizationAdminAccountInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::RegisterOrganizationAdminAccountInput {
admin_account_id: self.admin_account_id,
})
}
}
}
#[doc(hidden)]
pub type RegisterOrganizationAdminAccountInputOperationOutputAlias =
crate::operation::RegisterOrganizationAdminAccount;
#[doc(hidden)]
pub type RegisterOrganizationAdminAccountInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl RegisterOrganizationAdminAccountInput {
#[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::RegisterOrganizationAdminAccount,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::RegisterOrganizationAdminAccountInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/account/registerOrganizationAdminAccount")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RegisterOrganizationAdminAccountInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_register_organization_admin_account(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RegisterOrganizationAdminAccount::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RegisterOrganizationAdminAccount",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::register_organization_admin_account_input::Builder {
crate::input::register_organization_admin_account_input::Builder::default()
}
}
pub mod start_assessment_framework_share_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_id: std::option::Option<std::string::String>,
pub(crate) destination_account: std::option::Option<std::string::String>,
pub(crate) destination_region: std::option::Option<std::string::String>,
pub(crate) comment: std::option::Option<std::string::String>,
}
impl Builder {
pub fn framework_id(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_id = Some(input.into());
self
}
pub fn set_framework_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.framework_id = input;
self
}
pub fn destination_account(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_account = Some(input.into());
self
}
pub fn set_destination_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_account = input;
self
}
pub fn destination_region(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_region = Some(input.into());
self
}
pub fn set_destination_region(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_region = input;
self
}
pub fn comment(mut self, input: impl Into<std::string::String>) -> Self {
self.comment = Some(input.into());
self
}
pub fn set_comment(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartAssessmentFrameworkShareInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartAssessmentFrameworkShareInput {
framework_id: self.framework_id,
destination_account: self.destination_account,
destination_region: self.destination_region,
comment: self.comment,
})
}
}
}
#[doc(hidden)]
pub type StartAssessmentFrameworkShareInputOperationOutputAlias =
crate::operation::StartAssessmentFrameworkShare;
#[doc(hidden)]
pub type StartAssessmentFrameworkShareInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl StartAssessmentFrameworkShareInput {
#[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::StartAssessmentFrameworkShare,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::StartAssessmentFrameworkShareInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_84 = &_input.framework_id;
let input_84 = input_84.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
},
)?;
let framework_id = aws_smithy_http::label::fmt_string(input_84, false);
if framework_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworks/{frameworkId}/shareRequests",
frameworkId = framework_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartAssessmentFrameworkShareInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_assessment_framework_share(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartAssessmentFrameworkShare::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartAssessmentFrameworkShare",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::start_assessment_framework_share_input::Builder {
crate::input::start_assessment_framework_share_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: 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_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,
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,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
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::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_85 = &_input.resource_arn;
let input_85 = input_85.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
},
)?;
let resource_arn = aws_smithy_http::label::fmt_string(input_85, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, 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,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
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::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_86 = &_input.resource_arn;
let input_86 = input_86.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
},
)?;
let resource_arn = aws_smithy_http::label::fmt_string(input_86, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_87) = &_input.tag_keys {
for inner_88 in inner_87 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_88));
}
}
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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_assessment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) assessment_name: std::option::Option<std::string::String>,
pub(crate) assessment_description: std::option::Option<std::string::String>,
pub(crate) scope: std::option::Option<crate::model::Scope>,
pub(crate) assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub(crate) roles: std::option::Option<std::vec::Vec<crate::model::Role>>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn assessment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_name = Some(input.into());
self
}
pub fn set_assessment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_name = input;
self
}
pub fn assessment_description(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_description = Some(input.into());
self
}
pub fn set_assessment_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_description = input;
self
}
pub fn scope(mut self, input: crate::model::Scope) -> Self {
self.scope = Some(input);
self
}
pub fn set_scope(mut self, input: std::option::Option<crate::model::Scope>) -> Self {
self.scope = input;
self
}
pub fn assessment_reports_destination(
mut self,
input: crate::model::AssessmentReportsDestination,
) -> Self {
self.assessment_reports_destination = Some(input);
self
}
pub fn set_assessment_reports_destination(
mut self,
input: std::option::Option<crate::model::AssessmentReportsDestination>,
) -> Self {
self.assessment_reports_destination = input;
self
}
pub fn roles(mut self, input: crate::model::Role) -> Self {
let mut v = self.roles.unwrap_or_default();
v.push(input);
self.roles = Some(v);
self
}
pub fn set_roles(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Role>>,
) -> Self {
self.roles = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentInput {
assessment_id: self.assessment_id,
assessment_name: self.assessment_name,
assessment_description: self.assessment_description,
scope: self.scope,
assessment_reports_destination: self.assessment_reports_destination,
roles: self.roles,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentInputOperationOutputAlias = crate::operation::UpdateAssessment;
#[doc(hidden)]
pub type UpdateAssessmentInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentInput {
#[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::UpdateAssessment,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_89 = &_input.assessment_id;
let input_89 = input_89.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_89, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessment",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_input::Builder {
crate::input::update_assessment_input::Builder::default()
}
}
pub mod update_assessment_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) control_id: std::option::Option<std::string::String>,
pub(crate) control_status: std::option::Option<crate::model::ControlStatus>,
pub(crate) comment_body: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn control_status(mut self, input: crate::model::ControlStatus) -> Self {
self.control_status = Some(input);
self
}
pub fn set_control_status(
mut self,
input: std::option::Option<crate::model::ControlStatus>,
) -> Self {
self.control_status = input;
self
}
pub fn comment_body(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_body = Some(input.into());
self
}
pub fn set_comment_body(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_body = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentControlInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
control_id: self.control_id,
control_status: self.control_status,
comment_body: self.comment_body,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentControlInputOperationOutputAlias =
crate::operation::UpdateAssessmentControl;
#[doc(hidden)]
pub type UpdateAssessmentControlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentControlInput {
#[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::UpdateAssessmentControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_90 = &_input.assessment_id;
let input_90 = input_90.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_90, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_91 = &_input.control_set_id;
let input_91 = input_91.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_91, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
let input_92 = &_input.control_id;
let input_92 = input_92.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_92, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/controlSets/{controlSetId}/controls/{controlId}",
assessmentId = assessment_id,
controlSetId = control_set_id,
controlId = control_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment_control(
&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessmentControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessmentControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_control_input::Builder {
crate::input::update_assessment_control_input::Builder::default()
}
}
pub mod update_assessment_control_set_status_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) control_set_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::ControlSetStatus>,
pub(crate) comment: std::option::Option<std::string::String>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn control_set_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_set_id = Some(input.into());
self
}
pub fn set_control_set_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.control_set_id = input;
self
}
pub fn status(mut self, input: crate::model::ControlSetStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ControlSetStatus>,
) -> Self {
self.status = input;
self
}
pub fn comment(mut self, input: impl Into<std::string::String>) -> Self {
self.comment = Some(input.into());
self
}
pub fn set_comment(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentControlSetStatusInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentControlSetStatusInput {
assessment_id: self.assessment_id,
control_set_id: self.control_set_id,
status: self.status,
comment: self.comment,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentControlSetStatusInputOperationOutputAlias =
crate::operation::UpdateAssessmentControlSetStatus;
#[doc(hidden)]
pub type UpdateAssessmentControlSetStatusInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentControlSetStatusInput {
#[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::UpdateAssessmentControlSetStatus,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentControlSetStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_93 = &_input.assessment_id;
let input_93 = input_93.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_93, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
let input_94 = &_input.control_set_id;
let input_94 = input_94.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
},
)?;
let control_set_id = aws_smithy_http::label::fmt_string(input_94, false);
if control_set_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_set_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/controlSets/{controlSetId}/status",
assessmentId = assessment_id,
controlSetId = control_set_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentControlSetStatusInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment_control_set_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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessmentControlSetStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessmentControlSetStatus",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_control_set_status_input::Builder {
crate::input::update_assessment_control_set_status_input::Builder::default()
}
}
pub mod update_assessment_framework_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) framework_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) compliance_type: std::option::Option<std::string::String>,
pub(crate) control_sets:
std::option::Option<std::vec::Vec<crate::model::UpdateAssessmentFrameworkControlSet>>,
}
impl Builder {
pub fn framework_id(mut self, input: impl Into<std::string::String>) -> Self {
self.framework_id = Some(input.into());
self
}
pub fn set_framework_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.framework_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn compliance_type(mut self, input: impl Into<std::string::String>) -> Self {
self.compliance_type = Some(input.into());
self
}
pub fn set_compliance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.compliance_type = input;
self
}
pub fn control_sets(
mut self,
input: crate::model::UpdateAssessmentFrameworkControlSet,
) -> Self {
let mut v = self.control_sets.unwrap_or_default();
v.push(input);
self.control_sets = Some(v);
self
}
pub fn set_control_sets(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::UpdateAssessmentFrameworkControlSet>,
>,
) -> Self {
self.control_sets = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentFrameworkInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentFrameworkInput {
framework_id: self.framework_id,
name: self.name,
description: self.description,
compliance_type: self.compliance_type,
control_sets: self.control_sets,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentFrameworkInputOperationOutputAlias =
crate::operation::UpdateAssessmentFramework;
#[doc(hidden)]
pub type UpdateAssessmentFrameworkInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentFrameworkInput {
#[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::UpdateAssessmentFramework,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentFrameworkInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_95 = &_input.framework_id;
let input_95 = input_95.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
},
)?;
let framework_id = aws_smithy_http::label::fmt_string(input_95, false);
if framework_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "framework_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworks/{frameworkId}",
frameworkId = framework_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentFrameworkInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment_framework(
&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessmentFramework::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessmentFramework",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_framework_input::Builder {
crate::input::update_assessment_framework_input::Builder::default()
}
}
pub mod update_assessment_framework_share_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) request_id: std::option::Option<std::string::String>,
pub(crate) request_type: std::option::Option<crate::model::ShareRequestType>,
pub(crate) action: std::option::Option<crate::model::ShareRequestAction>,
}
impl Builder {
pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn request_type(mut self, input: crate::model::ShareRequestType) -> Self {
self.request_type = Some(input);
self
}
pub fn set_request_type(
mut self,
input: std::option::Option<crate::model::ShareRequestType>,
) -> Self {
self.request_type = input;
self
}
pub fn action(mut self, input: crate::model::ShareRequestAction) -> Self {
self.action = Some(input);
self
}
pub fn set_action(
mut self,
input: std::option::Option<crate::model::ShareRequestAction>,
) -> Self {
self.action = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentFrameworkShareInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentFrameworkShareInput {
request_id: self.request_id,
request_type: self.request_type,
action: self.action,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentFrameworkShareInputOperationOutputAlias =
crate::operation::UpdateAssessmentFrameworkShare;
#[doc(hidden)]
pub type UpdateAssessmentFrameworkShareInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentFrameworkShareInput {
#[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::UpdateAssessmentFrameworkShare,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentFrameworkShareInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_96 = &_input.request_id;
let input_96 = input_96.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "request_id",
details: "cannot be empty or unset",
},
)?;
let request_id = aws_smithy_http::label::fmt_string(input_96, false);
if request_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "request_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessmentFrameworkShareRequests/{requestId}",
requestId = request_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentFrameworkShareInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment_framework_share(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessmentFrameworkShare::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessmentFrameworkShare",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_framework_share_input::Builder {
crate::input::update_assessment_framework_share_input::Builder::default()
}
}
pub mod update_assessment_status_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) assessment_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::AssessmentStatus>,
}
impl Builder {
pub fn assessment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.assessment_id = Some(input.into());
self
}
pub fn set_assessment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.assessment_id = input;
self
}
pub fn status(mut self, input: crate::model::AssessmentStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::AssessmentStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateAssessmentStatusInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateAssessmentStatusInput {
assessment_id: self.assessment_id,
status: self.status,
})
}
}
}
#[doc(hidden)]
pub type UpdateAssessmentStatusInputOperationOutputAlias = crate::operation::UpdateAssessmentStatus;
#[doc(hidden)]
pub type UpdateAssessmentStatusInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateAssessmentStatusInput {
#[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::UpdateAssessmentStatus,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateAssessmentStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_97 = &_input.assessment_id;
let input_97 = input_97.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
},
)?;
let assessment_id = aws_smithy_http::label::fmt_string(input_97, false);
if assessment_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "assessment_id",
details: "cannot be empty or unset",
});
}
write!(
output,
"/assessments/{assessmentId}/status",
assessmentId = assessment_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAssessmentStatusInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_assessment_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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateAssessmentStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAssessmentStatus",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_assessment_status_input::Builder {
crate::input::update_assessment_status_input::Builder::default()
}
}
pub mod update_control_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) control_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) testing_information: std::option::Option<std::string::String>,
pub(crate) action_plan_title: std::option::Option<std::string::String>,
pub(crate) action_plan_instructions: std::option::Option<std::string::String>,
pub(crate) control_mapping_sources:
std::option::Option<std::vec::Vec<crate::model::ControlMappingSource>>,
}
impl Builder {
pub fn control_id(mut self, input: impl Into<std::string::String>) -> Self {
self.control_id = Some(input.into());
self
}
pub fn set_control_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.control_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn testing_information(mut self, input: impl Into<std::string::String>) -> Self {
self.testing_information = Some(input.into());
self
}
pub fn set_testing_information(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.testing_information = input;
self
}
pub fn action_plan_title(mut self, input: impl Into<std::string::String>) -> Self {
self.action_plan_title = Some(input.into());
self
}
pub fn set_action_plan_title(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.action_plan_title = input;
self
}
pub fn action_plan_instructions(mut self, input: impl Into<std::string::String>) -> Self {
self.action_plan_instructions = Some(input.into());
self
}
pub fn set_action_plan_instructions(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.action_plan_instructions = input;
self
}
pub fn control_mapping_sources(
mut self,
input: crate::model::ControlMappingSource,
) -> Self {
let mut v = self.control_mapping_sources.unwrap_or_default();
v.push(input);
self.control_mapping_sources = Some(v);
self
}
pub fn set_control_mapping_sources(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ControlMappingSource>>,
) -> Self {
self.control_mapping_sources = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateControlInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateControlInput {
control_id: self.control_id,
name: self.name,
description: self.description,
testing_information: self.testing_information,
action_plan_title: self.action_plan_title,
action_plan_instructions: self.action_plan_instructions,
control_mapping_sources: self.control_mapping_sources,
})
}
}
}
#[doc(hidden)]
pub type UpdateControlInputOperationOutputAlias = crate::operation::UpdateControl;
#[doc(hidden)]
pub type UpdateControlInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateControlInput {
#[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::UpdateControl,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateControlInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_98 = &_input.control_id;
let input_98 = input_98.as_ref().ok_or(
aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
},
)?;
let control_id = aws_smithy_http::label::fmt_string(input_98, false);
if control_id.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "control_id",
details: "cannot be empty or unset",
});
}
write!(output, "/controls/{controlId}", controlId = control_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateControlInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_control(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateControl::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateControl",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_control_input::Builder {
crate::input::update_control_input::Builder::default()
}
}
pub mod update_settings_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) sns_topic: std::option::Option<std::string::String>,
pub(crate) default_assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub(crate) default_process_owners: std::option::Option<std::vec::Vec<crate::model::Role>>,
pub(crate) kms_key: std::option::Option<std::string::String>,
}
impl Builder {
pub fn sns_topic(mut self, input: impl Into<std::string::String>) -> Self {
self.sns_topic = Some(input.into());
self
}
pub fn set_sns_topic(mut self, input: std::option::Option<std::string::String>) -> Self {
self.sns_topic = input;
self
}
pub fn default_assessment_reports_destination(
mut self,
input: crate::model::AssessmentReportsDestination,
) -> Self {
self.default_assessment_reports_destination = Some(input);
self
}
pub fn set_default_assessment_reports_destination(
mut self,
input: std::option::Option<crate::model::AssessmentReportsDestination>,
) -> Self {
self.default_assessment_reports_destination = input;
self
}
pub fn default_process_owners(mut self, input: crate::model::Role) -> Self {
let mut v = self.default_process_owners.unwrap_or_default();
v.push(input);
self.default_process_owners = Some(v);
self
}
pub fn set_default_process_owners(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Role>>,
) -> Self {
self.default_process_owners = input;
self
}
pub fn kms_key(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key = Some(input.into());
self
}
pub fn set_kms_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateSettingsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateSettingsInput {
sns_topic: self.sns_topic,
default_assessment_reports_destination: self.default_assessment_reports_destination,
default_process_owners: self.default_process_owners,
kms_key: self.kms_key,
})
}
}
}
#[doc(hidden)]
pub type UpdateSettingsInputOperationOutputAlias = crate::operation::UpdateSettings;
#[doc(hidden)]
pub type UpdateSettingsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateSettingsInput {
#[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::UpdateSettings,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/settings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_settings(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateSettings",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_settings_input::Builder {
crate::input::update_settings_input::Builder::default()
}
}
pub mod validate_assessment_report_integrity_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) s3_relative_path: std::option::Option<std::string::String>,
}
impl Builder {
pub fn s3_relative_path(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_relative_path = Some(input.into());
self
}
pub fn set_s3_relative_path(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.s3_relative_path = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ValidateAssessmentReportIntegrityInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ValidateAssessmentReportIntegrityInput {
s3_relative_path: self.s3_relative_path,
})
}
}
}
#[doc(hidden)]
pub type ValidateAssessmentReportIntegrityInputOperationOutputAlias =
crate::operation::ValidateAssessmentReportIntegrity;
#[doc(hidden)]
pub type ValidateAssessmentReportIntegrityInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ValidateAssessmentReportIntegrityInput {
#[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::ValidateAssessmentReportIntegrity,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ValidateAssessmentReportIntegrityInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/assessmentReports/integrity").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ValidateAssessmentReportIntegrityInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_validate_assessment_report_integrity(&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);
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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ValidateAssessmentReportIntegrity::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ValidateAssessmentReportIntegrity",
"auditmanager",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::validate_assessment_report_integrity_input::Builder {
crate::input::validate_assessment_report_integrity_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidateAssessmentReportIntegrityInput {
pub s3_relative_path: std::option::Option<std::string::String>,
}
impl ValidateAssessmentReportIntegrityInput {
pub fn s3_relative_path(&self) -> std::option::Option<&str> {
self.s3_relative_path.as_deref()
}
}
impl std::fmt::Debug for ValidateAssessmentReportIntegrityInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidateAssessmentReportIntegrityInput");
formatter.field("s3_relative_path", &self.s3_relative_path);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateSettingsInput {
pub sns_topic: std::option::Option<std::string::String>,
pub default_assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub default_process_owners: std::option::Option<std::vec::Vec<crate::model::Role>>,
pub kms_key: std::option::Option<std::string::String>,
}
impl UpdateSettingsInput {
pub fn sns_topic(&self) -> std::option::Option<&str> {
self.sns_topic.as_deref()
}
pub fn default_assessment_reports_destination(
&self,
) -> std::option::Option<&crate::model::AssessmentReportsDestination> {
self.default_assessment_reports_destination.as_ref()
}
pub fn default_process_owners(&self) -> std::option::Option<&[crate::model::Role]> {
self.default_process_owners.as_deref()
}
pub fn kms_key(&self) -> std::option::Option<&str> {
self.kms_key.as_deref()
}
}
impl std::fmt::Debug for UpdateSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateSettingsInput");
formatter.field("sns_topic", &self.sns_topic);
formatter.field(
"default_assessment_reports_destination",
&self.default_assessment_reports_destination,
);
formatter.field("default_process_owners", &self.default_process_owners);
formatter.field("kms_key", &self.kms_key);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateControlInput {
pub control_id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub testing_information: std::option::Option<std::string::String>,
pub action_plan_title: std::option::Option<std::string::String>,
pub action_plan_instructions: std::option::Option<std::string::String>,
pub control_mapping_sources:
std::option::Option<std::vec::Vec<crate::model::ControlMappingSource>>,
}
impl UpdateControlInput {
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn testing_information(&self) -> std::option::Option<&str> {
self.testing_information.as_deref()
}
pub fn action_plan_title(&self) -> std::option::Option<&str> {
self.action_plan_title.as_deref()
}
pub fn action_plan_instructions(&self) -> std::option::Option<&str> {
self.action_plan_instructions.as_deref()
}
pub fn control_mapping_sources(
&self,
) -> std::option::Option<&[crate::model::ControlMappingSource]> {
self.control_mapping_sources.as_deref()
}
}
impl std::fmt::Debug for UpdateControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateControlInput");
formatter.field("control_id", &self.control_id);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("testing_information", &self.testing_information);
formatter.field("action_plan_title", &self.action_plan_title);
formatter.field("action_plan_instructions", &self.action_plan_instructions);
formatter.field("control_mapping_sources", &self.control_mapping_sources);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentStatusInput {
pub assessment_id: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::AssessmentStatus>,
}
impl UpdateAssessmentStatusInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::AssessmentStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for UpdateAssessmentStatusInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentStatusInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("status", &self.status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentFrameworkShareInput {
pub request_id: std::option::Option<std::string::String>,
pub request_type: std::option::Option<crate::model::ShareRequestType>,
pub action: std::option::Option<crate::model::ShareRequestAction>,
}
impl UpdateAssessmentFrameworkShareInput {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
pub fn request_type(&self) -> std::option::Option<&crate::model::ShareRequestType> {
self.request_type.as_ref()
}
pub fn action(&self) -> std::option::Option<&crate::model::ShareRequestAction> {
self.action.as_ref()
}
}
impl std::fmt::Debug for UpdateAssessmentFrameworkShareInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentFrameworkShareInput");
formatter.field("request_id", &self.request_id);
formatter.field("request_type", &self.request_type);
formatter.field("action", &self.action);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentFrameworkInput {
pub framework_id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub compliance_type: std::option::Option<std::string::String>,
pub control_sets:
std::option::Option<std::vec::Vec<crate::model::UpdateAssessmentFrameworkControlSet>>,
}
impl UpdateAssessmentFrameworkInput {
pub fn framework_id(&self) -> std::option::Option<&str> {
self.framework_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn compliance_type(&self) -> std::option::Option<&str> {
self.compliance_type.as_deref()
}
pub fn control_sets(
&self,
) -> std::option::Option<&[crate::model::UpdateAssessmentFrameworkControlSet]> {
self.control_sets.as_deref()
}
}
impl std::fmt::Debug for UpdateAssessmentFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentFrameworkInput");
formatter.field("framework_id", &self.framework_id);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("compliance_type", &self.compliance_type);
formatter.field("control_sets", &self.control_sets);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentControlSetStatusInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::ControlSetStatus>,
pub comment: std::option::Option<std::string::String>,
}
impl UpdateAssessmentControlSetStatusInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ControlSetStatus> {
self.status.as_ref()
}
pub fn comment(&self) -> std::option::Option<&str> {
self.comment.as_deref()
}
}
impl std::fmt::Debug for UpdateAssessmentControlSetStatusInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentControlSetStatusInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("status", &self.status);
formatter.field("comment", &self.comment);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentControlInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub control_id: std::option::Option<std::string::String>,
pub control_status: std::option::Option<crate::model::ControlStatus>,
pub comment_body: std::option::Option<std::string::String>,
}
impl UpdateAssessmentControlInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
pub fn control_status(&self) -> std::option::Option<&crate::model::ControlStatus> {
self.control_status.as_ref()
}
pub fn comment_body(&self) -> std::option::Option<&str> {
self.comment_body.as_deref()
}
}
impl std::fmt::Debug for UpdateAssessmentControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentControlInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("control_id", &self.control_id);
formatter.field("control_status", &self.control_status);
formatter.field("comment_body", &self.comment_body);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
pub assessment_name: std::option::Option<std::string::String>,
pub assessment_description: std::option::Option<std::string::String>,
pub scope: std::option::Option<crate::model::Scope>,
pub assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub roles: std::option::Option<std::vec::Vec<crate::model::Role>>,
}
impl UpdateAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn assessment_name(&self) -> std::option::Option<&str> {
self.assessment_name.as_deref()
}
pub fn assessment_description(&self) -> std::option::Option<&str> {
self.assessment_description.as_deref()
}
pub fn scope(&self) -> std::option::Option<&crate::model::Scope> {
self.scope.as_ref()
}
pub fn assessment_reports_destination(
&self,
) -> std::option::Option<&crate::model::AssessmentReportsDestination> {
self.assessment_reports_destination.as_ref()
}
pub fn roles(&self) -> std::option::Option<&[crate::model::Role]> {
self.roles.as_deref()
}
}
impl std::fmt::Debug for UpdateAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("assessment_name", &self.assessment_name);
formatter.field("assessment_description", &self.assessment_description);
formatter.field("scope", &self.scope);
formatter.field(
"assessment_reports_destination",
&self.assessment_reports_destination,
);
formatter.field("roles", &self.roles);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
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()
}
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &self.tag_keys);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartAssessmentFrameworkShareInput {
pub framework_id: std::option::Option<std::string::String>,
pub destination_account: std::option::Option<std::string::String>,
pub destination_region: std::option::Option<std::string::String>,
pub comment: std::option::Option<std::string::String>,
}
impl StartAssessmentFrameworkShareInput {
pub fn framework_id(&self) -> std::option::Option<&str> {
self.framework_id.as_deref()
}
pub fn destination_account(&self) -> std::option::Option<&str> {
self.destination_account.as_deref()
}
pub fn destination_region(&self) -> std::option::Option<&str> {
self.destination_region.as_deref()
}
pub fn comment(&self) -> std::option::Option<&str> {
self.comment.as_deref()
}
}
impl std::fmt::Debug for StartAssessmentFrameworkShareInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartAssessmentFrameworkShareInput");
formatter.field("framework_id", &self.framework_id);
formatter.field("destination_account", &self.destination_account);
formatter.field("destination_region", &self.destination_region);
formatter.field("comment", &self.comment);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RegisterOrganizationAdminAccountInput {
pub admin_account_id: std::option::Option<std::string::String>,
}
impl RegisterOrganizationAdminAccountInput {
pub fn admin_account_id(&self) -> std::option::Option<&str> {
self.admin_account_id.as_deref()
}
}
impl std::fmt::Debug for RegisterOrganizationAdminAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RegisterOrganizationAdminAccountInput");
formatter.field("admin_account_id", &self.admin_account_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RegisterAccountInput {
pub kms_key: std::option::Option<std::string::String>,
pub delegated_admin_account: std::option::Option<std::string::String>,
}
impl RegisterAccountInput {
pub fn kms_key(&self) -> std::option::Option<&str> {
self.kms_key.as_deref()
}
pub fn delegated_admin_account(&self) -> std::option::Option<&str> {
self.delegated_admin_account.as_deref()
}
}
impl std::fmt::Debug for RegisterAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RegisterAccountInput");
formatter.field("kms_key", &self.kms_key);
formatter.field("delegated_admin_account", &self.delegated_admin_account);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsForResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl std::fmt::Debug for ListTagsForResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsForResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListNotificationsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListNotificationsInput {
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
}
}
impl std::fmt::Debug for ListNotificationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListNotificationsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListKeywordsForDataSourceInput {
pub source: std::option::Option<crate::model::SourceType>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListKeywordsForDataSourceInput {
pub fn source(&self) -> std::option::Option<&crate::model::SourceType> {
self.source.as_ref()
}
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
}
}
impl std::fmt::Debug for ListKeywordsForDataSourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListKeywordsForDataSourceInput");
formatter.field("source", &self.source);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListControlsInput {
pub control_type: std::option::Option<crate::model::ControlType>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListControlsInput {
pub fn control_type(&self) -> std::option::Option<&crate::model::ControlType> {
self.control_type.as_ref()
}
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
}
}
impl std::fmt::Debug for ListControlsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListControlsInput");
formatter.field("control_type", &self.control_type);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListControlInsightsByControlDomainInput {
pub control_domain_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListControlInsightsByControlDomainInput {
pub fn control_domain_id(&self) -> std::option::Option<&str> {
self.control_domain_id.as_deref()
}
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
}
}
impl std::fmt::Debug for ListControlInsightsByControlDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListControlInsightsByControlDomainInput");
formatter.field("control_domain_id", &self.control_domain_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListControlDomainInsightsByAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListControlDomainInsightsByAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
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
}
}
impl std::fmt::Debug for ListControlDomainInsightsByAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListControlDomainInsightsByAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListControlDomainInsightsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListControlDomainInsightsInput {
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
}
}
impl std::fmt::Debug for ListControlDomainInsightsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListControlDomainInsightsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssessmentsInput {
pub status: std::option::Option<crate::model::AssessmentStatus>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssessmentsInput {
pub fn status(&self) -> std::option::Option<&crate::model::AssessmentStatus> {
self.status.as_ref()
}
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
}
}
impl std::fmt::Debug for ListAssessmentsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssessmentsInput");
formatter.field("status", &self.status);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssessmentReportsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssessmentReportsInput {
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
}
}
impl std::fmt::Debug for ListAssessmentReportsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssessmentReportsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssessmentFrameworkShareRequestsInput {
pub request_type: std::option::Option<crate::model::ShareRequestType>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssessmentFrameworkShareRequestsInput {
pub fn request_type(&self) -> std::option::Option<&crate::model::ShareRequestType> {
self.request_type.as_ref()
}
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
}
}
impl std::fmt::Debug for ListAssessmentFrameworkShareRequestsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssessmentFrameworkShareRequestsInput");
formatter.field("request_type", &self.request_type);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssessmentFrameworksInput {
pub framework_type: std::option::Option<crate::model::FrameworkType>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssessmentFrameworksInput {
pub fn framework_type(&self) -> std::option::Option<&crate::model::FrameworkType> {
self.framework_type.as_ref()
}
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
}
}
impl std::fmt::Debug for ListAssessmentFrameworksInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssessmentFrameworksInput");
formatter.field("framework_type", &self.framework_type);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListAssessmentControlInsightsByControlDomainInput {
pub control_domain_id: std::option::Option<std::string::String>,
pub assessment_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListAssessmentControlInsightsByControlDomainInput {
pub fn control_domain_id(&self) -> std::option::Option<&str> {
self.control_domain_id.as_deref()
}
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
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
}
}
impl std::fmt::Debug for ListAssessmentControlInsightsByControlDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListAssessmentControlInsightsByControlDomainInput");
formatter.field("control_domain_id", &self.control_domain_id);
formatter.field("assessment_id", &self.assessment_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetSettingsInput {
pub attribute: std::option::Option<crate::model::SettingAttribute>,
}
impl GetSettingsInput {
pub fn attribute(&self) -> std::option::Option<&crate::model::SettingAttribute> {
self.attribute.as_ref()
}
}
impl std::fmt::Debug for GetSettingsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetSettingsInput");
formatter.field("attribute", &self.attribute);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetServicesInScopeInput {}
impl std::fmt::Debug for GetServicesInScopeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetServicesInScopeInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetOrganizationAdminAccountInput {}
impl std::fmt::Debug for GetOrganizationAdminAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetOrganizationAdminAccountInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetInsightsByAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
}
impl GetInsightsByAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for GetInsightsByAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetInsightsByAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetInsightsInput {}
impl std::fmt::Debug for GetInsightsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetInsightsInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetEvidenceFoldersByAssessmentControlInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub control_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetEvidenceFoldersByAssessmentControlInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
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
}
}
impl std::fmt::Debug for GetEvidenceFoldersByAssessmentControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceFoldersByAssessmentControlInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("control_id", &self.control_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetEvidenceFoldersByAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetEvidenceFoldersByAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
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
}
}
impl std::fmt::Debug for GetEvidenceFoldersByAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceFoldersByAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetEvidenceFolderInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
}
impl GetEvidenceFolderInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
}
impl std::fmt::Debug for GetEvidenceFolderInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceFolderInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetEvidenceByEvidenceFolderInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetEvidenceByEvidenceFolderInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
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
}
}
impl std::fmt::Debug for GetEvidenceByEvidenceFolderInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceByEvidenceFolderInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetEvidenceInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
pub evidence_id: std::option::Option<std::string::String>,
}
impl GetEvidenceInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
pub fn evidence_id(&self) -> std::option::Option<&str> {
self.evidence_id.as_deref()
}
}
impl std::fmt::Debug for GetEvidenceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.field("evidence_id", &self.evidence_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDelegationsInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetDelegationsInput {
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
}
}
impl std::fmt::Debug for GetDelegationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDelegationsInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetControlInput {
pub control_id: std::option::Option<std::string::String>,
}
impl GetControlInput {
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
}
impl std::fmt::Debug for GetControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetControlInput");
formatter.field("control_id", &self.control_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetChangeLogsInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub control_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl GetChangeLogsInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
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
}
}
impl std::fmt::Debug for GetChangeLogsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetChangeLogsInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("control_id", &self.control_id);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetAssessmentReportUrlInput {
pub assessment_report_id: std::option::Option<std::string::String>,
pub assessment_id: std::option::Option<std::string::String>,
}
impl GetAssessmentReportUrlInput {
pub fn assessment_report_id(&self) -> std::option::Option<&str> {
self.assessment_report_id.as_deref()
}
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for GetAssessmentReportUrlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetAssessmentReportUrlInput");
formatter.field("assessment_report_id", &self.assessment_report_id);
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetAssessmentFrameworkInput {
pub framework_id: std::option::Option<std::string::String>,
}
impl GetAssessmentFrameworkInput {
pub fn framework_id(&self) -> std::option::Option<&str> {
self.framework_id.as_deref()
}
}
impl std::fmt::Debug for GetAssessmentFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetAssessmentFrameworkInput");
formatter.field("framework_id", &self.framework_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
}
impl GetAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for GetAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetAccountStatusInput {}
impl std::fmt::Debug for GetAccountStatusInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetAccountStatusInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DisassociateAssessmentReportEvidenceFolderInput {
pub assessment_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
}
impl DisassociateAssessmentReportEvidenceFolderInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
}
impl std::fmt::Debug for DisassociateAssessmentReportEvidenceFolderInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DisassociateAssessmentReportEvidenceFolderInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeregisterOrganizationAdminAccountInput {
pub admin_account_id: std::option::Option<std::string::String>,
}
impl DeregisterOrganizationAdminAccountInput {
pub fn admin_account_id(&self) -> std::option::Option<&str> {
self.admin_account_id.as_deref()
}
}
impl std::fmt::Debug for DeregisterOrganizationAdminAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeregisterOrganizationAdminAccountInput");
formatter.field("admin_account_id", &self.admin_account_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeregisterAccountInput {}
impl std::fmt::Debug for DeregisterAccountInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeregisterAccountInput");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteControlInput {
pub control_id: std::option::Option<std::string::String>,
}
impl DeleteControlInput {
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
}
impl std::fmt::Debug for DeleteControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteControlInput");
formatter.field("control_id", &self.control_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteAssessmentReportInput {
pub assessment_id: std::option::Option<std::string::String>,
pub assessment_report_id: std::option::Option<std::string::String>,
}
impl DeleteAssessmentReportInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn assessment_report_id(&self) -> std::option::Option<&str> {
self.assessment_report_id.as_deref()
}
}
impl std::fmt::Debug for DeleteAssessmentReportInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteAssessmentReportInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("assessment_report_id", &self.assessment_report_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteAssessmentFrameworkShareInput {
pub request_id: std::option::Option<std::string::String>,
pub request_type: std::option::Option<crate::model::ShareRequestType>,
}
impl DeleteAssessmentFrameworkShareInput {
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
pub fn request_type(&self) -> std::option::Option<&crate::model::ShareRequestType> {
self.request_type.as_ref()
}
}
impl std::fmt::Debug for DeleteAssessmentFrameworkShareInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteAssessmentFrameworkShareInput");
formatter.field("request_id", &self.request_id);
formatter.field("request_type", &self.request_type);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteAssessmentFrameworkInput {
pub framework_id: std::option::Option<std::string::String>,
}
impl DeleteAssessmentFrameworkInput {
pub fn framework_id(&self) -> std::option::Option<&str> {
self.framework_id.as_deref()
}
}
impl std::fmt::Debug for DeleteAssessmentFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteAssessmentFrameworkInput");
formatter.field("framework_id", &self.framework_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteAssessmentInput {
pub assessment_id: std::option::Option<std::string::String>,
}
impl DeleteAssessmentInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for DeleteAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteAssessmentInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateControlInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub testing_information: std::option::Option<std::string::String>,
pub action_plan_title: std::option::Option<std::string::String>,
pub action_plan_instructions: std::option::Option<std::string::String>,
pub control_mapping_sources:
std::option::Option<std::vec::Vec<crate::model::CreateControlMappingSource>>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateControlInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn testing_information(&self) -> std::option::Option<&str> {
self.testing_information.as_deref()
}
pub fn action_plan_title(&self) -> std::option::Option<&str> {
self.action_plan_title.as_deref()
}
pub fn action_plan_instructions(&self) -> std::option::Option<&str> {
self.action_plan_instructions.as_deref()
}
pub fn control_mapping_sources(
&self,
) -> std::option::Option<&[crate::model::CreateControlMappingSource]> {
self.control_mapping_sources.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateControlInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("testing_information", &self.testing_information);
formatter.field("action_plan_title", &self.action_plan_title);
formatter.field("action_plan_instructions", &self.action_plan_instructions);
formatter.field("control_mapping_sources", &self.control_mapping_sources);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateAssessmentReportInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub assessment_id: std::option::Option<std::string::String>,
}
impl CreateAssessmentReportInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for CreateAssessmentReportInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssessmentReportInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateAssessmentFrameworkInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub compliance_type: std::option::Option<std::string::String>,
pub control_sets:
std::option::Option<std::vec::Vec<crate::model::CreateAssessmentFrameworkControlSet>>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateAssessmentFrameworkInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn compliance_type(&self) -> std::option::Option<&str> {
self.compliance_type.as_deref()
}
pub fn control_sets(
&self,
) -> std::option::Option<&[crate::model::CreateAssessmentFrameworkControlSet]> {
self.control_sets.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateAssessmentFrameworkInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssessmentFrameworkInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("compliance_type", &self.compliance_type);
formatter.field("control_sets", &self.control_sets);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateAssessmentInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub assessment_reports_destination:
std::option::Option<crate::model::AssessmentReportsDestination>,
pub scope: std::option::Option<crate::model::Scope>,
pub roles: std::option::Option<std::vec::Vec<crate::model::Role>>,
pub framework_id: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateAssessmentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn assessment_reports_destination(
&self,
) -> std::option::Option<&crate::model::AssessmentReportsDestination> {
self.assessment_reports_destination.as_ref()
}
pub fn scope(&self) -> std::option::Option<&crate::model::Scope> {
self.scope.as_ref()
}
pub fn roles(&self) -> std::option::Option<&[crate::model::Role]> {
self.roles.as_deref()
}
pub fn framework_id(&self) -> std::option::Option<&str> {
self.framework_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssessmentInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field(
"assessment_reports_destination",
&self.assessment_reports_destination,
);
formatter.field("scope", &self.scope);
formatter.field("roles", &self.roles);
formatter.field("framework_id", &self.framework_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchImportEvidenceToAssessmentControlInput {
pub assessment_id: std::option::Option<std::string::String>,
pub control_set_id: std::option::Option<std::string::String>,
pub control_id: std::option::Option<std::string::String>,
pub manual_evidence: std::option::Option<std::vec::Vec<crate::model::ManualEvidence>>,
}
impl BatchImportEvidenceToAssessmentControlInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn control_set_id(&self) -> std::option::Option<&str> {
self.control_set_id.as_deref()
}
pub fn control_id(&self) -> std::option::Option<&str> {
self.control_id.as_deref()
}
pub fn manual_evidence(&self) -> std::option::Option<&[crate::model::ManualEvidence]> {
self.manual_evidence.as_deref()
}
}
impl std::fmt::Debug for BatchImportEvidenceToAssessmentControlInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchImportEvidenceToAssessmentControlInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("control_set_id", &self.control_set_id);
formatter.field("control_id", &self.control_id);
formatter.field("manual_evidence", &self.manual_evidence);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDisassociateAssessmentReportEvidenceInput {
pub assessment_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
pub evidence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchDisassociateAssessmentReportEvidenceInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
pub fn evidence_ids(&self) -> std::option::Option<&[std::string::String]> {
self.evidence_ids.as_deref()
}
}
impl std::fmt::Debug for BatchDisassociateAssessmentReportEvidenceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDisassociateAssessmentReportEvidenceInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.field("evidence_ids", &self.evidence_ids);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDeleteDelegationByAssessmentInput {
pub delegation_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub assessment_id: std::option::Option<std::string::String>,
}
impl BatchDeleteDelegationByAssessmentInput {
pub fn delegation_ids(&self) -> std::option::Option<&[std::string::String]> {
self.delegation_ids.as_deref()
}
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for BatchDeleteDelegationByAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDeleteDelegationByAssessmentInput");
formatter.field("delegation_ids", &self.delegation_ids);
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchCreateDelegationByAssessmentInput {
pub create_delegation_requests:
std::option::Option<std::vec::Vec<crate::model::CreateDelegationRequest>>,
pub assessment_id: std::option::Option<std::string::String>,
}
impl BatchCreateDelegationByAssessmentInput {
pub fn create_delegation_requests(
&self,
) -> std::option::Option<&[crate::model::CreateDelegationRequest]> {
self.create_delegation_requests.as_deref()
}
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
}
impl std::fmt::Debug for BatchCreateDelegationByAssessmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchCreateDelegationByAssessmentInput");
formatter.field(
"create_delegation_requests",
&self.create_delegation_requests,
);
formatter.field("assessment_id", &self.assessment_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchAssociateAssessmentReportEvidenceInput {
pub assessment_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
pub evidence_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchAssociateAssessmentReportEvidenceInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
pub fn evidence_ids(&self) -> std::option::Option<&[std::string::String]> {
self.evidence_ids.as_deref()
}
}
impl std::fmt::Debug for BatchAssociateAssessmentReportEvidenceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchAssociateAssessmentReportEvidenceInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.field("evidence_ids", &self.evidence_ids);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AssociateAssessmentReportEvidenceFolderInput {
pub assessment_id: std::option::Option<std::string::String>,
pub evidence_folder_id: std::option::Option<std::string::String>,
}
impl AssociateAssessmentReportEvidenceFolderInput {
pub fn assessment_id(&self) -> std::option::Option<&str> {
self.assessment_id.as_deref()
}
pub fn evidence_folder_id(&self) -> std::option::Option<&str> {
self.evidence_folder_id.as_deref()
}
}
impl std::fmt::Debug for AssociateAssessmentReportEvidenceFolderInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AssociateAssessmentReportEvidenceFolderInput");
formatter.field("assessment_id", &self.assessment_id);
formatter.field("evidence_folder_id", &self.evidence_folder_id);
formatter.finish()
}
}