use std::fmt::Write;
pub mod accept_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AcceptEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AcceptEnvironmentAccountConnectionInput { id: self.id })
}
}
}
impl AcceptEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AcceptEnvironmentAccountConnection,
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::AcceptEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AcceptEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.AcceptEnvironmentAccountConnection",
);
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_accept_environment_account_connection(&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::AcceptEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AcceptEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::accept_environment_account_connection_input::Builder {
crate::input::accept_environment_account_connection_input::Builder::default()
}
}
pub mod cancel_component_deployment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_name(mut self, input: impl Into<std::string::String>) -> Self {
self.component_name = Some(input.into());
self
}
pub fn set_component_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelComponentDeploymentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelComponentDeploymentInput {
component_name: self.component_name,
})
}
}
}
impl CancelComponentDeploymentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelComponentDeployment,
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::CancelComponentDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelComponentDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CancelComponentDeployment",
);
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_cancel_component_deployment(
&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::CancelComponentDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelComponentDeployment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_component_deployment_input::Builder {
crate::input::cancel_component_deployment_input::Builder::default()
}
}
pub mod cancel_environment_deployment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) environment_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelEnvironmentDeploymentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelEnvironmentDeploymentInput {
environment_name: self.environment_name,
})
}
}
}
impl CancelEnvironmentDeploymentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelEnvironmentDeployment,
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::CancelEnvironmentDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelEnvironmentDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CancelEnvironmentDeployment",
);
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_cancel_environment_deployment(&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::CancelEnvironmentDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelEnvironmentDeployment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_environment_deployment_input::Builder {
crate::input::cancel_environment_deployment_input::Builder::default()
}
}
pub mod cancel_service_instance_deployment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) service_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelServiceInstanceDeploymentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelServiceInstanceDeploymentInput {
service_instance_name: self.service_instance_name,
service_name: self.service_name,
})
}
}
}
impl CancelServiceInstanceDeploymentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelServiceInstanceDeployment,
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::CancelServiceInstanceDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelServiceInstanceDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CancelServiceInstanceDeployment",
);
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_cancel_service_instance_deployment(&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::CancelServiceInstanceDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelServiceInstanceDeployment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_service_instance_deployment_input::Builder {
crate::input::cancel_service_instance_deployment_input::Builder::default()
}
}
pub mod cancel_service_pipeline_deployment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CancelServicePipelineDeploymentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CancelServicePipelineDeploymentInput {
service_name: self.service_name,
})
}
}
}
impl CancelServicePipelineDeploymentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelServicePipelineDeployment,
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::CancelServicePipelineDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelServicePipelineDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CancelServicePipelineDeployment",
);
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_cancel_service_pipeline_deployment(&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::CancelServicePipelineDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelServicePipelineDeployment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::cancel_service_pipeline_deployment_input::Builder {
crate::input::cancel_service_pipeline_deployment_input::Builder::default()
}
}
pub mod create_component_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) service_name: std::option::Option<std::string::String>,
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) template_file: std::option::Option<std::string::String>,
pub(crate) manifest: std::option::Option<std::string::String>,
pub(crate) service_spec: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = input;
self
}
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = input;
self
}
pub fn template_file(mut self, input: impl Into<std::string::String>) -> Self {
self.template_file = Some(input.into());
self
}
pub fn set_template_file(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_file = input;
self
}
pub fn manifest(mut self, input: impl Into<std::string::String>) -> Self {
self.manifest = Some(input.into());
self
}
pub fn set_manifest(mut self, input: std::option::Option<std::string::String>) -> Self {
self.manifest = input;
self
}
pub fn service_spec(mut self, input: impl Into<std::string::String>) -> Self {
self.service_spec = Some(input.into());
self
}
pub fn set_service_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_spec = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateComponentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateComponentInput {
name: self.name,
description: self.description,
service_name: self.service_name,
service_instance_name: self.service_instance_name,
environment_name: self.environment_name,
template_file: self.template_file,
manifest: self.manifest,
service_spec: self.service_spec,
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", &"*** Sensitive Data Redacted ***");
formatter.field("service_name", &self.service_name);
formatter.field("service_instance_name", &self.service_instance_name);
formatter.field("environment_name", &self.environment_name);
formatter.field("template_file", &"*** Sensitive Data Redacted ***");
formatter.field("manifest", &"*** Sensitive Data Redacted ***");
formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateComponent,
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::CreateComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateComponent",
);
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_component(&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::CreateComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateComponent",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_component_input::Builder {
crate::input::create_component_input::Builder::default()
}
}
pub mod create_environment_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) template_name: std::option::Option<std::string::String>,
pub(crate) template_major_version: std::option::Option<std::string::String>,
pub(crate) template_minor_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) spec: std::option::Option<std::string::String>,
pub(crate) proton_service_role_arn: std::option::Option<std::string::String>,
pub(crate) environment_account_connection_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) provisioning_repository:
std::option::Option<crate::model::RepositoryBranchInput>,
pub(crate) component_role_arn: std::option::Option<std::string::String>,
pub(crate) codebuild_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_major_version = Some(input.into());
self
}
pub fn set_template_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_major_version = input;
self
}
pub fn template_minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_minor_version = Some(input.into());
self
}
pub fn set_template_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_minor_version = 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 spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn proton_service_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.proton_service_role_arn = Some(input.into());
self
}
pub fn set_proton_service_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.proton_service_role_arn = input;
self
}
pub fn environment_account_connection_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.environment_account_connection_id = Some(input.into());
self
}
pub fn set_environment_account_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_account_connection_id = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn provisioning_repository(
mut self,
input: crate::model::RepositoryBranchInput,
) -> Self {
self.provisioning_repository = Some(input);
self
}
pub fn set_provisioning_repository(
mut self,
input: std::option::Option<crate::model::RepositoryBranchInput>,
) -> Self {
self.provisioning_repository = input;
self
}
pub fn component_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_role_arn = Some(input.into());
self
}
pub fn set_component_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_role_arn = input;
self
}
pub fn codebuild_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.codebuild_role_arn = Some(input.into());
self
}
pub fn set_codebuild_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.codebuild_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateEnvironmentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateEnvironmentInput {
name: self.name,
template_name: self.template_name,
template_major_version: self.template_major_version,
template_minor_version: self.template_minor_version,
description: self.description,
spec: self.spec,
proton_service_role_arn: self.proton_service_role_arn,
environment_account_connection_id: self.environment_account_connection_id,
tags: self.tags,
provisioning_repository: self.provisioning_repository,
component_role_arn: self.component_role_arn,
codebuild_role_arn: self.codebuild_role_arn,
})
}
}
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("template_name", &self.template_name);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
formatter.field(
"environment_account_connection_id",
&self.environment_account_connection_id,
);
formatter.field("tags", &self.tags);
formatter.field("provisioning_repository", &self.provisioning_repository);
formatter.field("component_role_arn", &self.component_role_arn);
formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
formatter.finish()
}
}
}
impl CreateEnvironmentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateEnvironment,
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::CreateEnvironmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateEnvironmentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateEnvironment",
);
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_environment(&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::CreateEnvironment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEnvironment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_environment_input::Builder {
crate::input::create_environment_input::Builder::default()
}
}
pub mod create_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) management_account_id: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) component_role_arn: std::option::Option<std::string::String>,
pub(crate) codebuild_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn management_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.management_account_id = Some(input.into());
self
}
pub fn set_management_account_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.management_account_id = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn component_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_role_arn = Some(input.into());
self
}
pub fn set_component_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_role_arn = input;
self
}
pub fn codebuild_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.codebuild_role_arn = Some(input.into());
self
}
pub fn set_codebuild_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.codebuild_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateEnvironmentAccountConnectionInput {
client_token: self.client_token,
management_account_id: self.management_account_id,
role_arn: self.role_arn,
environment_name: self.environment_name,
tags: self.tags,
component_role_arn: self.component_role_arn,
codebuild_role_arn: self.codebuild_role_arn,
})
}
}
}
impl CreateEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateEnvironmentAccountConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateEnvironmentAccountConnection",
);
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_environment_account_connection(&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::CreateEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_environment_account_connection_input::Builder {
crate::input::create_environment_account_connection_input::Builder::default()
}
}
pub mod create_environment_template_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) display_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) encryption_key: std::option::Option<std::string::String>,
pub(crate) provisioning: std::option::Option<crate::model::Provisioning>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_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 encryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key = Some(input.into());
self
}
pub fn set_encryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key = input;
self
}
pub fn provisioning(mut self, input: crate::model::Provisioning) -> Self {
self.provisioning = Some(input);
self
}
pub fn set_provisioning(
mut self,
input: std::option::Option<crate::model::Provisioning>,
) -> Self {
self.provisioning = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateEnvironmentTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateEnvironmentTemplateInput {
name: self.name,
display_name: self.display_name,
description: self.description,
encryption_key: self.encryption_key,
provisioning: self.provisioning,
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("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("encryption_key", &self.encryption_key);
formatter.field("provisioning", &self.provisioning);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateEnvironmentTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateEnvironmentTemplate,
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::CreateEnvironmentTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateEnvironmentTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateEnvironmentTemplate",
);
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_environment_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::CreateEnvironmentTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEnvironmentTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_environment_template_input::Builder {
crate::input::create_environment_template_input::Builder::default()
}
}
pub mod create_environment_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) source: std::option::Option<crate::model::TemplateVersionSourceInput>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_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 major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn source(mut self, input: crate::model::TemplateVersionSourceInput) -> Self {
self.source = Some(input);
self
}
pub fn set_source(
mut self,
input: std::option::Option<crate::model::TemplateVersionSourceInput>,
) -> Self {
self.source = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateEnvironmentTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateEnvironmentTemplateVersionInput {
client_token: self.client_token,
template_name: self.template_name,
description: self.description,
major_version: self.major_version,
source: self.source,
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("client_token", &self.client_token);
formatter.field("template_name", &self.template_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("major_version", &self.major_version);
formatter.field("source", &self.source);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateEnvironmentTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateEnvironmentTemplateVersion,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateEnvironmentTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateEnvironmentTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateEnvironmentTemplateVersion",
);
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_environment_template_version(&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::CreateEnvironmentTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEnvironmentTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_environment_template_version_input::Builder {
crate::input::create_environment_template_version_input::Builder::default()
}
}
pub mod create_repository_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) connection_arn: std::option::Option<std::string::String>,
pub(crate) encryption_key: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.provider = Some(input);
self
}
pub fn set_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.provider = 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 connection_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_arn = Some(input.into());
self
}
pub fn set_connection_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_arn = input;
self
}
pub fn encryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key = Some(input.into());
self
}
pub fn set_encryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateRepositoryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateRepositoryInput {
provider: self.provider,
name: self.name,
connection_arn: self.connection_arn,
encryption_key: self.encryption_key,
tags: self.tags,
})
}
}
}
impl CreateRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateRepository,
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::CreateRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateRepository",
);
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_repository(&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::CreateRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateRepository",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_repository_input::Builder {
crate::input::create_repository_input::Builder::default()
}
}
pub mod create_service_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) template_name: std::option::Option<std::string::String>,
pub(crate) template_major_version: std::option::Option<std::string::String>,
pub(crate) template_minor_version: std::option::Option<std::string::String>,
pub(crate) spec: std::option::Option<std::string::String>,
pub(crate) repository_connection_arn: std::option::Option<std::string::String>,
pub(crate) repository_id: std::option::Option<std::string::String>,
pub(crate) branch_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_major_version = Some(input.into());
self
}
pub fn set_template_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_major_version = input;
self
}
pub fn template_minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_minor_version = Some(input.into());
self
}
pub fn set_template_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_minor_version = input;
self
}
pub fn spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn repository_connection_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_connection_arn = Some(input.into());
self
}
pub fn set_repository_connection_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_connection_arn = input;
self
}
pub fn repository_id(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_id = Some(input.into());
self
}
pub fn set_repository_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_id = input;
self
}
pub fn branch_name(mut self, input: impl Into<std::string::String>) -> Self {
self.branch_name = Some(input.into());
self
}
pub fn set_branch_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch_name = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateServiceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateServiceInput {
name: self.name,
description: self.description,
template_name: self.template_name,
template_major_version: self.template_major_version,
template_minor_version: self.template_minor_version,
spec: self.spec,
repository_connection_arn: self.repository_connection_arn,
repository_id: self.repository_id,
branch_name: self.branch_name,
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", &"*** Sensitive Data Redacted ***");
formatter.field("template_name", &self.template_name);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("repository_connection_arn", &self.repository_connection_arn);
formatter.field("repository_id", &self.repository_id);
formatter.field("branch_name", &self.branch_name);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateServiceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateService,
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::CreateServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateService",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_service(&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::CreateService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateService",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_service_input::Builder {
crate::input::create_service_input::Builder::default()
}
}
pub mod create_service_template_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) display_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) encryption_key: std::option::Option<std::string::String>,
pub(crate) pipeline_provisioning: std::option::Option<crate::model::Provisioning>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_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 encryption_key(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_key = Some(input.into());
self
}
pub fn set_encryption_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_key = input;
self
}
pub fn pipeline_provisioning(mut self, input: crate::model::Provisioning) -> Self {
self.pipeline_provisioning = Some(input);
self
}
pub fn set_pipeline_provisioning(
mut self,
input: std::option::Option<crate::model::Provisioning>,
) -> Self {
self.pipeline_provisioning = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateServiceTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateServiceTemplateInput {
name: self.name,
display_name: self.display_name,
description: self.description,
encryption_key: self.encryption_key,
pipeline_provisioning: self.pipeline_provisioning,
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("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("encryption_key", &self.encryption_key);
formatter.field("pipeline_provisioning", &self.pipeline_provisioning);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateServiceTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateServiceTemplate,
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::CreateServiceTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateServiceTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateServiceTemplate",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_service_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::CreateServiceTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateServiceTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_service_template_input::Builder {
crate::input::create_service_template_input::Builder::default()
}
}
pub mod create_service_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) source: std::option::Option<crate::model::TemplateVersionSourceInput>,
pub(crate) compatible_environment_templates:
std::option::Option<std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) supported_component_sources: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_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 major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn source(mut self, input: crate::model::TemplateVersionSourceInput) -> Self {
self.source = Some(input);
self
}
pub fn set_source(
mut self,
input: std::option::Option<crate::model::TemplateVersionSourceInput>,
) -> Self {
self.source = input;
self
}
pub fn compatible_environment_templates(
mut self,
input: crate::model::CompatibleEnvironmentTemplateInput,
) -> Self {
let mut v = self.compatible_environment_templates.unwrap_or_default();
v.push(input);
self.compatible_environment_templates = Some(v);
self
}
pub fn set_compatible_environment_templates(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>,
>,
) -> Self {
self.compatible_environment_templates = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn supported_component_sources(
mut self,
input: crate::model::ServiceTemplateSupportedComponentSourceType,
) -> Self {
let mut v = self.supported_component_sources.unwrap_or_default();
v.push(input);
self.supported_component_sources = Some(v);
self
}
pub fn set_supported_component_sources(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
) -> Self {
self.supported_component_sources = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateServiceTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateServiceTemplateVersionInput {
client_token: self.client_token,
template_name: self.template_name,
description: self.description,
major_version: self.major_version,
source: self.source,
compatible_environment_templates: self.compatible_environment_templates,
tags: self.tags,
supported_component_sources: self.supported_component_sources,
})
}
}
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("client_token", &self.client_token);
formatter.field("template_name", &self.template_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("major_version", &self.major_version);
formatter.field("source", &self.source);
formatter.field(
"compatible_environment_templates",
&self.compatible_environment_templates,
);
formatter.field("tags", &self.tags);
formatter.field(
"supported_component_sources",
&self.supported_component_sources,
);
formatter.finish()
}
}
}
impl CreateServiceTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateServiceTemplateVersion,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateServiceTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateServiceTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateServiceTemplateVersion",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_service_template_version(&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::CreateServiceTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateServiceTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_service_template_version_input::Builder {
crate::input::create_service_template_version_input::Builder::default()
}
}
pub mod create_template_sync_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
pub(crate) repository_provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch: std::option::Option<std::string::String>,
pub(crate) subdirectory: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn repository_provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.repository_provider = Some(input);
self
}
pub fn set_repository_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.repository_provider = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch(mut self, input: impl Into<std::string::String>) -> Self {
self.branch = Some(input.into());
self
}
pub fn set_branch(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch = input;
self
}
pub fn subdirectory(mut self, input: impl Into<std::string::String>) -> Self {
self.subdirectory = Some(input.into());
self
}
pub fn set_subdirectory(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subdirectory = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateTemplateSyncConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateTemplateSyncConfigInput {
template_name: self.template_name,
template_type: self.template_type,
repository_provider: self.repository_provider,
repository_name: self.repository_name,
branch: self.branch,
subdirectory: self.subdirectory,
})
}
}
}
impl CreateTemplateSyncConfigInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateTemplateSyncConfig,
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::CreateTemplateSyncConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateTemplateSyncConfigInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.CreateTemplateSyncConfig",
);
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_template_sync_config(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateTemplateSyncConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateTemplateSyncConfig",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_template_sync_config_input::Builder {
crate::input::create_template_sync_config_input::Builder::default()
}
}
pub mod delete_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteComponentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteComponentInput { name: self.name })
}
}
}
impl DeleteComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteComponent,
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::DeleteComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteComponent",
);
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_component(&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::DeleteComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteComponent",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_component_input::Builder {
crate::input::delete_component_input::Builder::default()
}
}
pub mod delete_environment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteEnvironmentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteEnvironmentInput { name: self.name })
}
}
}
impl DeleteEnvironmentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteEnvironment,
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::DeleteEnvironmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEnvironmentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteEnvironment",
);
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_environment(&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::DeleteEnvironment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEnvironment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_environment_input::Builder {
crate::input::delete_environment_input::Builder::default()
}
}
pub mod delete_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteEnvironmentAccountConnectionInput { id: self.id })
}
}
}
impl DeleteEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteEnvironmentAccountConnection,
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::DeleteEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteEnvironmentAccountConnection",
);
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_environment_account_connection(&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::DeleteEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_environment_account_connection_input::Builder {
crate::input::delete_environment_account_connection_input::Builder::default()
}
}
pub mod delete_environment_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteEnvironmentTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteEnvironmentTemplateInput { name: self.name })
}
}
}
impl DeleteEnvironmentTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteEnvironmentTemplate,
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::DeleteEnvironmentTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEnvironmentTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteEnvironmentTemplate",
);
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_environment_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::DeleteEnvironmentTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEnvironmentTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_environment_template_input::Builder {
crate::input::delete_environment_template_input::Builder::default()
}
}
pub mod delete_environment_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteEnvironmentTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteEnvironmentTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
})
}
}
}
impl DeleteEnvironmentTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteEnvironmentTemplateVersion,
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::DeleteEnvironmentTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteEnvironmentTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteEnvironmentTemplateVersion",
);
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_environment_template_version(&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::DeleteEnvironmentTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEnvironmentTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_environment_template_version_input::Builder {
crate::input::delete_environment_template_version_input::Builder::default()
}
}
pub mod delete_repository_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.provider = Some(input);
self
}
pub fn set_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.provider = 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 build(
self,
) -> Result<
crate::input::DeleteRepositoryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteRepositoryInput {
provider: self.provider,
name: self.name,
})
}
}
}
impl DeleteRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteRepository,
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::DeleteRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteRepository",
);
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_repository(&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::DeleteRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRepository",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_repository_input::Builder {
crate::input::delete_repository_input::Builder::default()
}
}
pub mod delete_service_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteServiceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteServiceInput { name: self.name })
}
}
}
impl DeleteServiceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteService,
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::DeleteServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteService",
);
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_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::DeleteService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteService",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_service_input::Builder {
crate::input::delete_service_input::Builder::default()
}
}
pub mod delete_service_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteServiceTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteServiceTemplateInput { name: self.name })
}
}
}
impl DeleteServiceTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteServiceTemplate,
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::DeleteServiceTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteServiceTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteServiceTemplate",
);
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_service_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::DeleteServiceTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteServiceTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_service_template_input::Builder {
crate::input::delete_service_template_input::Builder::default()
}
}
pub mod delete_service_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteServiceTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteServiceTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
})
}
}
}
impl DeleteServiceTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteServiceTemplateVersion,
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::DeleteServiceTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteServiceTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteServiceTemplateVersion",
);
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_service_template_version(&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::DeleteServiceTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteServiceTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_service_template_version_input::Builder {
crate::input::delete_service_template_version_input::Builder::default()
}
}
pub mod delete_template_sync_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteTemplateSyncConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteTemplateSyncConfigInput {
template_name: self.template_name,
template_type: self.template_type,
})
}
}
}
impl DeleteTemplateSyncConfigInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteTemplateSyncConfig,
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::DeleteTemplateSyncConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteTemplateSyncConfigInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.DeleteTemplateSyncConfig",
);
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_template_sync_config(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteTemplateSyncConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteTemplateSyncConfig",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_template_sync_config_input::Builder {
crate::input::delete_template_sync_config_input::Builder::default()
}
}
pub mod get_account_settings_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::GetAccountSettingsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetAccountSettingsInput {})
}
}
}
impl GetAccountSettingsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetAccountSettings,
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::GetAccountSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAccountSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetAccountSettings",
);
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_account_settings(&self)?,
);
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAccountSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAccountSettings",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_account_settings_input::Builder {
crate::input::get_account_settings_input::Builder::default()
}
}
pub mod get_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetComponentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetComponentInput { name: self.name })
}
}
}
impl GetComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetComponent,
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::GetComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetComponent",
);
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_component(&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::GetComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComponent",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_component_input::Builder {
crate::input::get_component_input::Builder::default()
}
}
pub mod get_environment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetEnvironmentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetEnvironmentInput { name: self.name })
}
}
}
impl GetEnvironmentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetEnvironment,
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::GetEnvironmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEnvironmentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetEnvironment",
);
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_environment(&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::GetEnvironment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEnvironment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_environment_input::Builder {
crate::input::get_environment_input::Builder::default()
}
}
pub mod get_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetEnvironmentAccountConnectionInput { id: self.id })
}
}
}
impl GetEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetEnvironmentAccountConnection,
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::GetEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetEnvironmentAccountConnection",
);
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_environment_account_connection(&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::GetEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_environment_account_connection_input::Builder {
crate::input::get_environment_account_connection_input::Builder::default()
}
}
pub mod get_environment_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetEnvironmentTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetEnvironmentTemplateInput { name: self.name })
}
}
}
impl GetEnvironmentTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetEnvironmentTemplate,
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::GetEnvironmentTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEnvironmentTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetEnvironmentTemplate",
);
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_environment_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::GetEnvironmentTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEnvironmentTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_environment_template_input::Builder {
crate::input::get_environment_template_input::Builder::default()
}
}
pub mod get_environment_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetEnvironmentTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetEnvironmentTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
})
}
}
}
impl GetEnvironmentTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetEnvironmentTemplateVersion,
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::GetEnvironmentTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEnvironmentTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetEnvironmentTemplateVersion",
);
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_environment_template_version(&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::GetEnvironmentTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEnvironmentTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_environment_template_version_input::Builder {
crate::input::get_environment_template_version_input::Builder::default()
}
}
pub mod get_repository_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.provider = Some(input);
self
}
pub fn set_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.provider = 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 build(
self,
) -> Result<crate::input::GetRepositoryInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetRepositoryInput {
provider: self.provider,
name: self.name,
})
}
}
}
impl GetRepositoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetRepository,
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::GetRepositoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRepositoryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetRepository",
);
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_repository(&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::GetRepository::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRepository",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_repository_input::Builder {
crate::input::get_repository_input::Builder::default()
}
}
pub mod get_repository_sync_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) repository_provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) branch: std::option::Option<std::string::String>,
pub(crate) sync_type: std::option::Option<crate::model::SyncType>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn repository_provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.repository_provider = Some(input);
self
}
pub fn set_repository_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.repository_provider = input;
self
}
pub fn branch(mut self, input: impl Into<std::string::String>) -> Self {
self.branch = Some(input.into());
self
}
pub fn set_branch(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch = input;
self
}
pub fn sync_type(mut self, input: crate::model::SyncType) -> Self {
self.sync_type = Some(input);
self
}
pub fn set_sync_type(mut self, input: std::option::Option<crate::model::SyncType>) -> Self {
self.sync_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetRepositorySyncStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetRepositorySyncStatusInput {
repository_name: self.repository_name,
repository_provider: self.repository_provider,
branch: self.branch,
sync_type: self.sync_type,
})
}
}
}
impl GetRepositorySyncStatusInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetRepositorySyncStatus,
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::GetRepositorySyncStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRepositorySyncStatusInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetRepositorySyncStatus",
);
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_repository_sync_status(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetRepositorySyncStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRepositorySyncStatus",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_repository_sync_status_input::Builder {
crate::input::get_repository_sync_status_input::Builder::default()
}
}
pub mod get_service_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetServiceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetServiceInput { name: self.name })
}
}
}
impl GetServiceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetService,
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::GetServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetService",
);
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_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::GetService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetService",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_input::Builder {
crate::input::get_service_input::Builder::default()
}
}
pub mod get_service_instance_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) service_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetServiceInstanceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetServiceInstanceInput {
name: self.name,
service_name: self.service_name,
})
}
}
}
impl GetServiceInstanceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetServiceInstance,
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::GetServiceInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetServiceInstance",
);
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_service_instance(&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::GetServiceInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServiceInstance",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_instance_input::Builder {
crate::input::get_service_instance_input::Builder::default()
}
}
pub mod get_service_template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetServiceTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetServiceTemplateInput { name: self.name })
}
}
}
impl GetServiceTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetServiceTemplate,
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::GetServiceTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetServiceTemplate",
);
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_service_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::GetServiceTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServiceTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_template_input::Builder {
crate::input::get_service_template_input::Builder::default()
}
}
pub mod get_service_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetServiceTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetServiceTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
})
}
}
}
impl GetServiceTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetServiceTemplateVersion,
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::GetServiceTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetServiceTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetServiceTemplateVersion",
);
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_service_template_version(
&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::GetServiceTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetServiceTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_service_template_version_input::Builder {
crate::input::get_service_template_version_input::Builder::default()
}
}
pub mod get_template_sync_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetTemplateSyncConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetTemplateSyncConfigInput {
template_name: self.template_name,
template_type: self.template_type,
})
}
}
}
impl GetTemplateSyncConfigInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetTemplateSyncConfig,
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::GetTemplateSyncConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTemplateSyncConfigInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetTemplateSyncConfig",
);
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_template_sync_config(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetTemplateSyncConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTemplateSyncConfig",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_template_sync_config_input::Builder {
crate::input::get_template_sync_config_input::Builder::default()
}
}
pub mod get_template_sync_status_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
pub(crate) template_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn template_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_version = Some(input.into());
self
}
pub fn set_template_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetTemplateSyncStatusInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetTemplateSyncStatusInput {
template_name: self.template_name,
template_type: self.template_type,
template_version: self.template_version,
})
}
}
}
impl GetTemplateSyncStatusInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetTemplateSyncStatus,
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::GetTemplateSyncStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTemplateSyncStatusInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.GetTemplateSyncStatus",
);
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_template_sync_status(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetTemplateSyncStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTemplateSyncStatus",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_template_sync_status_input::Builder {
crate::input::get_template_sync_status_input::Builder::default()
}
}
pub mod list_component_outputs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_name(mut self, input: impl Into<std::string::String>) -> Self {
self.component_name = Some(input.into());
self
}
pub fn set_component_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_name = 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::ListComponentOutputsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListComponentOutputsInput {
component_name: self.component_name,
next_token: self.next_token,
})
}
}
}
impl ListComponentOutputsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListComponentOutputs,
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::ListComponentOutputsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListComponentOutputsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListComponentOutputs",
);
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_component_outputs(
&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::ListComponentOutputs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListComponentOutputs",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_component_outputs_input::Builder {
crate::input::list_component_outputs_input::Builder::default()
}
}
pub mod list_component_provisioned_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_name(mut self, input: impl Into<std::string::String>) -> Self {
self.component_name = Some(input.into());
self
}
pub fn set_component_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_name = 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::ListComponentProvisionedResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListComponentProvisionedResourcesInput {
component_name: self.component_name,
next_token: self.next_token,
})
}
}
}
impl ListComponentProvisionedResourcesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListComponentProvisionedResources,
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::ListComponentProvisionedResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListComponentProvisionedResourcesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListComponentProvisionedResources",
);
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_component_provisioned_resources(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListComponentProvisionedResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListComponentProvisionedResources",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_component_provisioned_resources_input::Builder {
crate::input::list_component_provisioned_resources_input::Builder::default()
}
}
pub mod list_components_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListComponentsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListComponentsInput {
next_token: self.next_token,
environment_name: self.environment_name,
service_name: self.service_name,
service_instance_name: self.service_instance_name,
max_results: self.max_results,
})
}
}
}
impl ListComponentsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListComponents,
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::ListComponentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListComponentsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListComponents",
);
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_components(&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::ListComponents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListComponents",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_components_input::Builder {
crate::input::list_components_input::Builder::default()
}
}
pub mod list_environment_account_connections_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) requested_by:
std::option::Option<crate::model::EnvironmentAccountConnectionRequesterAccountType>,
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) statuses:
std::option::Option<std::vec::Vec<crate::model::EnvironmentAccountConnectionStatus>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn requested_by(
mut self,
input: crate::model::EnvironmentAccountConnectionRequesterAccountType,
) -> Self {
self.requested_by = Some(input);
self
}
pub fn set_requested_by(
mut self,
input: std::option::Option<
crate::model::EnvironmentAccountConnectionRequesterAccountType,
>,
) -> Self {
self.requested_by = input;
self
}
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = input;
self
}
pub fn statuses(mut self, input: crate::model::EnvironmentAccountConnectionStatus) -> Self {
let mut v = self.statuses.unwrap_or_default();
v.push(input);
self.statuses = Some(v);
self
}
pub fn set_statuses(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::EnvironmentAccountConnectionStatus>,
>,
) -> Self {
self.statuses = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEnvironmentAccountConnectionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentAccountConnectionsInput {
requested_by: self.requested_by,
environment_name: self.environment_name,
statuses: self.statuses,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListEnvironmentAccountConnectionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironmentAccountConnections,
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::ListEnvironmentAccountConnectionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentAccountConnectionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironmentAccountConnections",
);
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_environment_account_connections(&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::ListEnvironmentAccountConnections::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironmentAccountConnections",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environment_account_connections_input::Builder {
crate::input::list_environment_account_connections_input::Builder::default()
}
}
pub mod list_environment_outputs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = 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::ListEnvironmentOutputsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentOutputsInput {
environment_name: self.environment_name,
next_token: self.next_token,
})
}
}
}
impl ListEnvironmentOutputsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironmentOutputs,
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::ListEnvironmentOutputsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentOutputsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironmentOutputs",
);
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_environment_outputs(
&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::ListEnvironmentOutputs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironmentOutputs",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environment_outputs_input::Builder {
crate::input::list_environment_outputs_input::Builder::default()
}
}
pub mod list_environment_provisioned_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) environment_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn environment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.environment_name = Some(input.into());
self
}
pub fn set_environment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_name = 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::ListEnvironmentProvisionedResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentProvisionedResourcesInput {
environment_name: self.environment_name,
next_token: self.next_token,
})
}
}
}
impl ListEnvironmentProvisionedResourcesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironmentProvisionedResources,
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::ListEnvironmentProvisionedResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentProvisionedResourcesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironmentProvisionedResources",
);
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_environment_provisioned_resources(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEnvironmentProvisionedResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironmentProvisionedResources",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environment_provisioned_resources_input::Builder {
crate::input::list_environment_provisioned_resources_input::Builder::default()
}
}
pub mod list_environments_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) environment_templates:
std::option::Option<std::vec::Vec<crate::model::EnvironmentTemplateFilter>>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn environment_templates(
mut self,
input: crate::model::EnvironmentTemplateFilter,
) -> Self {
let mut v = self.environment_templates.unwrap_or_default();
v.push(input);
self.environment_templates = Some(v);
self
}
pub fn set_environment_templates(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::EnvironmentTemplateFilter>>,
) -> Self {
self.environment_templates = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEnvironmentsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentsInput {
next_token: self.next_token,
max_results: self.max_results,
environment_templates: self.environment_templates,
})
}
}
}
impl ListEnvironmentsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironments,
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::ListEnvironmentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironments",
);
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_environments(&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::ListEnvironments::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironments",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environments_input::Builder {
crate::input::list_environments_input::Builder::default()
}
}
pub mod list_environment_templates_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEnvironmentTemplatesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentTemplatesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListEnvironmentTemplatesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironmentTemplates,
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::ListEnvironmentTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironmentTemplates",
);
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_environment_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::ListEnvironmentTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironmentTemplates",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environment_templates_input::Builder {
crate::input::list_environment_templates_input::Builder::default()
}
}
pub mod list_environment_template_versions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEnvironmentTemplateVersionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEnvironmentTemplateVersionsInput {
next_token: self.next_token,
max_results: self.max_results,
template_name: self.template_name,
major_version: self.major_version,
})
}
}
}
impl ListEnvironmentTemplateVersionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListEnvironmentTemplateVersions,
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::ListEnvironmentTemplateVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEnvironmentTemplateVersionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListEnvironmentTemplateVersions",
);
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_environment_template_versions(&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::ListEnvironmentTemplateVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEnvironmentTemplateVersions",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_environment_template_versions_input::Builder {
crate::input::list_environment_template_versions_input::Builder::default()
}
}
pub mod list_repositories_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListRepositoriesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListRepositoriesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListRepositoriesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListRepositories,
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::ListRepositoriesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRepositoriesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListRepositories",
);
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_repositories(&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::ListRepositories::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRepositories",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_repositories_input::Builder {
crate::input::list_repositories_input::Builder::default()
}
}
pub mod list_repository_sync_definitions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) repository_provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) sync_type: std::option::Option<crate::model::SyncType>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn repository_provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.repository_provider = Some(input);
self
}
pub fn set_repository_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.repository_provider = input;
self
}
pub fn sync_type(mut self, input: crate::model::SyncType) -> Self {
self.sync_type = Some(input);
self
}
pub fn set_sync_type(mut self, input: std::option::Option<crate::model::SyncType>) -> Self {
self.sync_type = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListRepositorySyncDefinitionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListRepositorySyncDefinitionsInput {
repository_name: self.repository_name,
repository_provider: self.repository_provider,
sync_type: self.sync_type,
next_token: self.next_token,
})
}
}
}
impl ListRepositorySyncDefinitionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListRepositorySyncDefinitions,
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::ListRepositorySyncDefinitionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRepositorySyncDefinitionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListRepositorySyncDefinitions",
);
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_repository_sync_definitions(&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::ListRepositorySyncDefinitions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRepositorySyncDefinitions",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_repository_sync_definitions_input::Builder {
crate::input::list_repository_sync_definitions_input::Builder::default()
}
}
pub mod list_service_instance_outputs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = 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::ListServiceInstanceOutputsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceInstanceOutputsInput {
service_instance_name: self.service_instance_name,
service_name: self.service_name,
next_token: self.next_token,
})
}
}
}
impl ListServiceInstanceOutputsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceInstanceOutputs,
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::ListServiceInstanceOutputsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceInstanceOutputsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServiceInstanceOutputs",
);
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_service_instance_outputs(&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::ListServiceInstanceOutputs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceInstanceOutputs",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_instance_outputs_input::Builder {
crate::input::list_service_instance_outputs_input::Builder::default()
}
}
pub mod list_service_instance_provisioned_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = 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::ListServiceInstanceProvisionedResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceInstanceProvisionedResourcesInput {
service_name: self.service_name,
service_instance_name: self.service_instance_name,
next_token: self.next_token,
})
}
}
}
impl ListServiceInstanceProvisionedResourcesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceInstanceProvisionedResources,
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::ListServiceInstanceProvisionedResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceInstanceProvisionedResourcesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServiceInstanceProvisionedResources",
);
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_service_instance_provisioned_resources(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListServiceInstanceProvisionedResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceInstanceProvisionedResources",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_instance_provisioned_resources_input::Builder {
crate::input::list_service_instance_provisioned_resources_input::Builder::default()
}
}
pub mod list_service_instances_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) filters:
std::option::Option<std::vec::Vec<crate::model::ListServiceInstancesFilter>>,
pub(crate) sort_by: std::option::Option<crate::model::ListServiceInstancesSortBy>,
pub(crate) sort_order: std::option::Option<crate::model::SortOrder>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn filters(mut self, input: crate::model::ListServiceInstancesFilter) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input);
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ListServiceInstancesFilter>>,
) -> Self {
self.filters = input;
self
}
pub fn sort_by(mut self, input: crate::model::ListServiceInstancesSortBy) -> Self {
self.sort_by = Some(input);
self
}
pub fn set_sort_by(
mut self,
input: std::option::Option<crate::model::ListServiceInstancesSortBy>,
) -> Self {
self.sort_by = input;
self
}
pub fn sort_order(mut self, input: crate::model::SortOrder) -> Self {
self.sort_order = Some(input);
self
}
pub fn set_sort_order(
mut self,
input: std::option::Option<crate::model::SortOrder>,
) -> Self {
self.sort_order = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListServiceInstancesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceInstancesInput {
service_name: self.service_name,
next_token: self.next_token,
max_results: self.max_results,
filters: self.filters,
sort_by: self.sort_by,
sort_order: self.sort_order,
})
}
}
}
impl ListServiceInstancesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceInstances,
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::ListServiceInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServiceInstances",
);
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_service_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::ListServiceInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceInstances",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_instances_input::Builder {
crate::input::list_service_instances_input::Builder::default()
}
}
pub mod list_service_pipeline_outputs_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = 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::ListServicePipelineOutputsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServicePipelineOutputsInput {
service_name: self.service_name,
next_token: self.next_token,
})
}
}
}
impl ListServicePipelineOutputsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServicePipelineOutputs,
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::ListServicePipelineOutputsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServicePipelineOutputsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServicePipelineOutputs",
);
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_service_pipeline_outputs(&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::ListServicePipelineOutputs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServicePipelineOutputs",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_pipeline_outputs_input::Builder {
crate::input::list_service_pipeline_outputs_input::Builder::default()
}
}
pub mod list_service_pipeline_provisioned_resources_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = 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::ListServicePipelineProvisionedResourcesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServicePipelineProvisionedResourcesInput {
service_name: self.service_name,
next_token: self.next_token,
})
}
}
}
impl ListServicePipelineProvisionedResourcesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServicePipelineProvisionedResources,
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::ListServicePipelineProvisionedResourcesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServicePipelineProvisionedResourcesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServicePipelineProvisionedResources",
);
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_service_pipeline_provisioned_resources(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListServicePipelineProvisionedResources::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServicePipelineProvisionedResources",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_pipeline_provisioned_resources_input::Builder {
crate::input::list_service_pipeline_provisioned_resources_input::Builder::default()
}
}
pub mod list_services_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListServicesInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListServicesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListServicesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServices,
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::ListServicesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServicesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServices",
);
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_services(&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::ListServices::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServices",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_services_input::Builder {
crate::input::list_services_input::Builder::default()
}
}
pub mod list_service_templates_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListServiceTemplatesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceTemplatesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListServiceTemplatesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceTemplates,
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::ListServiceTemplatesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceTemplatesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServiceTemplates",
);
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_service_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::ListServiceTemplates::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceTemplates",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_templates_input::Builder {
crate::input::list_service_templates_input::Builder::default()
}
}
pub mod list_service_template_versions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListServiceTemplateVersionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListServiceTemplateVersionsInput {
next_token: self.next_token,
max_results: self.max_results,
template_name: self.template_name,
major_version: self.major_version,
})
}
}
}
impl ListServiceTemplateVersionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListServiceTemplateVersions,
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::ListServiceTemplateVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListServiceTemplateVersionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListServiceTemplateVersions",
);
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_service_template_versions(&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::ListServiceTemplateVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListServiceTemplateVersions",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_service_template_versions_input::Builder {
crate::input::list_service_template_versions_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
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 next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.ListTagsForResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_tags_for_resource(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"proton",
));
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 notify_resource_deployment_status_change_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) status: std::option::Option<crate::model::ResourceDeploymentStatus>,
pub(crate) outputs: std::option::Option<std::vec::Vec<crate::model::Output>>,
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) status_message: 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 status(mut self, input: crate::model::ResourceDeploymentStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ResourceDeploymentStatus>,
) -> Self {
self.status = input;
self
}
pub fn outputs(mut self, input: crate::model::Output) -> Self {
let mut v = self.outputs.unwrap_or_default();
v.push(input);
self.outputs = Some(v);
self
}
pub fn set_outputs(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Output>>,
) -> Self {
self.outputs = input;
self
}
pub fn deployment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_id = Some(input.into());
self
}
pub fn set_deployment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_id = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::NotifyResourceDeploymentStatusChangeInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::NotifyResourceDeploymentStatusChangeInput {
resource_arn: self.resource_arn,
status: self.status,
outputs: self.outputs,
deployment_id: self.deployment_id,
status_message: self.status_message,
})
}
}
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("status", &self.status);
formatter.field("outputs", &self.outputs);
formatter.field("deployment_id", &self.deployment_id);
formatter.field("status_message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl NotifyResourceDeploymentStatusChangeInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::NotifyResourceDeploymentStatusChange,
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::NotifyResourceDeploymentStatusChangeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::NotifyResourceDeploymentStatusChangeInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.NotifyResourceDeploymentStatusChange",
);
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_notify_resource_deployment_status_change(&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::NotifyResourceDeploymentStatusChange::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"NotifyResourceDeploymentStatusChange",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::notify_resource_deployment_status_change_input::Builder {
crate::input::notify_resource_deployment_status_change_input::Builder::default()
}
}
pub mod reject_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::RejectEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::RejectEnvironmentAccountConnectionInput { id: self.id })
}
}
}
impl RejectEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::RejectEnvironmentAccountConnection,
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::RejectEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RejectEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.RejectEnvironmentAccountConnection",
);
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_reject_environment_account_connection(&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::RejectEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RejectEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::reject_environment_account_connection_input::Builder {
crate::input::reject_environment_account_connection_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.TagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UntagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"proton",
));
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_account_settings_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) pipeline_service_role_arn: std::option::Option<std::string::String>,
pub(crate) pipeline_provisioning_repository:
std::option::Option<crate::model::RepositoryBranchInput>,
pub(crate) delete_pipeline_provisioning_repository: std::option::Option<bool>,
pub(crate) pipeline_codebuild_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn pipeline_service_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.pipeline_service_role_arn = Some(input.into());
self
}
pub fn set_pipeline_service_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pipeline_service_role_arn = input;
self
}
pub fn pipeline_provisioning_repository(
mut self,
input: crate::model::RepositoryBranchInput,
) -> Self {
self.pipeline_provisioning_repository = Some(input);
self
}
pub fn set_pipeline_provisioning_repository(
mut self,
input: std::option::Option<crate::model::RepositoryBranchInput>,
) -> Self {
self.pipeline_provisioning_repository = input;
self
}
pub fn delete_pipeline_provisioning_repository(mut self, input: bool) -> Self {
self.delete_pipeline_provisioning_repository = Some(input);
self
}
pub fn set_delete_pipeline_provisioning_repository(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.delete_pipeline_provisioning_repository = input;
self
}
pub fn pipeline_codebuild_role_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.pipeline_codebuild_role_arn = Some(input.into());
self
}
pub fn set_pipeline_codebuild_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.pipeline_codebuild_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateAccountSettingsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateAccountSettingsInput {
pipeline_service_role_arn: self.pipeline_service_role_arn,
pipeline_provisioning_repository: self.pipeline_provisioning_repository,
delete_pipeline_provisioning_repository: self
.delete_pipeline_provisioning_repository,
pipeline_codebuild_role_arn: self.pipeline_codebuild_role_arn,
})
}
}
}
impl UpdateAccountSettingsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateAccountSettings,
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::UpdateAccountSettingsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAccountSettingsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateAccountSettings",
);
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_account_settings(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
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::UpdateAccountSettings::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAccountSettings",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_account_settings_input::Builder {
crate::input::update_account_settings_input::Builder::default()
}
}
pub mod update_component_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) deployment_type:
std::option::Option<crate::model::ComponentDeploymentUpdateType>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) service_instance_name: std::option::Option<std::string::String>,
pub(crate) service_spec: std::option::Option<std::string::String>,
pub(crate) template_file: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn deployment_type(
mut self,
input: crate::model::ComponentDeploymentUpdateType,
) -> Self {
self.deployment_type = Some(input);
self
}
pub fn set_deployment_type(
mut self,
input: std::option::Option<crate::model::ComponentDeploymentUpdateType>,
) -> Self {
self.deployment_type = 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 service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn service_instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_instance_name = Some(input.into());
self
}
pub fn set_service_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_instance_name = input;
self
}
pub fn service_spec(mut self, input: impl Into<std::string::String>) -> Self {
self.service_spec = Some(input.into());
self
}
pub fn set_service_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_spec = input;
self
}
pub fn template_file(mut self, input: impl Into<std::string::String>) -> Self {
self.template_file = Some(input.into());
self
}
pub fn set_template_file(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_file = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateComponentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateComponentInput {
name: self.name,
deployment_type: self.deployment_type,
description: self.description,
service_name: self.service_name,
service_instance_name: self.service_instance_name,
service_spec: self.service_spec,
template_file: self.template_file,
})
}
}
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("deployment_type", &self.deployment_type);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("service_name", &self.service_name);
formatter.field("service_instance_name", &self.service_instance_name);
formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_file", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateComponent,
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::UpdateComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateComponent",
);
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_component(&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::UpdateComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateComponent",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_component_input::Builder {
crate::input::update_component_input::Builder::default()
}
}
pub mod update_environment_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) spec: std::option::Option<std::string::String>,
pub(crate) template_major_version: std::option::Option<std::string::String>,
pub(crate) template_minor_version: std::option::Option<std::string::String>,
pub(crate) proton_service_role_arn: std::option::Option<std::string::String>,
pub(crate) deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
pub(crate) environment_account_connection_id: std::option::Option<std::string::String>,
pub(crate) provisioning_repository:
std::option::Option<crate::model::RepositoryBranchInput>,
pub(crate) component_role_arn: std::option::Option<std::string::String>,
pub(crate) codebuild_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn 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 spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn template_major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_major_version = Some(input.into());
self
}
pub fn set_template_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_major_version = input;
self
}
pub fn template_minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_minor_version = Some(input.into());
self
}
pub fn set_template_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_minor_version = input;
self
}
pub fn proton_service_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.proton_service_role_arn = Some(input.into());
self
}
pub fn set_proton_service_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.proton_service_role_arn = input;
self
}
pub fn deployment_type(mut self, input: crate::model::DeploymentUpdateType) -> Self {
self.deployment_type = Some(input);
self
}
pub fn set_deployment_type(
mut self,
input: std::option::Option<crate::model::DeploymentUpdateType>,
) -> Self {
self.deployment_type = input;
self
}
pub fn environment_account_connection_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.environment_account_connection_id = Some(input.into());
self
}
pub fn set_environment_account_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.environment_account_connection_id = input;
self
}
pub fn provisioning_repository(
mut self,
input: crate::model::RepositoryBranchInput,
) -> Self {
self.provisioning_repository = Some(input);
self
}
pub fn set_provisioning_repository(
mut self,
input: std::option::Option<crate::model::RepositoryBranchInput>,
) -> Self {
self.provisioning_repository = input;
self
}
pub fn component_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_role_arn = Some(input.into());
self
}
pub fn set_component_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_role_arn = input;
self
}
pub fn codebuild_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.codebuild_role_arn = Some(input.into());
self
}
pub fn set_codebuild_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.codebuild_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateEnvironmentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateEnvironmentInput {
name: self.name,
description: self.description,
spec: self.spec,
template_major_version: self.template_major_version,
template_minor_version: self.template_minor_version,
proton_service_role_arn: self.proton_service_role_arn,
deployment_type: self.deployment_type,
environment_account_connection_id: self.environment_account_connection_id,
provisioning_repository: self.provisioning_repository,
component_role_arn: self.component_role_arn,
codebuild_role_arn: self.codebuild_role_arn,
})
}
}
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", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
formatter.field("deployment_type", &self.deployment_type);
formatter.field(
"environment_account_connection_id",
&self.environment_account_connection_id,
);
formatter.field("provisioning_repository", &self.provisioning_repository);
formatter.field("component_role_arn", &self.component_role_arn);
formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
formatter.finish()
}
}
}
impl UpdateEnvironmentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateEnvironment,
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::UpdateEnvironmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateEnvironmentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateEnvironment",
);
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_environment(&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::UpdateEnvironment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEnvironment",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_environment_input::Builder {
crate::input::update_environment_input::Builder::default()
}
}
pub mod update_environment_account_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) component_role_arn: std::option::Option<std::string::String>,
pub(crate) codebuild_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn component_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_role_arn = Some(input.into());
self
}
pub fn set_component_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_role_arn = input;
self
}
pub fn codebuild_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.codebuild_role_arn = Some(input.into());
self
}
pub fn set_codebuild_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.codebuild_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateEnvironmentAccountConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateEnvironmentAccountConnectionInput {
id: self.id,
role_arn: self.role_arn,
component_role_arn: self.component_role_arn,
codebuild_role_arn: self.codebuild_role_arn,
})
}
}
}
impl UpdateEnvironmentAccountConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateEnvironmentAccountConnection,
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::UpdateEnvironmentAccountConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateEnvironmentAccountConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateEnvironmentAccountConnection",
);
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_environment_account_connection(&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::UpdateEnvironmentAccountConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEnvironmentAccountConnection",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_environment_account_connection_input::Builder {
crate::input::update_environment_account_connection_input::Builder::default()
}
}
pub mod update_environment_template_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) display_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_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::UpdateEnvironmentTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateEnvironmentTemplateInput {
name: self.name,
display_name: self.display_name,
description: self.description,
})
}
}
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("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateEnvironmentTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateEnvironmentTemplate,
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::UpdateEnvironmentTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateEnvironmentTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateEnvironmentTemplate",
);
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_environment_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::UpdateEnvironmentTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEnvironmentTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_environment_template_input::Builder {
crate::input::update_environment_template_input::Builder::default()
}
}
pub mod update_environment_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::TemplateVersionStatus>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = 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 status(mut self, input: crate::model::TemplateVersionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::TemplateVersionStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateEnvironmentTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateEnvironmentTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
description: self.description,
status: self.status,
})
}
}
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("template_name", &self.template_name);
formatter.field("major_version", &self.major_version);
formatter.field("minor_version", &self.minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("status", &self.status);
formatter.finish()
}
}
}
impl UpdateEnvironmentTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateEnvironmentTemplateVersion,
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::UpdateEnvironmentTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateEnvironmentTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateEnvironmentTemplateVersion",
);
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_environment_template_version(&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::UpdateEnvironmentTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEnvironmentTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_environment_template_version_input::Builder {
crate::input::update_environment_template_version_input::Builder::default()
}
}
pub mod update_service_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) spec: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateServiceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateServiceInput {
name: self.name,
description: self.description,
spec: self.spec,
})
}
}
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", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateServiceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateService,
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::UpdateServiceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateServiceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateService",
);
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_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::UpdateService::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateService",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_service_input::Builder {
crate::input::update_service_input::Builder::default()
}
}
pub mod update_service_instance_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) service_name: std::option::Option<std::string::String>,
pub(crate) deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
pub(crate) spec: std::option::Option<std::string::String>,
pub(crate) template_major_version: std::option::Option<std::string::String>,
pub(crate) template_minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn deployment_type(mut self, input: crate::model::DeploymentUpdateType) -> Self {
self.deployment_type = Some(input);
self
}
pub fn set_deployment_type(
mut self,
input: std::option::Option<crate::model::DeploymentUpdateType>,
) -> Self {
self.deployment_type = input;
self
}
pub fn spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn template_major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_major_version = Some(input.into());
self
}
pub fn set_template_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_major_version = input;
self
}
pub fn template_minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_minor_version = Some(input.into());
self
}
pub fn set_template_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateServiceInstanceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateServiceInstanceInput {
name: self.name,
service_name: self.service_name,
deployment_type: self.deployment_type,
spec: self.spec,
template_major_version: self.template_major_version,
template_minor_version: self.template_minor_version,
})
}
}
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("service_name", &self.service_name);
formatter.field("deployment_type", &self.deployment_type);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.finish()
}
}
}
impl UpdateServiceInstanceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateServiceInstance,
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::UpdateServiceInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateServiceInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateServiceInstance",
);
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_service_instance(
&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::UpdateServiceInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateServiceInstance",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_service_instance_input::Builder {
crate::input::update_service_instance_input::Builder::default()
}
}
pub mod update_service_pipeline_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) service_name: std::option::Option<std::string::String>,
pub(crate) spec: std::option::Option<std::string::String>,
pub(crate) deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
pub(crate) template_major_version: std::option::Option<std::string::String>,
pub(crate) template_minor_version: std::option::Option<std::string::String>,
}
impl Builder {
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.service_name = Some(input.into());
self
}
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_name = input;
self
}
pub fn spec(mut self, input: impl Into<std::string::String>) -> Self {
self.spec = Some(input.into());
self
}
pub fn set_spec(mut self, input: std::option::Option<std::string::String>) -> Self {
self.spec = input;
self
}
pub fn deployment_type(mut self, input: crate::model::DeploymentUpdateType) -> Self {
self.deployment_type = Some(input);
self
}
pub fn set_deployment_type(
mut self,
input: std::option::Option<crate::model::DeploymentUpdateType>,
) -> Self {
self.deployment_type = input;
self
}
pub fn template_major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_major_version = Some(input.into());
self
}
pub fn set_template_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_major_version = input;
self
}
pub fn template_minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.template_minor_version = Some(input.into());
self
}
pub fn set_template_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_minor_version = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateServicePipelineInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateServicePipelineInput {
service_name: self.service_name,
spec: self.spec,
deployment_type: self.deployment_type,
template_major_version: self.template_major_version,
template_minor_version: self.template_minor_version,
})
}
}
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("service_name", &self.service_name);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("deployment_type", &self.deployment_type);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.finish()
}
}
}
impl UpdateServicePipelineInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateServicePipeline,
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::UpdateServicePipelineInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateServicePipelineInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateServicePipeline",
);
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_service_pipeline(
&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::UpdateServicePipeline::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateServicePipeline",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_service_pipeline_input::Builder {
crate::input::update_service_pipeline_input::Builder::default()
}
}
pub mod update_service_template_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) display_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_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::UpdateServiceTemplateInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateServiceTemplateInput {
name: self.name,
display_name: self.display_name,
description: self.description,
})
}
}
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("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl UpdateServiceTemplateInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateServiceTemplate,
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::UpdateServiceTemplateInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateServiceTemplateInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateServiceTemplate",
);
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_service_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::UpdateServiceTemplate::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateServiceTemplate",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_service_template_input::Builder {
crate::input::update_service_template_input::Builder::default()
}
}
pub mod update_service_template_version_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) major_version: std::option::Option<std::string::String>,
pub(crate) minor_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::TemplateVersionStatus>,
pub(crate) compatible_environment_templates:
std::option::Option<std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>>,
pub(crate) supported_component_sources: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn major_version(mut self, input: impl Into<std::string::String>) -> Self {
self.major_version = Some(input.into());
self
}
pub fn set_major_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.major_version = input;
self
}
pub fn minor_version(mut self, input: impl Into<std::string::String>) -> Self {
self.minor_version = Some(input.into());
self
}
pub fn set_minor_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.minor_version = 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 status(mut self, input: crate::model::TemplateVersionStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::TemplateVersionStatus>,
) -> Self {
self.status = input;
self
}
pub fn compatible_environment_templates(
mut self,
input: crate::model::CompatibleEnvironmentTemplateInput,
) -> Self {
let mut v = self.compatible_environment_templates.unwrap_or_default();
v.push(input);
self.compatible_environment_templates = Some(v);
self
}
pub fn set_compatible_environment_templates(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>,
>,
) -> Self {
self.compatible_environment_templates = input;
self
}
pub fn supported_component_sources(
mut self,
input: crate::model::ServiceTemplateSupportedComponentSourceType,
) -> Self {
let mut v = self.supported_component_sources.unwrap_or_default();
v.push(input);
self.supported_component_sources = Some(v);
self
}
pub fn set_supported_component_sources(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
) -> Self {
self.supported_component_sources = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateServiceTemplateVersionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateServiceTemplateVersionInput {
template_name: self.template_name,
major_version: self.major_version,
minor_version: self.minor_version,
description: self.description,
status: self.status,
compatible_environment_templates: self.compatible_environment_templates,
supported_component_sources: self.supported_component_sources,
})
}
}
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("template_name", &self.template_name);
formatter.field("major_version", &self.major_version);
formatter.field("minor_version", &self.minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("status", &self.status);
formatter.field(
"compatible_environment_templates",
&self.compatible_environment_templates,
);
formatter.field(
"supported_component_sources",
&self.supported_component_sources,
);
formatter.finish()
}
}
}
impl UpdateServiceTemplateVersionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateServiceTemplateVersion,
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::UpdateServiceTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateServiceTemplateVersionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateServiceTemplateVersion",
);
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_service_template_version(&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::UpdateServiceTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateServiceTemplateVersion",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_service_template_version_input::Builder {
crate::input::update_service_template_version_input::Builder::default()
}
}
pub mod update_template_sync_config_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) template_name: std::option::Option<std::string::String>,
pub(crate) template_type: std::option::Option<crate::model::TemplateType>,
pub(crate) repository_provider: std::option::Option<crate::model::RepositoryProvider>,
pub(crate) repository_name: std::option::Option<std::string::String>,
pub(crate) branch: std::option::Option<std::string::String>,
pub(crate) subdirectory: std::option::Option<std::string::String>,
}
impl Builder {
pub fn template_name(mut self, input: impl Into<std::string::String>) -> Self {
self.template_name = Some(input.into());
self
}
pub fn set_template_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.template_name = input;
self
}
pub fn template_type(mut self, input: crate::model::TemplateType) -> Self {
self.template_type = Some(input);
self
}
pub fn set_template_type(
mut self,
input: std::option::Option<crate::model::TemplateType>,
) -> Self {
self.template_type = input;
self
}
pub fn repository_provider(mut self, input: crate::model::RepositoryProvider) -> Self {
self.repository_provider = Some(input);
self
}
pub fn set_repository_provider(
mut self,
input: std::option::Option<crate::model::RepositoryProvider>,
) -> Self {
self.repository_provider = input;
self
}
pub fn repository_name(mut self, input: impl Into<std::string::String>) -> Self {
self.repository_name = Some(input.into());
self
}
pub fn set_repository_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.repository_name = input;
self
}
pub fn branch(mut self, input: impl Into<std::string::String>) -> Self {
self.branch = Some(input.into());
self
}
pub fn set_branch(mut self, input: std::option::Option<std::string::String>) -> Self {
self.branch = input;
self
}
pub fn subdirectory(mut self, input: impl Into<std::string::String>) -> Self {
self.subdirectory = Some(input.into());
self
}
pub fn set_subdirectory(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subdirectory = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateTemplateSyncConfigInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateTemplateSyncConfigInput {
template_name: self.template_name,
template_type: self.template_type,
repository_provider: self.repository_provider,
repository_name: self.repository_name,
branch: self.branch,
subdirectory: self.subdirectory,
})
}
}
}
impl UpdateTemplateSyncConfigInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateTemplateSyncConfig,
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::UpdateTemplateSyncConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateTemplateSyncConfigInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AwsProton20200720.UpdateTemplateSyncConfig",
);
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_template_sync_config(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateTemplateSyncConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateTemplateSyncConfig",
"proton",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_template_sync_config_input::Builder {
crate::input::update_template_sync_config_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTemplateSyncConfigInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_type: std::option::Option<crate::model::TemplateType>,
#[doc(hidden)]
pub repository_provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub repository_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub branch: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subdirectory: std::option::Option<std::string::String>,
}
impl CreateTemplateSyncConfigInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
pub fn repository_provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.repository_provider.as_ref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch(&self) -> std::option::Option<&str> {
self.branch.as_deref()
}
pub fn subdirectory(&self) -> std::option::Option<&str> {
self.subdirectory.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteTemplateSyncConfigInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_type: std::option::Option<crate::model::TemplateType>,
}
impl DeleteTemplateSyncConfigInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateTemplateSyncConfigInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_type: std::option::Option<crate::model::TemplateType>,
#[doc(hidden)]
pub repository_provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub repository_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub branch: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subdirectory: std::option::Option<std::string::String>,
}
impl UpdateTemplateSyncConfigInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
pub fn repository_provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.repository_provider.as_ref()
}
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn branch(&self) -> std::option::Option<&str> {
self.branch.as_deref()
}
pub fn subdirectory(&self) -> std::option::Option<&str> {
self.subdirectory.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTemplateSyncConfigInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_type: std::option::Option<crate::model::TemplateType>,
}
impl GetTemplateSyncConfigInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceTemplateVersionsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
}
impl ListServiceTemplateVersionsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateServiceTemplateVersionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source: std::option::Option<crate::model::TemplateVersionSourceInput>,
#[doc(hidden)]
pub compatible_environment_templates:
std::option::Option<std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub supported_component_sources: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
}
impl CreateServiceTemplateVersionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn source(&self) -> std::option::Option<&crate::model::TemplateVersionSourceInput> {
self.source.as_ref()
}
pub fn compatible_environment_templates(
&self,
) -> std::option::Option<&[crate::model::CompatibleEnvironmentTemplateInput]> {
self.compatible_environment_templates.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn supported_component_sources(
&self,
) -> std::option::Option<&[crate::model::ServiceTemplateSupportedComponentSourceType]> {
self.supported_component_sources.as_deref()
}
}
impl std::fmt::Debug for CreateServiceTemplateVersionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateServiceTemplateVersionInput");
formatter.field("client_token", &self.client_token);
formatter.field("template_name", &self.template_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("major_version", &self.major_version);
formatter.field("source", &self.source);
formatter.field(
"compatible_environment_templates",
&self.compatible_environment_templates,
);
formatter.field("tags", &self.tags);
formatter.field(
"supported_component_sources",
&self.supported_component_sources,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteServiceTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
}
impl DeleteServiceTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateServiceTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::TemplateVersionStatus>,
#[doc(hidden)]
pub compatible_environment_templates:
std::option::Option<std::vec::Vec<crate::model::CompatibleEnvironmentTemplateInput>>,
#[doc(hidden)]
pub supported_component_sources: std::option::Option<
std::vec::Vec<crate::model::ServiceTemplateSupportedComponentSourceType>,
>,
}
impl UpdateServiceTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::TemplateVersionStatus> {
self.status.as_ref()
}
pub fn compatible_environment_templates(
&self,
) -> std::option::Option<&[crate::model::CompatibleEnvironmentTemplateInput]> {
self.compatible_environment_templates.as_deref()
}
pub fn supported_component_sources(
&self,
) -> std::option::Option<&[crate::model::ServiceTemplateSupportedComponentSourceType]> {
self.supported_component_sources.as_deref()
}
}
impl std::fmt::Debug for UpdateServiceTemplateVersionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServiceTemplateVersionInput");
formatter.field("template_name", &self.template_name);
formatter.field("major_version", &self.major_version);
formatter.field("minor_version", &self.minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("status", &self.status);
formatter.field(
"compatible_environment_templates",
&self.compatible_environment_templates,
);
formatter.field(
"supported_component_sources",
&self.supported_component_sources,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
}
impl GetServiceTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceTemplatesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListServiceTemplatesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateServiceTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub encryption_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub pipeline_provisioning: std::option::Option<crate::model::Provisioning>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateServiceTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn encryption_key(&self) -> std::option::Option<&str> {
self.encryption_key.as_deref()
}
pub fn pipeline_provisioning(&self) -> std::option::Option<&crate::model::Provisioning> {
self.pipeline_provisioning.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateServiceTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateServiceTemplateInput");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("encryption_key", &self.encryption_key);
formatter.field("pipeline_provisioning", &self.pipeline_provisioning);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteServiceTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteServiceTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateServiceTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateServiceTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
impl std::fmt::Debug for UpdateServiceTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServiceTemplateInput");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetServiceTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServicesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListServicesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateServiceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_minor_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub repository_connection_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub repository_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub branch_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateServiceInput {
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 template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_major_version(&self) -> std::option::Option<&str> {
self.template_major_version.as_deref()
}
pub fn template_minor_version(&self) -> std::option::Option<&str> {
self.template_minor_version.as_deref()
}
pub fn spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
pub fn repository_connection_arn(&self) -> std::option::Option<&str> {
self.repository_connection_arn.as_deref()
}
pub fn repository_id(&self) -> std::option::Option<&str> {
self.repository_id.as_deref()
}
pub fn branch_name(&self) -> std::option::Option<&str> {
self.branch_name.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateServiceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateServiceInput");
formatter.field("name", &self.name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("template_name", &self.template_name);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("repository_connection_arn", &self.repository_connection_arn);
formatter.field("repository_id", &self.repository_id);
formatter.field("branch_name", &self.branch_name);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteServiceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteServiceInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateServiceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
}
impl UpdateServiceInput {
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 spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
}
impl std::fmt::Debug for UpdateServiceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServiceInput");
formatter.field("name", &self.name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetServiceInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateServicePipelineInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
#[doc(hidden)]
pub template_major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_minor_version: std::option::Option<std::string::String>,
}
impl UpdateServicePipelineInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
pub fn deployment_type(&self) -> std::option::Option<&crate::model::DeploymentUpdateType> {
self.deployment_type.as_ref()
}
pub fn template_major_version(&self) -> std::option::Option<&str> {
self.template_major_version.as_deref()
}
pub fn template_minor_version(&self) -> std::option::Option<&str> {
self.template_minor_version.as_deref()
}
}
impl std::fmt::Debug for UpdateServicePipelineInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServicePipelineInput");
formatter.field("service_name", &self.service_name);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("deployment_type", &self.deployment_type);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServicePipelineProvisionedResourcesInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListServicePipelineProvisionedResourcesInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServicePipelineOutputsInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListServicePipelineOutputsInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceInstancesInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub filters: std::option::Option<std::vec::Vec<crate::model::ListServiceInstancesFilter>>,
#[doc(hidden)]
pub sort_by: std::option::Option<crate::model::ListServiceInstancesSortBy>,
#[doc(hidden)]
pub sort_order: std::option::Option<crate::model::SortOrder>,
}
impl ListServiceInstancesInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn filters(&self) -> std::option::Option<&[crate::model::ListServiceInstancesFilter]> {
self.filters.as_deref()
}
pub fn sort_by(&self) -> std::option::Option<&crate::model::ListServiceInstancesSortBy> {
self.sort_by.as_ref()
}
pub fn sort_order(&self) -> std::option::Option<&crate::model::SortOrder> {
self.sort_order.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateServiceInstanceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_minor_version: std::option::Option<std::string::String>,
}
impl UpdateServiceInstanceInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn deployment_type(&self) -> std::option::Option<&crate::model::DeploymentUpdateType> {
self.deployment_type.as_ref()
}
pub fn spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
pub fn template_major_version(&self) -> std::option::Option<&str> {
self.template_major_version.as_deref()
}
pub fn template_minor_version(&self) -> std::option::Option<&str> {
self.template_minor_version.as_deref()
}
}
impl std::fmt::Debug for UpdateServiceInstanceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServiceInstanceInput");
formatter.field("name", &self.name);
formatter.field("service_name", &self.service_name);
formatter.field("deployment_type", &self.deployment_type);
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceInstanceInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
}
impl GetServiceInstanceInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceInstanceProvisionedResourcesInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListServiceInstanceProvisionedResourcesInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListServiceInstanceOutputsInput {
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListServiceInstanceOutputsInput {
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListRepositoriesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListRepositoriesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateRepositoryInput {
#[doc(hidden)]
pub provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub encryption_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateRepositoryInput {
pub fn provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.provider.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn connection_arn(&self) -> std::option::Option<&str> {
self.connection_arn.as_deref()
}
pub fn encryption_key(&self) -> std::option::Option<&str> {
self.encryption_key.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRepositoryInput {
#[doc(hidden)]
pub provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteRepositoryInput {
pub fn provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.provider.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetRepositoryInput {
#[doc(hidden)]
pub provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetRepositoryInput {
pub fn provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.provider.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentTemplateVersionsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
}
impl ListEnvironmentTemplateVersionsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEnvironmentTemplateVersionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub source: std::option::Option<crate::model::TemplateVersionSourceInput>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateEnvironmentTemplateVersionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn source(&self) -> std::option::Option<&crate::model::TemplateVersionSourceInput> {
self.source.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateEnvironmentTemplateVersionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentTemplateVersionInput");
formatter.field("client_token", &self.client_token);
formatter.field("template_name", &self.template_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("major_version", &self.major_version);
formatter.field("source", &self.source);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteEnvironmentTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
}
impl DeleteEnvironmentTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateEnvironmentTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::TemplateVersionStatus>,
}
impl UpdateEnvironmentTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::TemplateVersionStatus> {
self.status.as_ref()
}
}
impl std::fmt::Debug for UpdateEnvironmentTemplateVersionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateEnvironmentTemplateVersionInput");
formatter.field("template_name", &self.template_name);
formatter.field("major_version", &self.major_version);
formatter.field("minor_version", &self.minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("status", &self.status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEnvironmentTemplateVersionInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minor_version: std::option::Option<std::string::String>,
}
impl GetEnvironmentTemplateVersionInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn major_version(&self) -> std::option::Option<&str> {
self.major_version.as_deref()
}
pub fn minor_version(&self) -> std::option::Option<&str> {
self.minor_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentTemplatesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListEnvironmentTemplatesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEnvironmentTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub encryption_key: std::option::Option<std::string::String>,
#[doc(hidden)]
pub provisioning: std::option::Option<crate::model::Provisioning>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateEnvironmentTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn encryption_key(&self) -> std::option::Option<&str> {
self.encryption_key.as_deref()
}
pub fn provisioning(&self) -> std::option::Option<&crate::model::Provisioning> {
self.provisioning.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateEnvironmentTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentTemplateInput");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("encryption_key", &self.encryption_key);
formatter.field("provisioning", &self.provisioning);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteEnvironmentTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteEnvironmentTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateEnvironmentTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl UpdateEnvironmentTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
impl std::fmt::Debug for UpdateEnvironmentTemplateInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateEnvironmentTemplateInput");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEnvironmentTemplateInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetEnvironmentTemplateInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub environment_templates:
std::option::Option<std::vec::Vec<crate::model::EnvironmentTemplateFilter>>,
}
impl ListEnvironmentsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn environment_templates(
&self,
) -> std::option::Option<&[crate::model::EnvironmentTemplateFilter]> {
self.environment_templates.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEnvironmentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_minor_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub proton_service_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub environment_account_connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub provisioning_repository: std::option::Option<crate::model::RepositoryBranchInput>,
#[doc(hidden)]
pub component_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub codebuild_role_arn: std::option::Option<std::string::String>,
}
impl CreateEnvironmentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_major_version(&self) -> std::option::Option<&str> {
self.template_major_version.as_deref()
}
pub fn template_minor_version(&self) -> std::option::Option<&str> {
self.template_minor_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
pub fn proton_service_role_arn(&self) -> std::option::Option<&str> {
self.proton_service_role_arn.as_deref()
}
pub fn environment_account_connection_id(&self) -> std::option::Option<&str> {
self.environment_account_connection_id.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn provisioning_repository(
&self,
) -> std::option::Option<&crate::model::RepositoryBranchInput> {
self.provisioning_repository.as_ref()
}
pub fn component_role_arn(&self) -> std::option::Option<&str> {
self.component_role_arn.as_deref()
}
pub fn codebuild_role_arn(&self) -> std::option::Option<&str> {
self.codebuild_role_arn.as_deref()
}
}
impl std::fmt::Debug for CreateEnvironmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEnvironmentInput");
formatter.field("name", &self.name);
formatter.field("template_name", &self.template_name);
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
formatter.field(
"environment_account_connection_id",
&self.environment_account_connection_id,
);
formatter.field("tags", &self.tags);
formatter.field("provisioning_repository", &self.provisioning_repository);
formatter.field("component_role_arn", &self.component_role_arn);
formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteEnvironmentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteEnvironmentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateEnvironmentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_major_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_minor_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub proton_service_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub deployment_type: std::option::Option<crate::model::DeploymentUpdateType>,
#[doc(hidden)]
pub environment_account_connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub provisioning_repository: std::option::Option<crate::model::RepositoryBranchInput>,
#[doc(hidden)]
pub component_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub codebuild_role_arn: std::option::Option<std::string::String>,
}
impl UpdateEnvironmentInput {
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 spec(&self) -> std::option::Option<&str> {
self.spec.as_deref()
}
pub fn template_major_version(&self) -> std::option::Option<&str> {
self.template_major_version.as_deref()
}
pub fn template_minor_version(&self) -> std::option::Option<&str> {
self.template_minor_version.as_deref()
}
pub fn proton_service_role_arn(&self) -> std::option::Option<&str> {
self.proton_service_role_arn.as_deref()
}
pub fn deployment_type(&self) -> std::option::Option<&crate::model::DeploymentUpdateType> {
self.deployment_type.as_ref()
}
pub fn environment_account_connection_id(&self) -> std::option::Option<&str> {
self.environment_account_connection_id.as_deref()
}
pub fn provisioning_repository(
&self,
) -> std::option::Option<&crate::model::RepositoryBranchInput> {
self.provisioning_repository.as_ref()
}
pub fn component_role_arn(&self) -> std::option::Option<&str> {
self.component_role_arn.as_deref()
}
pub fn codebuild_role_arn(&self) -> std::option::Option<&str> {
self.codebuild_role_arn.as_deref()
}
}
impl std::fmt::Debug for UpdateEnvironmentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateEnvironmentInput");
formatter.field("name", &self.name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_major_version", &self.template_major_version);
formatter.field("template_minor_version", &self.template_minor_version);
formatter.field("proton_service_role_arn", &self.proton_service_role_arn);
formatter.field("deployment_type", &self.deployment_type);
formatter.field(
"environment_account_connection_id",
&self.environment_account_connection_id,
);
formatter.field("provisioning_repository", &self.provisioning_repository);
formatter.field("component_role_arn", &self.component_role_arn);
formatter.field("codebuild_role_arn", &self.codebuild_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEnvironmentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetEnvironmentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentProvisionedResourcesInput {
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListEnvironmentProvisionedResourcesInput {
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentOutputsInput {
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListEnvironmentOutputsInput {
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RejectEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl RejectEnvironmentAccountConnectionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceptEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl AcceptEnvironmentAccountConnectionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEnvironmentAccountConnectionsInput {
#[doc(hidden)]
pub requested_by:
std::option::Option<crate::model::EnvironmentAccountConnectionRequesterAccountType>,
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub statuses:
std::option::Option<std::vec::Vec<crate::model::EnvironmentAccountConnectionStatus>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListEnvironmentAccountConnectionsInput {
pub fn requested_by(
&self,
) -> std::option::Option<&crate::model::EnvironmentAccountConnectionRequesterAccountType> {
self.requested_by.as_ref()
}
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn statuses(
&self,
) -> std::option::Option<&[crate::model::EnvironmentAccountConnectionStatus]> {
self.statuses.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub management_account_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub component_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub codebuild_role_arn: std::option::Option<std::string::String>,
}
impl CreateEnvironmentAccountConnectionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn management_account_id(&self) -> std::option::Option<&str> {
self.management_account_id.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn component_role_arn(&self) -> std::option::Option<&str> {
self.component_role_arn.as_deref()
}
pub fn codebuild_role_arn(&self) -> std::option::Option<&str> {
self.codebuild_role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl DeleteEnvironmentAccountConnectionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub component_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub codebuild_role_arn: std::option::Option<std::string::String>,
}
impl UpdateEnvironmentAccountConnectionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn component_role_arn(&self) -> std::option::Option<&str> {
self.component_role_arn.as_deref()
}
pub fn codebuild_role_arn(&self) -> std::option::Option<&str> {
self.codebuild_role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetEnvironmentAccountConnectionInput {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
}
impl GetEnvironmentAccountConnectionInput {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListComponentsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListComponentsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateComponentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_file: std::option::Option<std::string::String>,
#[doc(hidden)]
pub manifest: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateComponentInput {
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 service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
pub fn template_file(&self) -> std::option::Option<&str> {
self.template_file.as_deref()
}
pub fn manifest(&self) -> std::option::Option<&str> {
self.manifest.as_deref()
}
pub fn service_spec(&self) -> std::option::Option<&str> {
self.service_spec.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateComponentInput");
formatter.field("name", &self.name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("service_name", &self.service_name);
formatter.field("service_instance_name", &self.service_instance_name);
formatter.field("environment_name", &self.environment_name);
formatter.field("template_file", &"*** Sensitive Data Redacted ***");
formatter.field("manifest", &"*** Sensitive Data Redacted ***");
formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteComponentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl DeleteComponentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateComponentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub deployment_type: std::option::Option<crate::model::ComponentDeploymentUpdateType>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_spec: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_file: std::option::Option<std::string::String>,
}
impl UpdateComponentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn deployment_type(
&self,
) -> std::option::Option<&crate::model::ComponentDeploymentUpdateType> {
self.deployment_type.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn service_spec(&self) -> std::option::Option<&str> {
self.service_spec.as_deref()
}
pub fn template_file(&self) -> std::option::Option<&str> {
self.template_file.as_deref()
}
}
impl std::fmt::Debug for UpdateComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateComponentInput");
formatter.field("name", &self.name);
formatter.field("deployment_type", &self.deployment_type);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("service_name", &self.service_name);
formatter.field("service_instance_name", &self.service_instance_name);
formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
formatter.field("template_file", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetComponentInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
}
impl GetComponentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListComponentProvisionedResourcesInput {
#[doc(hidden)]
pub component_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListComponentProvisionedResourcesInput {
pub fn component_name(&self) -> std::option::Option<&str> {
self.component_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListComponentOutputsInput {
#[doc(hidden)]
pub component_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListComponentOutputsInput {
pub fn component_name(&self) -> std::option::Option<&str> {
self.component_name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateAccountSettingsInput {
#[doc(hidden)]
pub pipeline_service_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub pipeline_provisioning_repository: std::option::Option<crate::model::RepositoryBranchInput>,
#[doc(hidden)]
pub delete_pipeline_provisioning_repository: std::option::Option<bool>,
#[doc(hidden)]
pub pipeline_codebuild_role_arn: std::option::Option<std::string::String>,
}
impl UpdateAccountSettingsInput {
pub fn pipeline_service_role_arn(&self) -> std::option::Option<&str> {
self.pipeline_service_role_arn.as_deref()
}
pub fn pipeline_provisioning_repository(
&self,
) -> std::option::Option<&crate::model::RepositoryBranchInput> {
self.pipeline_provisioning_repository.as_ref()
}
pub fn delete_pipeline_provisioning_repository(&self) -> std::option::Option<bool> {
self.delete_pipeline_provisioning_repository
}
pub fn pipeline_codebuild_role_arn(&self) -> std::option::Option<&str> {
self.pipeline_codebuild_role_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetAccountSettingsInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotifyResourceDeploymentStatusChangeInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::ResourceDeploymentStatus>,
#[doc(hidden)]
pub outputs: std::option::Option<std::vec::Vec<crate::model::Output>>,
#[doc(hidden)]
pub deployment_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
}
impl NotifyResourceDeploymentStatusChangeInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::ResourceDeploymentStatus> {
self.status.as_ref()
}
pub fn outputs(&self) -> std::option::Option<&[crate::model::Output]> {
self.outputs.as_deref()
}
pub fn deployment_id(&self) -> std::option::Option<&str> {
self.deployment_id.as_deref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
}
impl std::fmt::Debug for NotifyResourceDeploymentStatusChangeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotifyResourceDeploymentStatusChangeInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("status", &self.status);
formatter.field("outputs", &self.outputs);
formatter.field("deployment_id", &self.deployment_id);
formatter.field("status_message", &"*** 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>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListRepositorySyncDefinitionsInput {
#[doc(hidden)]
pub repository_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub repository_provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub sync_type: std::option::Option<crate::model::SyncType>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListRepositorySyncDefinitionsInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn repository_provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.repository_provider.as_ref()
}
pub fn sync_type(&self) -> std::option::Option<&crate::model::SyncType> {
self.sync_type.as_ref()
}
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 GetTemplateSyncStatusInput {
#[doc(hidden)]
pub template_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_type: std::option::Option<crate::model::TemplateType>,
#[doc(hidden)]
pub template_version: std::option::Option<std::string::String>,
}
impl GetTemplateSyncStatusInput {
pub fn template_name(&self) -> std::option::Option<&str> {
self.template_name.as_deref()
}
pub fn template_type(&self) -> std::option::Option<&crate::model::TemplateType> {
self.template_type.as_ref()
}
pub fn template_version(&self) -> std::option::Option<&str> {
self.template_version.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetRepositorySyncStatusInput {
#[doc(hidden)]
pub repository_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub repository_provider: std::option::Option<crate::model::RepositoryProvider>,
#[doc(hidden)]
pub branch: std::option::Option<std::string::String>,
#[doc(hidden)]
pub sync_type: std::option::Option<crate::model::SyncType>,
}
impl GetRepositorySyncStatusInput {
pub fn repository_name(&self) -> std::option::Option<&str> {
self.repository_name.as_deref()
}
pub fn repository_provider(&self) -> std::option::Option<&crate::model::RepositoryProvider> {
self.repository_provider.as_ref()
}
pub fn branch(&self) -> std::option::Option<&str> {
self.branch.as_deref()
}
pub fn sync_type(&self) -> std::option::Option<&crate::model::SyncType> {
self.sync_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelServicePipelineDeploymentInput {
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
}
impl CancelServicePipelineDeploymentInput {
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelServiceInstanceDeploymentInput {
#[doc(hidden)]
pub service_instance_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_name: std::option::Option<std::string::String>,
}
impl CancelServiceInstanceDeploymentInput {
pub fn service_instance_name(&self) -> std::option::Option<&str> {
self.service_instance_name.as_deref()
}
pub fn service_name(&self) -> std::option::Option<&str> {
self.service_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelEnvironmentDeploymentInput {
#[doc(hidden)]
pub environment_name: std::option::Option<std::string::String>,
}
impl CancelEnvironmentDeploymentInput {
pub fn environment_name(&self) -> std::option::Option<&str> {
self.environment_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CancelComponentDeploymentInput {
#[doc(hidden)]
pub component_name: std::option::Option<std::string::String>,
}
impl CancelComponentDeploymentInput {
pub fn component_name(&self) -> std::option::Option<&str> {
self.component_name.as_deref()
}
}