use std::fmt::Write;
pub mod archive_application_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ArchiveApplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ArchiveApplicationInput {
application_id: self.application_id,
})
}
}
}
impl ArchiveApplicationInput {
#[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::ArchiveApplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ArchiveApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ArchiveApplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ArchiveApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_archive_application(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ArchiveApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ArchiveApplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::archive_application_input::Builder {
crate::input::archive_application_input::Builder::default()
}
}
pub mod archive_wave_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ArchiveWaveInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ArchiveWaveInput {
wave_id: self.wave_id,
})
}
}
}
impl ArchiveWaveInput {
#[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::ArchiveWave,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ArchiveWaveInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ArchiveWave").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ArchiveWaveInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_archive_wave(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ArchiveWave::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ArchiveWave",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::archive_wave_input::Builder {
crate::input::archive_wave_input::Builder::default()
}
}
pub mod associate_applications_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_id: std::option::Option<std::string::String>,
pub(crate) application_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_id = input;
self
}
pub fn application_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.application_i_ds.unwrap_or_default();
v.push(input.into());
self.application_i_ds = Some(v);
self
}
pub fn set_application_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.application_i_ds = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateApplicationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateApplicationsInput {
wave_id: self.wave_id,
application_i_ds: self.application_i_ds,
})
}
}
}
impl AssociateApplicationsInput {
#[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::AssociateApplications,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateApplicationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/AssociateApplications").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateApplicationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_applications(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateApplications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateApplications",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_applications_input::Builder {
crate::input::associate_applications_input::Builder::default()
}
}
pub mod associate_source_servers_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
pub(crate) source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
pub fn source_server_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.source_server_i_ds.unwrap_or_default();
v.push(input.into());
self.source_server_i_ds = Some(v);
self
}
pub fn set_source_server_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.source_server_i_ds = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateSourceServersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateSourceServersInput {
application_id: self.application_id,
source_server_i_ds: self.source_server_i_ds,
})
}
}
}
impl AssociateSourceServersInput {
#[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::AssociateSourceServers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateSourceServersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/AssociateSourceServers").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateSourceServersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_source_servers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateSourceServers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateSourceServers",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_source_servers_input::Builder {
crate::input::associate_source_servers_input::Builder::default()
}
}
pub mod change_server_life_cycle_state_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) life_cycle:
std::option::Option<crate::model::ChangeServerLifeCycleStateSourceServerLifecycle>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn life_cycle(
mut self,
input: crate::model::ChangeServerLifeCycleStateSourceServerLifecycle,
) -> Self {
self.life_cycle = Some(input);
self
}
pub fn set_life_cycle(
mut self,
input: std::option::Option<
crate::model::ChangeServerLifeCycleStateSourceServerLifecycle,
>,
) -> Self {
self.life_cycle = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ChangeServerLifeCycleStateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ChangeServerLifeCycleStateInput {
source_server_id: self.source_server_id,
life_cycle: self.life_cycle,
})
}
}
}
impl ChangeServerLifeCycleStateInput {
#[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::ChangeServerLifeCycleState,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ChangeServerLifeCycleStateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ChangeServerLifeCycleState").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ChangeServerLifeCycleStateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_change_server_life_cycle_state(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ChangeServerLifeCycleState::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ChangeServerLifeCycleState",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::change_server_life_cycle_state_input::Builder {
crate::input::change_server_life_cycle_state_input::Builder::default()
}
}
pub mod create_application_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: 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 tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateApplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateApplicationInput {
name: self.name,
description: self.description,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl CreateApplicationInput {
#[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::CreateApplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateApplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_application(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateApplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_application_input::Builder {
crate::input::create_application_input::Builder::default()
}
}
pub mod create_launch_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
pub(crate) enable_map_auto_tagging: std::option::Option<bool>,
pub(crate) map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
pub(crate) target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
pub(crate) copy_private_ip: std::option::Option<bool>,
pub(crate) associate_public_ip_address: std::option::Option<bool>,
pub(crate) copy_tags: std::option::Option<bool>,
pub(crate) licensing: std::option::Option<crate::model::Licensing>,
pub(crate) boot_mode: std::option::Option<crate::model::BootMode>,
pub(crate) small_volume_max_size: std::option::Option<i64>,
pub(crate) small_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
pub(crate) large_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
}
impl Builder {
pub fn post_launch_actions(mut self, input: crate::model::PostLaunchActions) -> Self {
self.post_launch_actions = Some(input);
self
}
pub fn set_post_launch_actions(
mut self,
input: std::option::Option<crate::model::PostLaunchActions>,
) -> Self {
self.post_launch_actions = input;
self
}
pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
self.enable_map_auto_tagging = Some(input);
self
}
pub fn set_enable_map_auto_tagging(mut self, input: std::option::Option<bool>) -> Self {
self.enable_map_auto_tagging = input;
self
}
pub fn map_auto_tagging_mpe_id(mut self, input: impl Into<std::string::String>) -> Self {
self.map_auto_tagging_mpe_id = Some(input.into());
self
}
pub fn set_map_auto_tagging_mpe_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.map_auto_tagging_mpe_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 launch_disposition(mut self, input: crate::model::LaunchDisposition) -> Self {
self.launch_disposition = Some(input);
self
}
pub fn set_launch_disposition(
mut self,
input: std::option::Option<crate::model::LaunchDisposition>,
) -> Self {
self.launch_disposition = input;
self
}
pub fn target_instance_type_right_sizing_method(
mut self,
input: crate::model::TargetInstanceTypeRightSizingMethod,
) -> Self {
self.target_instance_type_right_sizing_method = Some(input);
self
}
pub fn set_target_instance_type_right_sizing_method(
mut self,
input: std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
) -> Self {
self.target_instance_type_right_sizing_method = input;
self
}
pub fn copy_private_ip(mut self, input: bool) -> Self {
self.copy_private_ip = Some(input);
self
}
pub fn set_copy_private_ip(mut self, input: std::option::Option<bool>) -> Self {
self.copy_private_ip = input;
self
}
pub fn associate_public_ip_address(mut self, input: bool) -> Self {
self.associate_public_ip_address = Some(input);
self
}
pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
self.associate_public_ip_address = input;
self
}
pub fn copy_tags(mut self, input: bool) -> Self {
self.copy_tags = Some(input);
self
}
pub fn set_copy_tags(mut self, input: std::option::Option<bool>) -> Self {
self.copy_tags = input;
self
}
pub fn licensing(mut self, input: crate::model::Licensing) -> Self {
self.licensing = Some(input);
self
}
pub fn set_licensing(
mut self,
input: std::option::Option<crate::model::Licensing>,
) -> Self {
self.licensing = input;
self
}
pub fn boot_mode(mut self, input: crate::model::BootMode) -> Self {
self.boot_mode = Some(input);
self
}
pub fn set_boot_mode(mut self, input: std::option::Option<crate::model::BootMode>) -> Self {
self.boot_mode = input;
self
}
pub fn small_volume_max_size(mut self, input: i64) -> Self {
self.small_volume_max_size = Some(input);
self
}
pub fn set_small_volume_max_size(mut self, input: std::option::Option<i64>) -> Self {
self.small_volume_max_size = input;
self
}
pub fn small_volume_conf(mut self, input: crate::model::LaunchTemplateDiskConf) -> Self {
self.small_volume_conf = Some(input);
self
}
pub fn set_small_volume_conf(
mut self,
input: std::option::Option<crate::model::LaunchTemplateDiskConf>,
) -> Self {
self.small_volume_conf = input;
self
}
pub fn large_volume_conf(mut self, input: crate::model::LaunchTemplateDiskConf) -> Self {
self.large_volume_conf = Some(input);
self
}
pub fn set_large_volume_conf(
mut self,
input: std::option::Option<crate::model::LaunchTemplateDiskConf>,
) -> Self {
self.large_volume_conf = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateLaunchConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateLaunchConfigurationTemplateInput {
post_launch_actions: self.post_launch_actions,
enable_map_auto_tagging: self.enable_map_auto_tagging,
map_auto_tagging_mpe_id: self.map_auto_tagging_mpe_id,
tags: self.tags,
launch_disposition: self.launch_disposition,
target_instance_type_right_sizing_method: self
.target_instance_type_right_sizing_method,
copy_private_ip: self.copy_private_ip,
associate_public_ip_address: self.associate_public_ip_address,
copy_tags: self.copy_tags,
licensing: self.licensing,
boot_mode: self.boot_mode,
small_volume_max_size: self.small_volume_max_size.unwrap_or_default(),
small_volume_conf: self.small_volume_conf,
large_volume_conf: self.large_volume_conf,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("post_launch_actions", &self.post_launch_actions);
formatter.field("enable_map_auto_tagging", &self.enable_map_auto_tagging);
formatter.field("map_auto_tagging_mpe_id", &self.map_auto_tagging_mpe_id);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.field("launch_disposition", &self.launch_disposition);
formatter.field(
"target_instance_type_right_sizing_method",
&self.target_instance_type_right_sizing_method,
);
formatter.field("copy_private_ip", &self.copy_private_ip);
formatter.field(
"associate_public_ip_address",
&self.associate_public_ip_address,
);
formatter.field("copy_tags", &self.copy_tags);
formatter.field("licensing", &self.licensing);
formatter.field("boot_mode", &self.boot_mode);
formatter.field("small_volume_max_size", &self.small_volume_max_size);
formatter.field("small_volume_conf", &self.small_volume_conf);
formatter.field("large_volume_conf", &self.large_volume_conf);
formatter.finish()
}
}
}
impl CreateLaunchConfigurationTemplateInput {
#[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::CreateLaunchConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateLaunchConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateLaunchConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateLaunchConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_launch_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateLaunchConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLaunchConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_launch_configuration_template_input::Builder {
crate::input::create_launch_configuration_template_input::Builder::default()
}
}
pub mod create_replication_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) staging_area_subnet_id: std::option::Option<std::string::String>,
pub(crate) associate_default_security_group: std::option::Option<bool>,
pub(crate) replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) replication_server_instance_type: std::option::Option<std::string::String>,
pub(crate) use_dedicated_replication_server: std::option::Option<bool>,
pub(crate) default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
pub(crate) ebs_encryption:
std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
pub(crate) ebs_encryption_key_arn: std::option::Option<std::string::String>,
pub(crate) bandwidth_throttling: std::option::Option<i64>,
pub(crate) data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
pub(crate) create_public_ip: std::option::Option<bool>,
pub(crate) staging_area_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn staging_area_subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.staging_area_subnet_id = Some(input.into());
self
}
pub fn set_staging_area_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.staging_area_subnet_id = input;
self
}
pub fn associate_default_security_group(mut self, input: bool) -> Self {
self.associate_default_security_group = Some(input);
self
}
pub fn set_associate_default_security_group(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.associate_default_security_group = input;
self
}
pub fn replication_servers_security_groups_i_ds(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self
.replication_servers_security_groups_i_ds
.unwrap_or_default();
v.push(input.into());
self.replication_servers_security_groups_i_ds = Some(v);
self
}
pub fn set_replication_servers_security_groups_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.replication_servers_security_groups_i_ds = input;
self
}
pub fn replication_server_instance_type(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.replication_server_instance_type = Some(input.into());
self
}
pub fn set_replication_server_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replication_server_instance_type = input;
self
}
pub fn use_dedicated_replication_server(mut self, input: bool) -> Self {
self.use_dedicated_replication_server = Some(input);
self
}
pub fn set_use_dedicated_replication_server(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.use_dedicated_replication_server = input;
self
}
pub fn default_large_staging_disk_type(
mut self,
input: crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
) -> Self {
self.default_large_staging_disk_type = Some(input);
self
}
pub fn set_default_large_staging_disk_type(
mut self,
input: std::option::Option<
crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
>,
) -> Self {
self.default_large_staging_disk_type = input;
self
}
pub fn ebs_encryption(
mut self,
input: crate::model::ReplicationConfigurationEbsEncryption,
) -> Self {
self.ebs_encryption = Some(input);
self
}
pub fn set_ebs_encryption(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
) -> Self {
self.ebs_encryption = input;
self
}
pub fn ebs_encryption_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.ebs_encryption_key_arn = Some(input.into());
self
}
pub fn set_ebs_encryption_key_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.ebs_encryption_key_arn = input;
self
}
pub fn bandwidth_throttling(mut self, input: i64) -> Self {
self.bandwidth_throttling = Some(input);
self
}
pub fn set_bandwidth_throttling(mut self, input: std::option::Option<i64>) -> Self {
self.bandwidth_throttling = input;
self
}
pub fn data_plane_routing(
mut self,
input: crate::model::ReplicationConfigurationDataPlaneRouting,
) -> Self {
self.data_plane_routing = Some(input);
self
}
pub fn set_data_plane_routing(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
) -> Self {
self.data_plane_routing = input;
self
}
pub fn create_public_ip(mut self, input: bool) -> Self {
self.create_public_ip = Some(input);
self
}
pub fn set_create_public_ip(mut self, input: std::option::Option<bool>) -> Self {
self.create_public_ip = input;
self
}
pub fn staging_area_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.staging_area_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.staging_area_tags = Some(hash_map);
self
}
pub fn set_staging_area_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.staging_area_tags = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateReplicationConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateReplicationConfigurationTemplateInput {
staging_area_subnet_id: self.staging_area_subnet_id,
associate_default_security_group: self.associate_default_security_group,
replication_servers_security_groups_i_ds: self
.replication_servers_security_groups_i_ds,
replication_server_instance_type: self.replication_server_instance_type,
use_dedicated_replication_server: self.use_dedicated_replication_server,
default_large_staging_disk_type: self.default_large_staging_disk_type,
ebs_encryption: self.ebs_encryption,
ebs_encryption_key_arn: self.ebs_encryption_key_arn,
bandwidth_throttling: self.bandwidth_throttling.unwrap_or_default(),
data_plane_routing: self.data_plane_routing,
create_public_ip: self.create_public_ip,
staging_area_tags: self.staging_area_tags,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl CreateReplicationConfigurationTemplateInput {
#[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::CreateReplicationConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateReplicationConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateReplicationConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateReplicationConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_replication_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateReplicationConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateReplicationConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_replication_configuration_template_input::Builder {
crate::input::create_replication_configuration_template_input::Builder::default()
}
}
pub mod create_wave_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: 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 tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateWaveInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateWaveInput {
name: self.name,
description: self.description,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl CreateWaveInput {
#[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::CreateWave,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateWaveInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateWave").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateWaveInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_wave(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateWave::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateWave",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_wave_input::Builder {
crate::input::create_wave_input::Builder::default()
}
}
pub mod delete_application_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteApplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteApplicationInput {
application_id: self.application_id,
})
}
}
}
impl DeleteApplicationInput {
#[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::DeleteApplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteApplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_application(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteApplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_application_input::Builder {
crate::input::delete_application_input::Builder::default()
}
}
pub mod delete_job_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteJobInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteJobInput {
job_id: self.job_id,
})
}
}
}
impl DeleteJobInput {
#[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::DeleteJob,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteJob").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteJobInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_job(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::DeleteJob::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteJob",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_job_input::Builder {
crate::input::delete_job_input::Builder::default()
}
}
pub mod delete_launch_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.launch_configuration_template_id = Some(input.into());
self
}
pub fn set_launch_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_configuration_template_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteLaunchConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteLaunchConfigurationTemplateInput {
launch_configuration_template_id: self.launch_configuration_template_id,
})
}
}
}
impl DeleteLaunchConfigurationTemplateInput {
#[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::DeleteLaunchConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteLaunchConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteLaunchConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLaunchConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_launch_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteLaunchConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLaunchConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_launch_configuration_template_input::Builder {
crate::input::delete_launch_configuration_template_input::Builder::default()
}
}
pub mod delete_replication_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) replication_configuration_template_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn replication_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.replication_configuration_template_id = Some(input.into());
self
}
pub fn set_replication_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replication_configuration_template_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteReplicationConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteReplicationConfigurationTemplateInput {
replication_configuration_template_id: self.replication_configuration_template_id,
})
}
}
}
impl DeleteReplicationConfigurationTemplateInput {
#[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::DeleteReplicationConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteReplicationConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteReplicationConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteReplicationConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_replication_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteReplicationConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteReplicationConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_replication_configuration_template_input::Builder {
crate::input::delete_replication_configuration_template_input::Builder::default()
}
}
pub mod delete_source_server_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteSourceServerInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteSourceServerInput {
source_server_id: self.source_server_id,
})
}
}
}
impl DeleteSourceServerInput {
#[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::DeleteSourceServer,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteSourceServerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteSourceServer").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteSourceServerInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_source_server(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteSourceServer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteSourceServer",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_source_server_input::Builder {
crate::input::delete_source_server_input::Builder::default()
}
}
pub mod delete_vcenter_client_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) vcenter_client_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn vcenter_client_id(mut self, input: impl Into<std::string::String>) -> Self {
self.vcenter_client_id = Some(input.into());
self
}
pub fn set_vcenter_client_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.vcenter_client_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteVcenterClientInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteVcenterClientInput {
vcenter_client_id: self.vcenter_client_id,
})
}
}
}
impl DeleteVcenterClientInput {
#[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::DeleteVcenterClient,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteVcenterClientInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteVcenterClient").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteVcenterClientInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_vcenter_client(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteVcenterClient::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteVcenterClient",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_vcenter_client_input::Builder {
crate::input::delete_vcenter_client_input::Builder::default()
}
}
pub mod delete_wave_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteWaveInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteWaveInput {
wave_id: self.wave_id,
})
}
}
}
impl DeleteWaveInput {
#[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::DeleteWave,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteWaveInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteWave").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteWaveInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_wave(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteWave::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteWave",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_wave_input::Builder {
crate::input::delete_wave_input::Builder::default()
}
}
pub mod describe_job_log_items_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeJobLogItemsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeJobLogItemsInput {
job_id: self.job_id,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeJobLogItemsInput {
#[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::DescribeJobLogItems,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeJobLogItemsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeJobLogItems").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeJobLogItemsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_job_log_items(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeJobLogItems::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeJobLogItems",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_job_log_items_input::Builder {
crate::input::describe_job_log_items_input::Builder::default()
}
}
pub mod describe_jobs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<crate::model::DescribeJobsRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: crate::model::DescribeJobsRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::DescribeJobsRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeJobsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeJobsInput {
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeJobsInput {
#[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::DescribeJobs,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeJobs").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeJobsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_jobs(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeJobs",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_jobs_input::Builder {
crate::input::describe_jobs_input::Builder::default()
}
}
pub mod describe_launch_configuration_templates_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_configuration_template_i_ds(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.launch_configuration_template_i_ds.unwrap_or_default();
v.push(input.into());
self.launch_configuration_template_i_ds = Some(v);
self
}
pub fn set_launch_configuration_template_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.launch_configuration_template_i_ds = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeLaunchConfigurationTemplatesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeLaunchConfigurationTemplatesInput {
launch_configuration_template_i_ds: self.launch_configuration_template_i_ds,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeLaunchConfigurationTemplatesInput {
#[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::DescribeLaunchConfigurationTemplates,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeLaunchConfigurationTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeLaunchConfigurationTemplates")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeLaunchConfigurationTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_launch_configuration_templates(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeLaunchConfigurationTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLaunchConfigurationTemplates",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_launch_configuration_templates_input::Builder {
crate::input::describe_launch_configuration_templates_input::Builder::default()
}
}
pub mod describe_replication_configuration_templates_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) replication_configuration_template_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn replication_configuration_template_i_ds(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self
.replication_configuration_template_i_ds
.unwrap_or_default();
v.push(input.into());
self.replication_configuration_template_i_ds = Some(v);
self
}
pub fn set_replication_configuration_template_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.replication_configuration_template_i_ds = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeReplicationConfigurationTemplatesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeReplicationConfigurationTemplatesInput {
replication_configuration_template_i_ds: self
.replication_configuration_template_i_ds,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
},
)
}
}
}
impl DescribeReplicationConfigurationTemplatesInput {
#[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::DescribeReplicationConfigurationTemplates,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeReplicationConfigurationTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeReplicationConfigurationTemplates")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeReplicationConfigurationTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_replication_configuration_templates(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeReplicationConfigurationTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeReplicationConfigurationTemplates",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_replication_configuration_templates_input::Builder {
crate::input::describe_replication_configuration_templates_input::Builder::default()
}
}
pub mod describe_source_servers_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<crate::model::DescribeSourceServersRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: crate::model::DescribeSourceServersRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::DescribeSourceServersRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeSourceServersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeSourceServersInput {
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeSourceServersInput {
#[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::DescribeSourceServers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeSourceServersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeSourceServers").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeSourceServersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_source_servers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeSourceServers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSourceServers",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_source_servers_input::Builder {
crate::input::describe_source_servers_input::Builder::default()
}
}
pub mod describe_vcenter_clients_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeVcenterClientsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeVcenterClientsInput {
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl DescribeVcenterClientsInput {
#[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::DescribeVcenterClients,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeVcenterClientsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DescribeVcenterClients").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DescribeVcenterClientsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if _input.max_results != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(_input.max_results).encode(),
);
}
if let Some(inner_1) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_1));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeVcenterClientsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeVcenterClients::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeVcenterClients",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_vcenter_clients_input::Builder {
crate::input::describe_vcenter_clients_input::Builder::default()
}
}
pub mod disassociate_applications_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_id: std::option::Option<std::string::String>,
pub(crate) application_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_id = input;
self
}
pub fn application_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.application_i_ds.unwrap_or_default();
v.push(input.into());
self.application_i_ds = Some(v);
self
}
pub fn set_application_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.application_i_ds = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateApplicationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateApplicationsInput {
wave_id: self.wave_id,
application_i_ds: self.application_i_ds,
})
}
}
}
impl DisassociateApplicationsInput {
#[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::DisassociateApplications,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateApplicationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DisassociateApplications").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateApplicationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_applications(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateApplications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateApplications",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_applications_input::Builder {
crate::input::disassociate_applications_input::Builder::default()
}
}
pub mod disassociate_source_servers_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
pub(crate) source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
pub fn source_server_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.source_server_i_ds.unwrap_or_default();
v.push(input.into());
self.source_server_i_ds = Some(v);
self
}
pub fn set_source_server_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.source_server_i_ds = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateSourceServersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateSourceServersInput {
application_id: self.application_id,
source_server_i_ds: self.source_server_i_ds,
})
}
}
}
impl DisassociateSourceServersInput {
#[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::DisassociateSourceServers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateSourceServersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DisassociateSourceServers").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateSourceServersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_source_servers(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateSourceServers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateSourceServers",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_source_servers_input::Builder {
crate::input::disassociate_source_servers_input::Builder::default()
}
}
pub mod disconnect_from_service_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisconnectFromServiceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisconnectFromServiceInput {
source_server_id: self.source_server_id,
})
}
}
}
impl DisconnectFromServiceInput {
#[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::DisconnectFromService,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisconnectFromServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DisconnectFromService").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisconnectFromServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disconnect_from_service(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisconnectFromService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisconnectFromService",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disconnect_from_service_input::Builder {
crate::input::disconnect_from_service_input::Builder::default()
}
}
pub mod finalize_cutover_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::FinalizeCutoverInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::FinalizeCutoverInput {
source_server_id: self.source_server_id,
})
}
}
}
impl FinalizeCutoverInput {
#[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::FinalizeCutover,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::FinalizeCutoverInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/FinalizeCutover").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::FinalizeCutoverInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_finalize_cutover(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::FinalizeCutover::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"FinalizeCutover",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::finalize_cutover_input::Builder {
crate::input::finalize_cutover_input::Builder::default()
}
}
pub mod get_launch_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLaunchConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLaunchConfigurationInput {
source_server_id: self.source_server_id,
})
}
}
}
impl GetLaunchConfigurationInput {
#[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::GetLaunchConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetLaunchConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetLaunchConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLaunchConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_launch_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLaunchConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLaunchConfiguration",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_launch_configuration_input::Builder {
crate::input::get_launch_configuration_input::Builder::default()
}
}
pub mod get_replication_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetReplicationConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetReplicationConfigurationInput {
source_server_id: self.source_server_id,
})
}
}
}
impl GetReplicationConfigurationInput {
#[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::GetReplicationConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetReplicationConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetReplicationConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetReplicationConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_replication_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetReplicationConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetReplicationConfiguration",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_replication_configuration_input::Builder {
crate::input::get_replication_configuration_input::Builder::default()
}
}
pub mod initialize_service_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::InitializeServiceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::InitializeServiceInput {})
}
}
}
impl InitializeServiceInput {
#[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::InitializeService,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::InitializeServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/InitializeService").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::InitializeServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::InitializeService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"InitializeService",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::initialize_service_input::Builder {
crate::input::initialize_service_input::Builder::default()
}
}
pub mod list_applications_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<crate::model::ListApplicationsRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: crate::model::ListApplicationsRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ListApplicationsRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListApplicationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListApplicationsInput {
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListApplicationsInput {
#[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::ListApplications,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListApplicationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListApplications").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListApplicationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_applications(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListApplications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListApplications",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_applications_input::Builder {
crate::input::list_applications_input::Builder::default()
}
}
pub mod list_source_server_actions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::SourceServerActionsRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn filters(mut self, input: crate::model::SourceServerActionsRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::SourceServerActionsRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListSourceServerActionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListSourceServerActionsInput {
source_server_id: self.source_server_id,
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListSourceServerActionsInput {
#[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::ListSourceServerActions,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListSourceServerActionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListSourceServerActions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListSourceServerActionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_source_server_actions(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSourceServerActions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSourceServerActions",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_source_server_actions_input::Builder {
crate::input::list_source_server_actions_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.resource_arn;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"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::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod list_template_actions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_id: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<crate::model::TemplateActionsRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.launch_configuration_template_id = Some(input.into());
self
}
pub fn set_launch_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_configuration_template_id = input;
self
}
pub fn filters(mut self, input: crate::model::TemplateActionsRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::TemplateActionsRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTemplateActionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTemplateActionsInput {
launch_configuration_template_id: self.launch_configuration_template_id,
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListTemplateActionsInput {
#[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::ListTemplateActions,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListTemplateActionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListTemplateActions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTemplateActionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_template_actions(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTemplateActions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTemplateActions",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_template_actions_input::Builder {
crate::input::list_template_actions_input::Builder::default()
}
}
pub mod list_waves_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<crate::model::ListWavesRequestFilters>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: crate::model::ListWavesRequestFilters) -> Self {
self.filters = Some(input);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::ListWavesRequestFilters>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListWavesInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListWavesInput {
filters: self.filters,
max_results: self.max_results.unwrap_or_default(),
next_token: self.next_token,
})
}
}
}
impl ListWavesInput {
#[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::ListWaves,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListWavesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListWaves").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListWavesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_waves(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::ListWaves::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListWaves",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_waves_input::Builder {
crate::input::list_waves_input::Builder::default()
}
}
pub mod mark_as_archived_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::MarkAsArchivedInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::MarkAsArchivedInput {
source_server_id: self.source_server_id,
})
}
}
}
impl MarkAsArchivedInput {
#[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::MarkAsArchived,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::MarkAsArchivedInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/MarkAsArchived").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::MarkAsArchivedInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_mark_as_archived(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::MarkAsArchived::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"MarkAsArchived",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::mark_as_archived_input::Builder {
crate::input::mark_as_archived_input::Builder::default()
}
}
pub mod put_source_server_action_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) action_name: std::option::Option<std::string::String>,
pub(crate) document_identifier: std::option::Option<std::string::String>,
pub(crate) order: std::option::Option<i32>,
pub(crate) action_id: std::option::Option<std::string::String>,
pub(crate) document_version: std::option::Option<std::string::String>,
pub(crate) active: std::option::Option<bool>,
pub(crate) timeout_seconds: std::option::Option<i32>,
pub(crate) must_succeed_for_cutover: std::option::Option<bool>,
pub(crate) parameters: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn action_name(mut self, input: impl Into<std::string::String>) -> Self {
self.action_name = Some(input.into());
self
}
pub fn set_action_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_name = input;
self
}
pub fn document_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.document_identifier = Some(input.into());
self
}
pub fn set_document_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_identifier = input;
self
}
pub fn order(mut self, input: i32) -> Self {
self.order = Some(input);
self
}
pub fn set_order(mut self, input: std::option::Option<i32>) -> Self {
self.order = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn document_version(mut self, input: impl Into<std::string::String>) -> Self {
self.document_version = Some(input.into());
self
}
pub fn set_document_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_version = input;
self
}
pub fn active(mut self, input: bool) -> Self {
self.active = Some(input);
self
}
pub fn set_active(mut self, input: std::option::Option<bool>) -> Self {
self.active = input;
self
}
pub fn timeout_seconds(mut self, input: i32) -> Self {
self.timeout_seconds = Some(input);
self
}
pub fn set_timeout_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.timeout_seconds = input;
self
}
pub fn must_succeed_for_cutover(mut self, input: bool) -> Self {
self.must_succeed_for_cutover = Some(input);
self
}
pub fn set_must_succeed_for_cutover(mut self, input: std::option::Option<bool>) -> Self {
self.must_succeed_for_cutover = input;
self
}
pub fn parameters(
mut self,
k: impl Into<std::string::String>,
v: std::vec::Vec<crate::model::SsmParameterStoreParameter>,
) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = Some(hash_map);
self
}
pub fn set_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
) -> Self {
self.parameters = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutSourceServerActionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutSourceServerActionInput {
source_server_id: self.source_server_id,
action_name: self.action_name,
document_identifier: self.document_identifier,
order: self.order.unwrap_or_default(),
action_id: self.action_id,
document_version: self.document_version,
active: self.active,
timeout_seconds: self.timeout_seconds.unwrap_or_default(),
must_succeed_for_cutover: self.must_succeed_for_cutover,
parameters: self.parameters,
})
}
}
}
impl PutSourceServerActionInput {
#[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::PutSourceServerAction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::PutSourceServerActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/PutSourceServerAction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutSourceServerActionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_source_server_action(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutSourceServerAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutSourceServerAction",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_source_server_action_input::Builder {
crate::input::put_source_server_action_input::Builder::default()
}
}
pub mod put_template_action_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_id: std::option::Option<std::string::String>,
pub(crate) action_name: std::option::Option<std::string::String>,
pub(crate) document_identifier: std::option::Option<std::string::String>,
pub(crate) order: std::option::Option<i32>,
pub(crate) action_id: std::option::Option<std::string::String>,
pub(crate) document_version: std::option::Option<std::string::String>,
pub(crate) active: std::option::Option<bool>,
pub(crate) timeout_seconds: std::option::Option<i32>,
pub(crate) must_succeed_for_cutover: std::option::Option<bool>,
pub(crate) parameters: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
pub(crate) operating_system: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.launch_configuration_template_id = Some(input.into());
self
}
pub fn set_launch_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_configuration_template_id = input;
self
}
pub fn action_name(mut self, input: impl Into<std::string::String>) -> Self {
self.action_name = Some(input.into());
self
}
pub fn set_action_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_name = input;
self
}
pub fn document_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.document_identifier = Some(input.into());
self
}
pub fn set_document_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_identifier = input;
self
}
pub fn order(mut self, input: i32) -> Self {
self.order = Some(input);
self
}
pub fn set_order(mut self, input: std::option::Option<i32>) -> Self {
self.order = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn document_version(mut self, input: impl Into<std::string::String>) -> Self {
self.document_version = Some(input.into());
self
}
pub fn set_document_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_version = input;
self
}
pub fn active(mut self, input: bool) -> Self {
self.active = Some(input);
self
}
pub fn set_active(mut self, input: std::option::Option<bool>) -> Self {
self.active = input;
self
}
pub fn timeout_seconds(mut self, input: i32) -> Self {
self.timeout_seconds = Some(input);
self
}
pub fn set_timeout_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.timeout_seconds = input;
self
}
pub fn must_succeed_for_cutover(mut self, input: bool) -> Self {
self.must_succeed_for_cutover = Some(input);
self
}
pub fn set_must_succeed_for_cutover(mut self, input: std::option::Option<bool>) -> Self {
self.must_succeed_for_cutover = input;
self
}
pub fn parameters(
mut self,
k: impl Into<std::string::String>,
v: std::vec::Vec<crate::model::SsmParameterStoreParameter>,
) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = Some(hash_map);
self
}
pub fn set_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
) -> Self {
self.parameters = input;
self
}
pub fn operating_system(mut self, input: impl Into<std::string::String>) -> Self {
self.operating_system = Some(input.into());
self
}
pub fn set_operating_system(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.operating_system = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutTemplateActionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutTemplateActionInput {
launch_configuration_template_id: self.launch_configuration_template_id,
action_name: self.action_name,
document_identifier: self.document_identifier,
order: self.order.unwrap_or_default(),
action_id: self.action_id,
document_version: self.document_version,
active: self.active,
timeout_seconds: self.timeout_seconds.unwrap_or_default(),
must_succeed_for_cutover: self.must_succeed_for_cutover,
parameters: self.parameters,
operating_system: self.operating_system,
})
}
}
}
impl PutTemplateActionInput {
#[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::PutTemplateAction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::PutTemplateActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/PutTemplateAction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutTemplateActionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_template_action(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutTemplateAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutTemplateAction",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_template_action_input::Builder {
crate::input::put_template_action_input::Builder::default()
}
}
pub mod remove_source_server_action_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RemoveSourceServerActionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RemoveSourceServerActionInput {
source_server_id: self.source_server_id,
action_id: self.action_id,
})
}
}
}
impl RemoveSourceServerActionInput {
#[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::RemoveSourceServerAction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::RemoveSourceServerActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RemoveSourceServerAction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RemoveSourceServerActionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_remove_source_server_action(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RemoveSourceServerAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RemoveSourceServerAction",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::remove_source_server_action_input::Builder {
crate::input::remove_source_server_action_input::Builder::default()
}
}
pub mod remove_template_action_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_id: std::option::Option<std::string::String>,
pub(crate) action_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.launch_configuration_template_id = Some(input.into());
self
}
pub fn set_launch_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_configuration_template_id = input;
self
}
pub fn action_id(mut self, input: impl Into<std::string::String>) -> Self {
self.action_id = Some(input.into());
self
}
pub fn set_action_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.action_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RemoveTemplateActionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RemoveTemplateActionInput {
launch_configuration_template_id: self.launch_configuration_template_id,
action_id: self.action_id,
})
}
}
}
impl RemoveTemplateActionInput {
#[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::RemoveTemplateAction,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::RemoveTemplateActionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RemoveTemplateAction").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RemoveTemplateActionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_remove_template_action(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RemoveTemplateAction::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RemoveTemplateAction",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::remove_template_action_input::Builder {
crate::input::remove_template_action_input::Builder::default()
}
}
pub mod retry_data_replication_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RetryDataReplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RetryDataReplicationInput {
source_server_id: self.source_server_id,
})
}
}
}
impl RetryDataReplicationInput {
#[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::RetryDataReplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::RetryDataReplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/RetryDataReplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RetryDataReplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_retry_data_replication(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RetryDataReplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RetryDataReplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::retry_data_replication_input::Builder {
crate::input::retry_data_replication_input::Builder::default()
}
}
pub mod start_cutover_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn source_server_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.source_server_i_ds.unwrap_or_default();
v.push(input.into());
self.source_server_i_ds = Some(v);
self
}
pub fn set_source_server_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.source_server_i_ds = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::StartCutoverInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::StartCutoverInput {
source_server_i_ds: self.source_server_i_ds,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl StartCutoverInput {
#[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::StartCutover,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartCutoverInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/StartCutover").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartCutoverInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_cutover(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartCutover::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartCutover",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_cutover_input::Builder {
crate::input::start_cutover_input::Builder::default()
}
}
pub mod start_replication_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartReplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartReplicationInput {
source_server_id: self.source_server_id,
})
}
}
}
impl StartReplicationInput {
#[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::StartReplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartReplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/StartReplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartReplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_replication(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartReplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartReplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_replication_input::Builder {
crate::input::start_replication_input::Builder::default()
}
}
pub mod start_test_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn source_server_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.source_server_i_ds.unwrap_or_default();
v.push(input.into());
self.source_server_i_ds = Some(v);
self
}
pub fn set_source_server_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.source_server_i_ds = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::StartTestInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::StartTestInput {
source_server_i_ds: self.source_server_i_ds,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl StartTestInput {
#[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::StartTest,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartTestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/StartTest").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartTestInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_test(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::StartTest::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartTest",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_test_input::Builder {
crate::input::start_test_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
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,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.resource_arn;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"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::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod terminate_target_instances_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn source_server_i_ds(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.source_server_i_ds.unwrap_or_default();
v.push(input.into());
self.source_server_i_ds = Some(v);
self
}
pub fn set_source_server_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.source_server_i_ds = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::TerminateTargetInstancesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::TerminateTargetInstancesInput {
source_server_i_ds: self.source_server_i_ds,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl TerminateTargetInstancesInput {
#[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::TerminateTargetInstances,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TerminateTargetInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/TerminateTargetInstances").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TerminateTargetInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_terminate_target_instances(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TerminateTargetInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TerminateTargetInstances",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::terminate_target_instances_input::Builder {
crate::input::terminate_target_instances_input::Builder::default()
}
}
pub mod unarchive_application_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UnarchiveApplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UnarchiveApplicationInput {
application_id: self.application_id,
})
}
}
}
impl UnarchiveApplicationInput {
#[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::UnarchiveApplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UnarchiveApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UnarchiveApplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UnarchiveApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_unarchive_application(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UnarchiveApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UnarchiveApplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::unarchive_application_input::Builder {
crate::input::unarchive_application_input::Builder::default()
}
}
pub mod unarchive_wave_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UnarchiveWaveInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UnarchiveWaveInput {
wave_id: self.wave_id,
})
}
}
}
impl UnarchiveWaveInput {
#[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::UnarchiveWave,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UnarchiveWaveInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UnarchiveWave").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UnarchiveWaveInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_unarchive_wave(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UnarchiveWave::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UnarchiveWave",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::unarchive_wave_input::Builder {
crate::input::unarchive_wave_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.resource_arn;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"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::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_5 = &_input.tag_keys;
let inner_5 = inner_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"tag_keys",
"cannot be empty or unset",
)
})?;
for inner_6 in inner_5 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_6));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_application_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_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>,
}
impl Builder {
pub fn application_id(mut self, input: impl Into<std::string::String>) -> Self {
self.application_id = Some(input.into());
self
}
pub fn set_application_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_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 build(
self,
) -> Result<
crate::input::UpdateApplicationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateApplicationInput {
application_id: self.application_id,
name: self.name,
description: self.description,
})
}
}
}
impl UpdateApplicationInput {
#[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::UpdateApplication,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateApplication").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_application(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateApplication",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_application_input::Builder {
crate::input::update_application_input::Builder::default()
}
}
pub mod update_launch_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
pub(crate) target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
pub(crate) copy_private_ip: std::option::Option<bool>,
pub(crate) copy_tags: std::option::Option<bool>,
pub(crate) licensing: std::option::Option<crate::model::Licensing>,
pub(crate) boot_mode: std::option::Option<crate::model::BootMode>,
pub(crate) post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
pub(crate) enable_map_auto_tagging: std::option::Option<bool>,
pub(crate) map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_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 launch_disposition(mut self, input: crate::model::LaunchDisposition) -> Self {
self.launch_disposition = Some(input);
self
}
pub fn set_launch_disposition(
mut self,
input: std::option::Option<crate::model::LaunchDisposition>,
) -> Self {
self.launch_disposition = input;
self
}
pub fn target_instance_type_right_sizing_method(
mut self,
input: crate::model::TargetInstanceTypeRightSizingMethod,
) -> Self {
self.target_instance_type_right_sizing_method = Some(input);
self
}
pub fn set_target_instance_type_right_sizing_method(
mut self,
input: std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
) -> Self {
self.target_instance_type_right_sizing_method = input;
self
}
pub fn copy_private_ip(mut self, input: bool) -> Self {
self.copy_private_ip = Some(input);
self
}
pub fn set_copy_private_ip(mut self, input: std::option::Option<bool>) -> Self {
self.copy_private_ip = input;
self
}
pub fn copy_tags(mut self, input: bool) -> Self {
self.copy_tags = Some(input);
self
}
pub fn set_copy_tags(mut self, input: std::option::Option<bool>) -> Self {
self.copy_tags = input;
self
}
pub fn licensing(mut self, input: crate::model::Licensing) -> Self {
self.licensing = Some(input);
self
}
pub fn set_licensing(
mut self,
input: std::option::Option<crate::model::Licensing>,
) -> Self {
self.licensing = input;
self
}
pub fn boot_mode(mut self, input: crate::model::BootMode) -> Self {
self.boot_mode = Some(input);
self
}
pub fn set_boot_mode(mut self, input: std::option::Option<crate::model::BootMode>) -> Self {
self.boot_mode = input;
self
}
pub fn post_launch_actions(mut self, input: crate::model::PostLaunchActions) -> Self {
self.post_launch_actions = Some(input);
self
}
pub fn set_post_launch_actions(
mut self,
input: std::option::Option<crate::model::PostLaunchActions>,
) -> Self {
self.post_launch_actions = input;
self
}
pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
self.enable_map_auto_tagging = Some(input);
self
}
pub fn set_enable_map_auto_tagging(mut self, input: std::option::Option<bool>) -> Self {
self.enable_map_auto_tagging = input;
self
}
pub fn map_auto_tagging_mpe_id(mut self, input: impl Into<std::string::String>) -> Self {
self.map_auto_tagging_mpe_id = Some(input.into());
self
}
pub fn set_map_auto_tagging_mpe_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.map_auto_tagging_mpe_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLaunchConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLaunchConfigurationInput {
source_server_id: self.source_server_id,
name: self.name,
launch_disposition: self.launch_disposition,
target_instance_type_right_sizing_method: self
.target_instance_type_right_sizing_method,
copy_private_ip: self.copy_private_ip,
copy_tags: self.copy_tags,
licensing: self.licensing,
boot_mode: self.boot_mode,
post_launch_actions: self.post_launch_actions,
enable_map_auto_tagging: self.enable_map_auto_tagging,
map_auto_tagging_mpe_id: self.map_auto_tagging_mpe_id,
})
}
}
}
impl UpdateLaunchConfigurationInput {
#[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::UpdateLaunchConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLaunchConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateLaunchConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLaunchConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_launch_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateLaunchConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLaunchConfiguration",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_launch_configuration_input::Builder {
crate::input::update_launch_configuration_input::Builder::default()
}
}
pub mod update_launch_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_configuration_template_id: std::option::Option<std::string::String>,
pub(crate) post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
pub(crate) enable_map_auto_tagging: std::option::Option<bool>,
pub(crate) map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
pub(crate) launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
pub(crate) target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
pub(crate) copy_private_ip: std::option::Option<bool>,
pub(crate) associate_public_ip_address: std::option::Option<bool>,
pub(crate) copy_tags: std::option::Option<bool>,
pub(crate) licensing: std::option::Option<crate::model::Licensing>,
pub(crate) boot_mode: std::option::Option<crate::model::BootMode>,
pub(crate) small_volume_max_size: std::option::Option<i64>,
pub(crate) small_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
pub(crate) large_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
}
impl Builder {
pub fn launch_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.launch_configuration_template_id = Some(input.into());
self
}
pub fn set_launch_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_configuration_template_id = input;
self
}
pub fn post_launch_actions(mut self, input: crate::model::PostLaunchActions) -> Self {
self.post_launch_actions = Some(input);
self
}
pub fn set_post_launch_actions(
mut self,
input: std::option::Option<crate::model::PostLaunchActions>,
) -> Self {
self.post_launch_actions = input;
self
}
pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
self.enable_map_auto_tagging = Some(input);
self
}
pub fn set_enable_map_auto_tagging(mut self, input: std::option::Option<bool>) -> Self {
self.enable_map_auto_tagging = input;
self
}
pub fn map_auto_tagging_mpe_id(mut self, input: impl Into<std::string::String>) -> Self {
self.map_auto_tagging_mpe_id = Some(input.into());
self
}
pub fn set_map_auto_tagging_mpe_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.map_auto_tagging_mpe_id = input;
self
}
pub fn launch_disposition(mut self, input: crate::model::LaunchDisposition) -> Self {
self.launch_disposition = Some(input);
self
}
pub fn set_launch_disposition(
mut self,
input: std::option::Option<crate::model::LaunchDisposition>,
) -> Self {
self.launch_disposition = input;
self
}
pub fn target_instance_type_right_sizing_method(
mut self,
input: crate::model::TargetInstanceTypeRightSizingMethod,
) -> Self {
self.target_instance_type_right_sizing_method = Some(input);
self
}
pub fn set_target_instance_type_right_sizing_method(
mut self,
input: std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
) -> Self {
self.target_instance_type_right_sizing_method = input;
self
}
pub fn copy_private_ip(mut self, input: bool) -> Self {
self.copy_private_ip = Some(input);
self
}
pub fn set_copy_private_ip(mut self, input: std::option::Option<bool>) -> Self {
self.copy_private_ip = input;
self
}
pub fn associate_public_ip_address(mut self, input: bool) -> Self {
self.associate_public_ip_address = Some(input);
self
}
pub fn set_associate_public_ip_address(mut self, input: std::option::Option<bool>) -> Self {
self.associate_public_ip_address = input;
self
}
pub fn copy_tags(mut self, input: bool) -> Self {
self.copy_tags = Some(input);
self
}
pub fn set_copy_tags(mut self, input: std::option::Option<bool>) -> Self {
self.copy_tags = input;
self
}
pub fn licensing(mut self, input: crate::model::Licensing) -> Self {
self.licensing = Some(input);
self
}
pub fn set_licensing(
mut self,
input: std::option::Option<crate::model::Licensing>,
) -> Self {
self.licensing = input;
self
}
pub fn boot_mode(mut self, input: crate::model::BootMode) -> Self {
self.boot_mode = Some(input);
self
}
pub fn set_boot_mode(mut self, input: std::option::Option<crate::model::BootMode>) -> Self {
self.boot_mode = input;
self
}
pub fn small_volume_max_size(mut self, input: i64) -> Self {
self.small_volume_max_size = Some(input);
self
}
pub fn set_small_volume_max_size(mut self, input: std::option::Option<i64>) -> Self {
self.small_volume_max_size = input;
self
}
pub fn small_volume_conf(mut self, input: crate::model::LaunchTemplateDiskConf) -> Self {
self.small_volume_conf = Some(input);
self
}
pub fn set_small_volume_conf(
mut self,
input: std::option::Option<crate::model::LaunchTemplateDiskConf>,
) -> Self {
self.small_volume_conf = input;
self
}
pub fn large_volume_conf(mut self, input: crate::model::LaunchTemplateDiskConf) -> Self {
self.large_volume_conf = Some(input);
self
}
pub fn set_large_volume_conf(
mut self,
input: std::option::Option<crate::model::LaunchTemplateDiskConf>,
) -> Self {
self.large_volume_conf = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLaunchConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLaunchConfigurationTemplateInput {
launch_configuration_template_id: self.launch_configuration_template_id,
post_launch_actions: self.post_launch_actions,
enable_map_auto_tagging: self.enable_map_auto_tagging,
map_auto_tagging_mpe_id: self.map_auto_tagging_mpe_id,
launch_disposition: self.launch_disposition,
target_instance_type_right_sizing_method: self
.target_instance_type_right_sizing_method,
copy_private_ip: self.copy_private_ip,
associate_public_ip_address: self.associate_public_ip_address,
copy_tags: self.copy_tags,
licensing: self.licensing,
boot_mode: self.boot_mode,
small_volume_max_size: self.small_volume_max_size.unwrap_or_default(),
small_volume_conf: self.small_volume_conf,
large_volume_conf: self.large_volume_conf,
})
}
}
}
impl UpdateLaunchConfigurationTemplateInput {
#[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::UpdateLaunchConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLaunchConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateLaunchConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLaunchConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_launch_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateLaunchConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLaunchConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_launch_configuration_template_input::Builder {
crate::input::update_launch_configuration_template_input::Builder::default()
}
}
pub mod update_replication_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) staging_area_subnet_id: std::option::Option<std::string::String>,
pub(crate) associate_default_security_group: std::option::Option<bool>,
pub(crate) replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) replication_server_instance_type: std::option::Option<std::string::String>,
pub(crate) use_dedicated_replication_server: std::option::Option<bool>,
pub(crate) default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
pub(crate) replicated_disks: std::option::Option<
std::vec::Vec<crate::model::ReplicationConfigurationReplicatedDisk>,
>,
pub(crate) ebs_encryption:
std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
pub(crate) ebs_encryption_key_arn: std::option::Option<std::string::String>,
pub(crate) bandwidth_throttling: std::option::Option<i64>,
pub(crate) data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
pub(crate) create_public_ip: std::option::Option<bool>,
pub(crate) staging_area_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_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 staging_area_subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.staging_area_subnet_id = Some(input.into());
self
}
pub fn set_staging_area_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.staging_area_subnet_id = input;
self
}
pub fn associate_default_security_group(mut self, input: bool) -> Self {
self.associate_default_security_group = Some(input);
self
}
pub fn set_associate_default_security_group(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.associate_default_security_group = input;
self
}
pub fn replication_servers_security_groups_i_ds(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self
.replication_servers_security_groups_i_ds
.unwrap_or_default();
v.push(input.into());
self.replication_servers_security_groups_i_ds = Some(v);
self
}
pub fn set_replication_servers_security_groups_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.replication_servers_security_groups_i_ds = input;
self
}
pub fn replication_server_instance_type(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.replication_server_instance_type = Some(input.into());
self
}
pub fn set_replication_server_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replication_server_instance_type = input;
self
}
pub fn use_dedicated_replication_server(mut self, input: bool) -> Self {
self.use_dedicated_replication_server = Some(input);
self
}
pub fn set_use_dedicated_replication_server(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.use_dedicated_replication_server = input;
self
}
pub fn default_large_staging_disk_type(
mut self,
input: crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
) -> Self {
self.default_large_staging_disk_type = Some(input);
self
}
pub fn set_default_large_staging_disk_type(
mut self,
input: std::option::Option<
crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
>,
) -> Self {
self.default_large_staging_disk_type = input;
self
}
pub fn replicated_disks(
mut self,
input: crate::model::ReplicationConfigurationReplicatedDisk,
) -> Self {
let mut v = self.replicated_disks.unwrap_or_default();
v.push(input);
self.replicated_disks = Some(v);
self
}
pub fn set_replicated_disks(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::ReplicationConfigurationReplicatedDisk>,
>,
) -> Self {
self.replicated_disks = input;
self
}
pub fn ebs_encryption(
mut self,
input: crate::model::ReplicationConfigurationEbsEncryption,
) -> Self {
self.ebs_encryption = Some(input);
self
}
pub fn set_ebs_encryption(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
) -> Self {
self.ebs_encryption = input;
self
}
pub fn ebs_encryption_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.ebs_encryption_key_arn = Some(input.into());
self
}
pub fn set_ebs_encryption_key_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.ebs_encryption_key_arn = input;
self
}
pub fn bandwidth_throttling(mut self, input: i64) -> Self {
self.bandwidth_throttling = Some(input);
self
}
pub fn set_bandwidth_throttling(mut self, input: std::option::Option<i64>) -> Self {
self.bandwidth_throttling = input;
self
}
pub fn data_plane_routing(
mut self,
input: crate::model::ReplicationConfigurationDataPlaneRouting,
) -> Self {
self.data_plane_routing = Some(input);
self
}
pub fn set_data_plane_routing(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
) -> Self {
self.data_plane_routing = input;
self
}
pub fn create_public_ip(mut self, input: bool) -> Self {
self.create_public_ip = Some(input);
self
}
pub fn set_create_public_ip(mut self, input: std::option::Option<bool>) -> Self {
self.create_public_ip = input;
self
}
pub fn staging_area_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.staging_area_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.staging_area_tags = Some(hash_map);
self
}
pub fn set_staging_area_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.staging_area_tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateReplicationConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateReplicationConfigurationInput {
source_server_id: self.source_server_id,
name: self.name,
staging_area_subnet_id: self.staging_area_subnet_id,
associate_default_security_group: self.associate_default_security_group,
replication_servers_security_groups_i_ds: self
.replication_servers_security_groups_i_ds,
replication_server_instance_type: self.replication_server_instance_type,
use_dedicated_replication_server: self.use_dedicated_replication_server,
default_large_staging_disk_type: self.default_large_staging_disk_type,
replicated_disks: self.replicated_disks,
ebs_encryption: self.ebs_encryption,
ebs_encryption_key_arn: self.ebs_encryption_key_arn,
bandwidth_throttling: self.bandwidth_throttling.unwrap_or_default(),
data_plane_routing: self.data_plane_routing,
create_public_ip: self.create_public_ip,
staging_area_tags: self.staging_area_tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("source_server_id", &self.source_server_id);
formatter.field("name", &self.name);
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("replicated_disks", &self.replicated_disks);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateReplicationConfigurationInput {
#[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::UpdateReplicationConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateReplicationConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateReplicationConfiguration")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateReplicationConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_replication_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateReplicationConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateReplicationConfiguration",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_replication_configuration_input::Builder {
crate::input::update_replication_configuration_input::Builder::default()
}
}
pub mod update_replication_configuration_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) replication_configuration_template_id: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) staging_area_subnet_id: std::option::Option<std::string::String>,
pub(crate) associate_default_security_group: std::option::Option<bool>,
pub(crate) replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) replication_server_instance_type: std::option::Option<std::string::String>,
pub(crate) use_dedicated_replication_server: std::option::Option<bool>,
pub(crate) default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
pub(crate) ebs_encryption:
std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
pub(crate) ebs_encryption_key_arn: std::option::Option<std::string::String>,
pub(crate) bandwidth_throttling: std::option::Option<i64>,
pub(crate) data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
pub(crate) create_public_ip: std::option::Option<bool>,
pub(crate) staging_area_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn replication_configuration_template_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.replication_configuration_template_id = Some(input.into());
self
}
pub fn set_replication_configuration_template_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replication_configuration_template_id = input;
self
}
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn staging_area_subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.staging_area_subnet_id = Some(input.into());
self
}
pub fn set_staging_area_subnet_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.staging_area_subnet_id = input;
self
}
pub fn associate_default_security_group(mut self, input: bool) -> Self {
self.associate_default_security_group = Some(input);
self
}
pub fn set_associate_default_security_group(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.associate_default_security_group = input;
self
}
pub fn replication_servers_security_groups_i_ds(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self
.replication_servers_security_groups_i_ds
.unwrap_or_default();
v.push(input.into());
self.replication_servers_security_groups_i_ds = Some(v);
self
}
pub fn set_replication_servers_security_groups_i_ds(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.replication_servers_security_groups_i_ds = input;
self
}
pub fn replication_server_instance_type(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.replication_server_instance_type = Some(input.into());
self
}
pub fn set_replication_server_instance_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.replication_server_instance_type = input;
self
}
pub fn use_dedicated_replication_server(mut self, input: bool) -> Self {
self.use_dedicated_replication_server = Some(input);
self
}
pub fn set_use_dedicated_replication_server(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.use_dedicated_replication_server = input;
self
}
pub fn default_large_staging_disk_type(
mut self,
input: crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
) -> Self {
self.default_large_staging_disk_type = Some(input);
self
}
pub fn set_default_large_staging_disk_type(
mut self,
input: std::option::Option<
crate::model::ReplicationConfigurationDefaultLargeStagingDiskType,
>,
) -> Self {
self.default_large_staging_disk_type = input;
self
}
pub fn ebs_encryption(
mut self,
input: crate::model::ReplicationConfigurationEbsEncryption,
) -> Self {
self.ebs_encryption = Some(input);
self
}
pub fn set_ebs_encryption(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
) -> Self {
self.ebs_encryption = input;
self
}
pub fn ebs_encryption_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.ebs_encryption_key_arn = Some(input.into());
self
}
pub fn set_ebs_encryption_key_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.ebs_encryption_key_arn = input;
self
}
pub fn bandwidth_throttling(mut self, input: i64) -> Self {
self.bandwidth_throttling = Some(input);
self
}
pub fn set_bandwidth_throttling(mut self, input: std::option::Option<i64>) -> Self {
self.bandwidth_throttling = input;
self
}
pub fn data_plane_routing(
mut self,
input: crate::model::ReplicationConfigurationDataPlaneRouting,
) -> Self {
self.data_plane_routing = Some(input);
self
}
pub fn set_data_plane_routing(
mut self,
input: std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
) -> Self {
self.data_plane_routing = input;
self
}
pub fn create_public_ip(mut self, input: bool) -> Self {
self.create_public_ip = Some(input);
self
}
pub fn set_create_public_ip(mut self, input: std::option::Option<bool>) -> Self {
self.create_public_ip = input;
self
}
pub fn staging_area_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.staging_area_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.staging_area_tags = Some(hash_map);
self
}
pub fn set_staging_area_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.staging_area_tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateReplicationConfigurationTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateReplicationConfigurationTemplateInput {
replication_configuration_template_id: self.replication_configuration_template_id,
arn: self.arn,
staging_area_subnet_id: self.staging_area_subnet_id,
associate_default_security_group: self.associate_default_security_group,
replication_servers_security_groups_i_ds: self
.replication_servers_security_groups_i_ds,
replication_server_instance_type: self.replication_server_instance_type,
use_dedicated_replication_server: self.use_dedicated_replication_server,
default_large_staging_disk_type: self.default_large_staging_disk_type,
ebs_encryption: self.ebs_encryption,
ebs_encryption_key_arn: self.ebs_encryption_key_arn,
bandwidth_throttling: self.bandwidth_throttling.unwrap_or_default(),
data_plane_routing: self.data_plane_routing,
create_public_ip: self.create_public_ip,
staging_area_tags: self.staging_area_tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field(
"replication_configuration_template_id",
&self.replication_configuration_template_id,
);
formatter.field("arn", &self.arn);
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateReplicationConfigurationTemplateInput {
#[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::UpdateReplicationConfigurationTemplate,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateReplicationConfigurationTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateReplicationConfigurationTemplate")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateReplicationConfigurationTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_replication_configuration_template(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateReplicationConfigurationTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateReplicationConfigurationTemplate",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_replication_configuration_template_input::Builder {
crate::input::update_replication_configuration_template_input::Builder::default()
}
}
pub mod update_source_server_replication_type_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) source_server_id: std::option::Option<std::string::String>,
pub(crate) replication_type: std::option::Option<crate::model::ReplicationType>,
}
impl Builder {
pub fn source_server_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_server_id = Some(input.into());
self
}
pub fn set_source_server_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_server_id = input;
self
}
pub fn replication_type(mut self, input: crate::model::ReplicationType) -> Self {
self.replication_type = Some(input);
self
}
pub fn set_replication_type(
mut self,
input: std::option::Option<crate::model::ReplicationType>,
) -> Self {
self.replication_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateSourceServerReplicationTypeInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateSourceServerReplicationTypeInput {
source_server_id: self.source_server_id,
replication_type: self.replication_type,
})
}
}
}
impl UpdateSourceServerReplicationTypeInput {
#[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::UpdateSourceServerReplicationType,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateSourceServerReplicationTypeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateSourceServerReplicationType")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateSourceServerReplicationTypeInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_source_server_replication_type(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateSourceServerReplicationType::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateSourceServerReplicationType",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_source_server_replication_type_input::Builder {
crate::input::update_source_server_replication_type_input::Builder::default()
}
}
pub mod update_wave_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) wave_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>,
}
impl Builder {
pub fn wave_id(mut self, input: impl Into<std::string::String>) -> Self {
self.wave_id = Some(input.into());
self
}
pub fn set_wave_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.wave_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 build(
self,
) -> Result<crate::input::UpdateWaveInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateWaveInput {
wave_id: self.wave_id,
name: self.name,
description: self.description,
})
}
}
}
impl UpdateWaveInput {
#[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::UpdateWave,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateWaveInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateWave").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateWaveInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_wave(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateWave::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateWave",
"mgn",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_wave_input::Builder {
crate::input::update_wave_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateWaveInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateWaveInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnarchiveWaveInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
}
impl UnarchiveWaveInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateApplicationsInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub application_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DisassociateApplicationsInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_id.as_deref()
}
pub fn application_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.application_i_ds.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateApplicationsInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub application_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl AssociateApplicationsInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_id.as_deref()
}
pub fn application_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.application_i_ds.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ArchiveWaveInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
}
impl ArchiveWaveInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListWavesInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ListWavesRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListWavesInput {
pub fn filters(&self) -> std::option::Option<&crate::model::ListWavesRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateWaveInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateWaveInput {
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 tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateWaveInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateWaveInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteWaveInput {
#[doc(hidden)]
pub wave_id: std::option::Option<std::string::String>,
}
impl DeleteWaveInput {
pub fn wave_id(&self) -> std::option::Option<&str> {
self.wave_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeVcenterClientsInput {
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeVcenterClientsInput {
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteVcenterClientInput {
#[doc(hidden)]
pub vcenter_client_id: std::option::Option<std::string::String>,
}
impl DeleteVcenterClientInput {
pub fn vcenter_client_id(&self) -> std::option::Option<&str> {
self.vcenter_client_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateSourceServerReplicationTypeInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub replication_type: std::option::Option<crate::model::ReplicationType>,
}
impl UpdateSourceServerReplicationTypeInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn replication_type(&self) -> std::option::Option<&crate::model::ReplicationType> {
self.replication_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateReplicationConfigurationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub staging_area_subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associate_default_security_group: std::option::Option<bool>,
#[doc(hidden)]
pub replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub replication_server_instance_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub use_dedicated_replication_server: std::option::Option<bool>,
#[doc(hidden)]
pub default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
#[doc(hidden)]
pub replicated_disks:
std::option::Option<std::vec::Vec<crate::model::ReplicationConfigurationReplicatedDisk>>,
#[doc(hidden)]
pub ebs_encryption: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
#[doc(hidden)]
pub ebs_encryption_key_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth_throttling: i64,
#[doc(hidden)]
pub data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
#[doc(hidden)]
pub create_public_ip: std::option::Option<bool>,
#[doc(hidden)]
pub staging_area_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl UpdateReplicationConfigurationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn staging_area_subnet_id(&self) -> std::option::Option<&str> {
self.staging_area_subnet_id.as_deref()
}
pub fn associate_default_security_group(&self) -> std::option::Option<bool> {
self.associate_default_security_group
}
pub fn replication_servers_security_groups_i_ds(
&self,
) -> std::option::Option<&[std::string::String]> {
self.replication_servers_security_groups_i_ds.as_deref()
}
pub fn replication_server_instance_type(&self) -> std::option::Option<&str> {
self.replication_server_instance_type.as_deref()
}
pub fn use_dedicated_replication_server(&self) -> std::option::Option<bool> {
self.use_dedicated_replication_server
}
pub fn default_large_staging_disk_type(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>
{
self.default_large_staging_disk_type.as_ref()
}
pub fn replicated_disks(
&self,
) -> std::option::Option<&[crate::model::ReplicationConfigurationReplicatedDisk]> {
self.replicated_disks.as_deref()
}
pub fn ebs_encryption(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationEbsEncryption> {
self.ebs_encryption.as_ref()
}
pub fn ebs_encryption_key_arn(&self) -> std::option::Option<&str> {
self.ebs_encryption_key_arn.as_deref()
}
pub fn bandwidth_throttling(&self) -> i64 {
self.bandwidth_throttling
}
pub fn data_plane_routing(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDataPlaneRouting> {
self.data_plane_routing.as_ref()
}
pub fn create_public_ip(&self) -> std::option::Option<bool> {
self.create_public_ip
}
pub fn staging_area_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.staging_area_tags.as_ref()
}
}
impl std::fmt::Debug for UpdateReplicationConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateReplicationConfigurationInput");
formatter.field("source_server_id", &self.source_server_id);
formatter.field("name", &self.name);
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("replicated_disks", &self.replicated_disks);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLaunchConfigurationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
#[doc(hidden)]
pub target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
#[doc(hidden)]
pub copy_private_ip: std::option::Option<bool>,
#[doc(hidden)]
pub copy_tags: std::option::Option<bool>,
#[doc(hidden)]
pub licensing: std::option::Option<crate::model::Licensing>,
#[doc(hidden)]
pub boot_mode: std::option::Option<crate::model::BootMode>,
#[doc(hidden)]
pub post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
#[doc(hidden)]
pub enable_map_auto_tagging: std::option::Option<bool>,
#[doc(hidden)]
pub map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
}
impl UpdateLaunchConfigurationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn launch_disposition(&self) -> std::option::Option<&crate::model::LaunchDisposition> {
self.launch_disposition.as_ref()
}
pub fn target_instance_type_right_sizing_method(
&self,
) -> std::option::Option<&crate::model::TargetInstanceTypeRightSizingMethod> {
self.target_instance_type_right_sizing_method.as_ref()
}
pub fn copy_private_ip(&self) -> std::option::Option<bool> {
self.copy_private_ip
}
pub fn copy_tags(&self) -> std::option::Option<bool> {
self.copy_tags
}
pub fn licensing(&self) -> std::option::Option<&crate::model::Licensing> {
self.licensing.as_ref()
}
pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootMode> {
self.boot_mode.as_ref()
}
pub fn post_launch_actions(&self) -> std::option::Option<&crate::model::PostLaunchActions> {
self.post_launch_actions.as_ref()
}
pub fn enable_map_auto_tagging(&self) -> std::option::Option<bool> {
self.enable_map_auto_tagging
}
pub fn map_auto_tagging_mpe_id(&self) -> std::option::Option<&str> {
self.map_auto_tagging_mpe_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartReplicationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl StartReplicationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RetryDataReplicationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl RetryDataReplicationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RemoveSourceServerActionInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub action_id: std::option::Option<std::string::String>,
}
impl RemoveSourceServerActionInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutSourceServerActionInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub action_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub document_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub order: i32,
#[doc(hidden)]
pub action_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub document_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub active: std::option::Option<bool>,
#[doc(hidden)]
pub timeout_seconds: i32,
#[doc(hidden)]
pub must_succeed_for_cutover: std::option::Option<bool>,
#[doc(hidden)]
pub parameters: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
}
impl PutSourceServerActionInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn action_name(&self) -> std::option::Option<&str> {
self.action_name.as_deref()
}
pub fn document_identifier(&self) -> std::option::Option<&str> {
self.document_identifier.as_deref()
}
pub fn order(&self) -> i32 {
self.order
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
pub fn document_version(&self) -> std::option::Option<&str> {
self.document_version.as_deref()
}
pub fn active(&self) -> std::option::Option<bool> {
self.active
}
pub fn timeout_seconds(&self) -> i32 {
self.timeout_seconds
}
pub fn must_succeed_for_cutover(&self) -> std::option::Option<bool> {
self.must_succeed_for_cutover
}
pub fn parameters(
&self,
) -> std::option::Option<
&std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
> {
self.parameters.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MarkAsArchivedInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl MarkAsArchivedInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListSourceServerActionsInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::SourceServerActionsRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListSourceServerActionsInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::SourceServerActionsRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetReplicationConfigurationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl GetReplicationConfigurationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLaunchConfigurationInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl GetLaunchConfigurationInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FinalizeCutoverInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl FinalizeCutoverInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisconnectFromServiceInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl DisconnectFromServiceInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ChangeServerLifeCycleStateInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub life_cycle:
std::option::Option<crate::model::ChangeServerLifeCycleStateSourceServerLifecycle>,
}
impl ChangeServerLifeCycleStateInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
pub fn life_cycle(
&self,
) -> std::option::Option<&crate::model::ChangeServerLifeCycleStateSourceServerLifecycle> {
self.life_cycle.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TerminateTargetInstancesInput {
#[doc(hidden)]
pub source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TerminateTargetInstancesInput {
pub fn source_server_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.source_server_i_ds.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 TerminateTargetInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TerminateTargetInstancesInput");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartTestInput {
#[doc(hidden)]
pub source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl StartTestInput {
pub fn source_server_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.source_server_i_ds.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 StartTestInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartTestInput");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartCutoverInput {
#[doc(hidden)]
pub source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl StartCutoverInput {
pub fn source_server_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.source_server_i_ds.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 StartCutoverInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartCutoverInput");
formatter.field("source_server_i_ds", &self.source_server_i_ds);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeSourceServersInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::DescribeSourceServersRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeSourceServersInput {
pub fn filters(
&self,
) -> std::option::Option<&crate::model::DescribeSourceServersRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteSourceServerInput {
#[doc(hidden)]
pub source_server_id: std::option::Option<std::string::String>,
}
impl DeleteSourceServerInput {
pub fn source_server_id(&self) -> std::option::Option<&str> {
self.source_server_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeReplicationConfigurationTemplatesInput {
#[doc(hidden)]
pub replication_configuration_template_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeReplicationConfigurationTemplatesInput {
pub fn replication_configuration_template_i_ds(
&self,
) -> std::option::Option<&[std::string::String]> {
self.replication_configuration_template_i_ds.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateReplicationConfigurationTemplateInput {
#[doc(hidden)]
pub staging_area_subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associate_default_security_group: std::option::Option<bool>,
#[doc(hidden)]
pub replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub replication_server_instance_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub use_dedicated_replication_server: std::option::Option<bool>,
#[doc(hidden)]
pub default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
#[doc(hidden)]
pub ebs_encryption: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
#[doc(hidden)]
pub ebs_encryption_key_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth_throttling: i64,
#[doc(hidden)]
pub data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
#[doc(hidden)]
pub create_public_ip: std::option::Option<bool>,
#[doc(hidden)]
pub staging_area_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateReplicationConfigurationTemplateInput {
pub fn staging_area_subnet_id(&self) -> std::option::Option<&str> {
self.staging_area_subnet_id.as_deref()
}
pub fn associate_default_security_group(&self) -> std::option::Option<bool> {
self.associate_default_security_group
}
pub fn replication_servers_security_groups_i_ds(
&self,
) -> std::option::Option<&[std::string::String]> {
self.replication_servers_security_groups_i_ds.as_deref()
}
pub fn replication_server_instance_type(&self) -> std::option::Option<&str> {
self.replication_server_instance_type.as_deref()
}
pub fn use_dedicated_replication_server(&self) -> std::option::Option<bool> {
self.use_dedicated_replication_server
}
pub fn default_large_staging_disk_type(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>
{
self.default_large_staging_disk_type.as_ref()
}
pub fn ebs_encryption(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationEbsEncryption> {
self.ebs_encryption.as_ref()
}
pub fn ebs_encryption_key_arn(&self) -> std::option::Option<&str> {
self.ebs_encryption_key_arn.as_deref()
}
pub fn bandwidth_throttling(&self) -> i64 {
self.bandwidth_throttling
}
pub fn data_plane_routing(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDataPlaneRouting> {
self.data_plane_routing.as_ref()
}
pub fn create_public_ip(&self) -> std::option::Option<bool> {
self.create_public_ip
}
pub fn staging_area_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.staging_area_tags.as_ref()
}
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 CreateReplicationConfigurationTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateReplicationConfigurationTemplateInput");
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteReplicationConfigurationTemplateInput {
#[doc(hidden)]
pub replication_configuration_template_id: std::option::Option<std::string::String>,
}
impl DeleteReplicationConfigurationTemplateInput {
pub fn replication_configuration_template_id(&self) -> std::option::Option<&str> {
self.replication_configuration_template_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateReplicationConfigurationTemplateInput {
#[doc(hidden)]
pub replication_configuration_template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub staging_area_subnet_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associate_default_security_group: std::option::Option<bool>,
#[doc(hidden)]
pub replication_servers_security_groups_i_ds:
std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub replication_server_instance_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub use_dedicated_replication_server: std::option::Option<bool>,
#[doc(hidden)]
pub default_large_staging_disk_type:
std::option::Option<crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>,
#[doc(hidden)]
pub ebs_encryption: std::option::Option<crate::model::ReplicationConfigurationEbsEncryption>,
#[doc(hidden)]
pub ebs_encryption_key_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth_throttling: i64,
#[doc(hidden)]
pub data_plane_routing:
std::option::Option<crate::model::ReplicationConfigurationDataPlaneRouting>,
#[doc(hidden)]
pub create_public_ip: std::option::Option<bool>,
#[doc(hidden)]
pub staging_area_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl UpdateReplicationConfigurationTemplateInput {
pub fn replication_configuration_template_id(&self) -> std::option::Option<&str> {
self.replication_configuration_template_id.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn staging_area_subnet_id(&self) -> std::option::Option<&str> {
self.staging_area_subnet_id.as_deref()
}
pub fn associate_default_security_group(&self) -> std::option::Option<bool> {
self.associate_default_security_group
}
pub fn replication_servers_security_groups_i_ds(
&self,
) -> std::option::Option<&[std::string::String]> {
self.replication_servers_security_groups_i_ds.as_deref()
}
pub fn replication_server_instance_type(&self) -> std::option::Option<&str> {
self.replication_server_instance_type.as_deref()
}
pub fn use_dedicated_replication_server(&self) -> std::option::Option<bool> {
self.use_dedicated_replication_server
}
pub fn default_large_staging_disk_type(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDefaultLargeStagingDiskType>
{
self.default_large_staging_disk_type.as_ref()
}
pub fn ebs_encryption(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationEbsEncryption> {
self.ebs_encryption.as_ref()
}
pub fn ebs_encryption_key_arn(&self) -> std::option::Option<&str> {
self.ebs_encryption_key_arn.as_deref()
}
pub fn bandwidth_throttling(&self) -> i64 {
self.bandwidth_throttling
}
pub fn data_plane_routing(
&self,
) -> std::option::Option<&crate::model::ReplicationConfigurationDataPlaneRouting> {
self.data_plane_routing.as_ref()
}
pub fn create_public_ip(&self) -> std::option::Option<bool> {
self.create_public_ip
}
pub fn staging_area_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.staging_area_tags.as_ref()
}
}
impl std::fmt::Debug for UpdateReplicationConfigurationTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateReplicationConfigurationTemplateInput");
formatter.field(
"replication_configuration_template_id",
&self.replication_configuration_template_id,
);
formatter.field("arn", &self.arn);
formatter.field("staging_area_subnet_id", &self.staging_area_subnet_id);
formatter.field(
"associate_default_security_group",
&self.associate_default_security_group,
);
formatter.field(
"replication_servers_security_groups_i_ds",
&self.replication_servers_security_groups_i_ds,
);
formatter.field(
"replication_server_instance_type",
&self.replication_server_instance_type,
);
formatter.field(
"use_dedicated_replication_server",
&self.use_dedicated_replication_server,
);
formatter.field(
"default_large_staging_disk_type",
&self.default_large_staging_disk_type,
);
formatter.field("ebs_encryption", &self.ebs_encryption);
formatter.field("ebs_encryption_key_arn", &self.ebs_encryption_key_arn);
formatter.field("bandwidth_throttling", &self.bandwidth_throttling);
formatter.field("data_plane_routing", &self.data_plane_routing);
formatter.field("create_public_ip", &self.create_public_ip);
formatter.field("staging_area_tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RemoveTemplateActionInput {
#[doc(hidden)]
pub launch_configuration_template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub action_id: std::option::Option<std::string::String>,
}
impl RemoveTemplateActionInput {
pub fn launch_configuration_template_id(&self) -> std::option::Option<&str> {
self.launch_configuration_template_id.as_deref()
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutTemplateActionInput {
#[doc(hidden)]
pub launch_configuration_template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub action_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub document_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub order: i32,
#[doc(hidden)]
pub action_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub document_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub active: std::option::Option<bool>,
#[doc(hidden)]
pub timeout_seconds: i32,
#[doc(hidden)]
pub must_succeed_for_cutover: std::option::Option<bool>,
#[doc(hidden)]
pub parameters: std::option::Option<
std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
>,
#[doc(hidden)]
pub operating_system: std::option::Option<std::string::String>,
}
impl PutTemplateActionInput {
pub fn launch_configuration_template_id(&self) -> std::option::Option<&str> {
self.launch_configuration_template_id.as_deref()
}
pub fn action_name(&self) -> std::option::Option<&str> {
self.action_name.as_deref()
}
pub fn document_identifier(&self) -> std::option::Option<&str> {
self.document_identifier.as_deref()
}
pub fn order(&self) -> i32 {
self.order
}
pub fn action_id(&self) -> std::option::Option<&str> {
self.action_id.as_deref()
}
pub fn document_version(&self) -> std::option::Option<&str> {
self.document_version.as_deref()
}
pub fn active(&self) -> std::option::Option<bool> {
self.active
}
pub fn timeout_seconds(&self) -> i32 {
self.timeout_seconds
}
pub fn must_succeed_for_cutover(&self) -> std::option::Option<bool> {
self.must_succeed_for_cutover
}
pub fn parameters(
&self,
) -> std::option::Option<
&std::collections::HashMap<
std::string::String,
std::vec::Vec<crate::model::SsmParameterStoreParameter>,
>,
> {
self.parameters.as_ref()
}
pub fn operating_system(&self) -> std::option::Option<&str> {
self.operating_system.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTemplateActionsInput {
#[doc(hidden)]
pub launch_configuration_template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub filters: std::option::Option<crate::model::TemplateActionsRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListTemplateActionsInput {
pub fn launch_configuration_template_id(&self) -> std::option::Option<&str> {
self.launch_configuration_template_id.as_deref()
}
pub fn filters(&self) -> std::option::Option<&crate::model::TemplateActionsRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeLaunchConfigurationTemplatesInput {
#[doc(hidden)]
pub launch_configuration_template_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeLaunchConfigurationTemplatesInput {
pub fn launch_configuration_template_i_ds(
&self,
) -> std::option::Option<&[std::string::String]> {
self.launch_configuration_template_i_ds.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateLaunchConfigurationTemplateInput {
#[doc(hidden)]
pub post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
#[doc(hidden)]
pub enable_map_auto_tagging: std::option::Option<bool>,
#[doc(hidden)]
pub map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
#[doc(hidden)]
pub target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
#[doc(hidden)]
pub copy_private_ip: std::option::Option<bool>,
#[doc(hidden)]
pub associate_public_ip_address: std::option::Option<bool>,
#[doc(hidden)]
pub copy_tags: std::option::Option<bool>,
#[doc(hidden)]
pub licensing: std::option::Option<crate::model::Licensing>,
#[doc(hidden)]
pub boot_mode: std::option::Option<crate::model::BootMode>,
#[doc(hidden)]
pub small_volume_max_size: i64,
#[doc(hidden)]
pub small_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
#[doc(hidden)]
pub large_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
}
impl CreateLaunchConfigurationTemplateInput {
pub fn post_launch_actions(&self) -> std::option::Option<&crate::model::PostLaunchActions> {
self.post_launch_actions.as_ref()
}
pub fn enable_map_auto_tagging(&self) -> std::option::Option<bool> {
self.enable_map_auto_tagging
}
pub fn map_auto_tagging_mpe_id(&self) -> std::option::Option<&str> {
self.map_auto_tagging_mpe_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn launch_disposition(&self) -> std::option::Option<&crate::model::LaunchDisposition> {
self.launch_disposition.as_ref()
}
pub fn target_instance_type_right_sizing_method(
&self,
) -> std::option::Option<&crate::model::TargetInstanceTypeRightSizingMethod> {
self.target_instance_type_right_sizing_method.as_ref()
}
pub fn copy_private_ip(&self) -> std::option::Option<bool> {
self.copy_private_ip
}
pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
self.associate_public_ip_address
}
pub fn copy_tags(&self) -> std::option::Option<bool> {
self.copy_tags
}
pub fn licensing(&self) -> std::option::Option<&crate::model::Licensing> {
self.licensing.as_ref()
}
pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootMode> {
self.boot_mode.as_ref()
}
pub fn small_volume_max_size(&self) -> i64 {
self.small_volume_max_size
}
pub fn small_volume_conf(&self) -> std::option::Option<&crate::model::LaunchTemplateDiskConf> {
self.small_volume_conf.as_ref()
}
pub fn large_volume_conf(&self) -> std::option::Option<&crate::model::LaunchTemplateDiskConf> {
self.large_volume_conf.as_ref()
}
}
impl std::fmt::Debug for CreateLaunchConfigurationTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateLaunchConfigurationTemplateInput");
formatter.field("post_launch_actions", &self.post_launch_actions);
formatter.field("enable_map_auto_tagging", &self.enable_map_auto_tagging);
formatter.field("map_auto_tagging_mpe_id", &self.map_auto_tagging_mpe_id);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.field("launch_disposition", &self.launch_disposition);
formatter.field(
"target_instance_type_right_sizing_method",
&self.target_instance_type_right_sizing_method,
);
formatter.field("copy_private_ip", &self.copy_private_ip);
formatter.field(
"associate_public_ip_address",
&self.associate_public_ip_address,
);
formatter.field("copy_tags", &self.copy_tags);
formatter.field("licensing", &self.licensing);
formatter.field("boot_mode", &self.boot_mode);
formatter.field("small_volume_max_size", &self.small_volume_max_size);
formatter.field("small_volume_conf", &self.small_volume_conf);
formatter.field("large_volume_conf", &self.large_volume_conf);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLaunchConfigurationTemplateInput {
#[doc(hidden)]
pub launch_configuration_template_id: std::option::Option<std::string::String>,
}
impl DeleteLaunchConfigurationTemplateInput {
pub fn launch_configuration_template_id(&self) -> std::option::Option<&str> {
self.launch_configuration_template_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLaunchConfigurationTemplateInput {
#[doc(hidden)]
pub launch_configuration_template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub post_launch_actions: std::option::Option<crate::model::PostLaunchActions>,
#[doc(hidden)]
pub enable_map_auto_tagging: std::option::Option<bool>,
#[doc(hidden)]
pub map_auto_tagging_mpe_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_disposition: std::option::Option<crate::model::LaunchDisposition>,
#[doc(hidden)]
pub target_instance_type_right_sizing_method:
std::option::Option<crate::model::TargetInstanceTypeRightSizingMethod>,
#[doc(hidden)]
pub copy_private_ip: std::option::Option<bool>,
#[doc(hidden)]
pub associate_public_ip_address: std::option::Option<bool>,
#[doc(hidden)]
pub copy_tags: std::option::Option<bool>,
#[doc(hidden)]
pub licensing: std::option::Option<crate::model::Licensing>,
#[doc(hidden)]
pub boot_mode: std::option::Option<crate::model::BootMode>,
#[doc(hidden)]
pub small_volume_max_size: i64,
#[doc(hidden)]
pub small_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
#[doc(hidden)]
pub large_volume_conf: std::option::Option<crate::model::LaunchTemplateDiskConf>,
}
impl UpdateLaunchConfigurationTemplateInput {
pub fn launch_configuration_template_id(&self) -> std::option::Option<&str> {
self.launch_configuration_template_id.as_deref()
}
pub fn post_launch_actions(&self) -> std::option::Option<&crate::model::PostLaunchActions> {
self.post_launch_actions.as_ref()
}
pub fn enable_map_auto_tagging(&self) -> std::option::Option<bool> {
self.enable_map_auto_tagging
}
pub fn map_auto_tagging_mpe_id(&self) -> std::option::Option<&str> {
self.map_auto_tagging_mpe_id.as_deref()
}
pub fn launch_disposition(&self) -> std::option::Option<&crate::model::LaunchDisposition> {
self.launch_disposition.as_ref()
}
pub fn target_instance_type_right_sizing_method(
&self,
) -> std::option::Option<&crate::model::TargetInstanceTypeRightSizingMethod> {
self.target_instance_type_right_sizing_method.as_ref()
}
pub fn copy_private_ip(&self) -> std::option::Option<bool> {
self.copy_private_ip
}
pub fn associate_public_ip_address(&self) -> std::option::Option<bool> {
self.associate_public_ip_address
}
pub fn copy_tags(&self) -> std::option::Option<bool> {
self.copy_tags
}
pub fn licensing(&self) -> std::option::Option<&crate::model::Licensing> {
self.licensing.as_ref()
}
pub fn boot_mode(&self) -> std::option::Option<&crate::model::BootMode> {
self.boot_mode.as_ref()
}
pub fn small_volume_max_size(&self) -> i64 {
self.small_volume_max_size
}
pub fn small_volume_conf(&self) -> std::option::Option<&crate::model::LaunchTemplateDiskConf> {
self.small_volume_conf.as_ref()
}
pub fn large_volume_conf(&self) -> std::option::Option<&crate::model::LaunchTemplateDiskConf> {
self.large_volume_conf.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeJobLogItemsInput {
#[doc(hidden)]
pub job_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeJobLogItemsInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeJobsInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::DescribeJobsRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeJobsInput {
pub fn filters(&self) -> std::option::Option<&crate::model::DescribeJobsRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteJobInput {
#[doc(hidden)]
pub job_id: std::option::Option<std::string::String>,
}
impl DeleteJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateApplicationInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateApplicationInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnarchiveApplicationInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
}
impl UnarchiveApplicationInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateSourceServersInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DisassociateSourceServersInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
pub fn source_server_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.source_server_i_ds.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateSourceServersInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source_server_i_ds: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl AssociateSourceServersInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
pub fn source_server_i_ds(&self) -> std::option::Option<&[std::string::String]> {
self.source_server_i_ds.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ArchiveApplicationInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
}
impl ArchiveApplicationInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListApplicationsInput {
#[doc(hidden)]
pub filters: std::option::Option<crate::model::ListApplicationsRequestFilters>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListApplicationsInput {
pub fn filters(&self) -> std::option::Option<&crate::model::ListApplicationsRequestFilters> {
self.filters.as_ref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateApplicationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateApplicationInput {
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 tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateApplicationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateApplicationInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteApplicationInput {
#[doc(hidden)]
pub application_id: std::option::Option<std::string::String>,
}
impl DeleteApplicationInput {
pub fn application_id(&self) -> std::option::Option<&str> {
self.application_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
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", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
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", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTagsForResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InitializeServiceInput {}