use std::fmt::Write;
pub mod add_tags_to_on_premises_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
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 instance_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_names.unwrap_or_default();
v.push(input.into());
self.instance_names = Some(v);
self
}
pub fn set_instance_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::AddTagsToOnPremisesInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::AddTagsToOnPremisesInstancesInput {
tags: self.tags,
instance_names: self.instance_names,
})
}
}
}
#[doc(hidden)]
pub type AddTagsToOnPremisesInstancesInputOperationOutputAlias =
crate::operation::AddTagsToOnPremisesInstances;
#[doc(hidden)]
pub type AddTagsToOnPremisesInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl AddTagsToOnPremisesInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AddTagsToOnPremisesInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::AddTagsToOnPremisesInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AddTagsToOnPremisesInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::AddTagsToOnPremisesInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.AddTagsToOnPremisesInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_add_tags_to_on_premises_instances(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AddTagsToOnPremisesInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AddTagsToOnPremisesInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::add_tags_to_on_premises_instances_input::Builder {
crate::input::add_tags_to_on_premises_instances_input::Builder::default()
}
}
pub mod batch_get_application_revisions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) revisions: std::option::Option<std::vec::Vec<crate::model::RevisionLocation>>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn revisions(mut self, input: impl Into<crate::model::RevisionLocation>) -> Self {
let mut v = self.revisions.unwrap_or_default();
v.push(input.into());
self.revisions = Some(v);
self
}
pub fn set_revisions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RevisionLocation>>,
) -> Self {
self.revisions = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetApplicationRevisionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetApplicationRevisionsInput {
application_name: self.application_name,
revisions: self.revisions,
})
}
}
}
#[doc(hidden)]
pub type BatchGetApplicationRevisionsInputOperationOutputAlias =
crate::operation::BatchGetApplicationRevisions;
#[doc(hidden)]
pub type BatchGetApplicationRevisionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetApplicationRevisionsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetApplicationRevisions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetApplicationRevisionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetApplicationRevisionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetApplicationRevisionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetApplicationRevisions",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_application_revisions(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetApplicationRevisions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetApplicationRevisions",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_application_revisions_input::Builder {
crate::input::batch_get_application_revisions_input::Builder::default()
}
}
pub mod batch_get_applications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn application_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.application_names.unwrap_or_default();
v.push(input.into());
self.application_names = Some(v);
self
}
pub fn set_application_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.application_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetApplicationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetApplicationsInput {
application_names: self.application_names,
})
}
}
}
#[doc(hidden)]
pub type BatchGetApplicationsInputOperationOutputAlias = crate::operation::BatchGetApplications;
#[doc(hidden)]
pub type BatchGetApplicationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetApplicationsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetApplications,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetApplicationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetApplicationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetApplicationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetApplications",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_applications(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetApplications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetApplications",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_applications_input::Builder {
crate::input::batch_get_applications_input::Builder::default()
}
}
pub mod batch_get_deployment_groups_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.deployment_group_names.unwrap_or_default();
v.push(input.into());
self.deployment_group_names = Some(v);
self
}
pub fn set_deployment_group_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.deployment_group_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetDeploymentGroupsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetDeploymentGroupsInput {
application_name: self.application_name,
deployment_group_names: self.deployment_group_names,
})
}
}
}
#[doc(hidden)]
pub type BatchGetDeploymentGroupsInputOperationOutputAlias =
crate::operation::BatchGetDeploymentGroups;
#[doc(hidden)]
pub type BatchGetDeploymentGroupsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetDeploymentGroupsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetDeploymentGroups,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetDeploymentGroupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetDeploymentGroupsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetDeploymentGroupsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetDeploymentGroups",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_deployment_groups(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetDeploymentGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetDeploymentGroups",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_deployment_groups_input::Builder {
crate::input::batch_get_deployment_groups_input::Builder::default()
}
}
pub mod batch_get_deployment_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
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 instance_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_ids.unwrap_or_default();
v.push(input.into());
self.instance_ids = Some(v);
self
}
pub fn set_instance_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_ids = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetDeploymentInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetDeploymentInstancesInput {
deployment_id: self.deployment_id,
instance_ids: self.instance_ids,
})
}
}
}
#[doc(hidden)]
pub type BatchGetDeploymentInstancesInputOperationOutputAlias =
crate::operation::BatchGetDeploymentInstances;
#[doc(hidden)]
pub type BatchGetDeploymentInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetDeploymentInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetDeploymentInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetDeploymentInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetDeploymentInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetDeploymentInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetDeploymentInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_deployment_instances(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetDeploymentInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetDeploymentInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_deployment_instances_input::Builder {
crate::input::batch_get_deployment_instances_input::Builder::default()
}
}
pub mod batch_get_deployments_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn deployment_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.deployment_ids.unwrap_or_default();
v.push(input.into());
self.deployment_ids = Some(v);
self
}
pub fn set_deployment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.deployment_ids = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetDeploymentsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetDeploymentsInput {
deployment_ids: self.deployment_ids,
})
}
}
}
#[doc(hidden)]
pub type BatchGetDeploymentsInputOperationOutputAlias = crate::operation::BatchGetDeployments;
#[doc(hidden)]
pub type BatchGetDeploymentsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetDeploymentsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetDeployments,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetDeploymentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetDeploymentsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetDeploymentsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetDeployments",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_deployments(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetDeployments::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetDeployments",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_deployments_input::Builder {
crate::input::batch_get_deployments_input::Builder::default()
}
}
pub mod batch_get_deployment_targets_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) target_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
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 target_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.target_ids.unwrap_or_default();
v.push(input.into());
self.target_ids = Some(v);
self
}
pub fn set_target_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.target_ids = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetDeploymentTargetsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetDeploymentTargetsInput {
deployment_id: self.deployment_id,
target_ids: self.target_ids,
})
}
}
}
#[doc(hidden)]
pub type BatchGetDeploymentTargetsInputOperationOutputAlias =
crate::operation::BatchGetDeploymentTargets;
#[doc(hidden)]
pub type BatchGetDeploymentTargetsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetDeploymentTargetsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetDeploymentTargets,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetDeploymentTargetsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetDeploymentTargetsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetDeploymentTargetsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetDeploymentTargets",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_deployment_targets(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetDeploymentTargets::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetDeploymentTargets",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_deployment_targets_input::Builder {
crate::input::batch_get_deployment_targets_input::Builder::default()
}
}
pub mod batch_get_on_premises_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn instance_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_names.unwrap_or_default();
v.push(input.into());
self.instance_names = Some(v);
self
}
pub fn set_instance_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchGetOnPremisesInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchGetOnPremisesInstancesInput {
instance_names: self.instance_names,
})
}
}
}
#[doc(hidden)]
pub type BatchGetOnPremisesInstancesInputOperationOutputAlias =
crate::operation::BatchGetOnPremisesInstances;
#[doc(hidden)]
pub type BatchGetOnPremisesInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchGetOnPremisesInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::BatchGetOnPremisesInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchGetOnPremisesInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchGetOnPremisesInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchGetOnPremisesInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.BatchGetOnPremisesInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_get_on_premises_instances(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchGetOnPremisesInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchGetOnPremisesInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_get_on_premises_instances_input::Builder {
crate::input::batch_get_on_premises_instances_input::Builder::default()
}
}
pub mod continue_deployment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) deployment_wait_type: std::option::Option<crate::model::DeploymentWaitType>,
}
impl Builder {
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 deployment_wait_type(mut self, input: crate::model::DeploymentWaitType) -> Self {
self.deployment_wait_type = Some(input);
self
}
pub fn set_deployment_wait_type(
mut self,
input: std::option::Option<crate::model::DeploymentWaitType>,
) -> Self {
self.deployment_wait_type = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ContinueDeploymentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ContinueDeploymentInput {
deployment_id: self.deployment_id,
deployment_wait_type: self.deployment_wait_type,
})
}
}
}
#[doc(hidden)]
pub type ContinueDeploymentInputOperationOutputAlias = crate::operation::ContinueDeployment;
#[doc(hidden)]
pub type ContinueDeploymentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ContinueDeploymentInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ContinueDeployment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ContinueDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ContinueDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ContinueDeploymentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ContinueDeployment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_continue_deployment(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ContinueDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ContinueDeployment",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::continue_deployment_input::Builder {
crate::input::continue_deployment_input::Builder::default()
}
}
pub mod create_application_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) compute_platform: std::option::Option<crate::model::ComputePlatform>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn compute_platform(mut self, input: crate::model::ComputePlatform) -> Self {
self.compute_platform = Some(input);
self
}
pub fn set_compute_platform(
mut self,
input: std::option::Option<crate::model::ComputePlatform>,
) -> Self {
self.compute_platform = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
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,
) -> std::result::Result<
crate::input::CreateApplicationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateApplicationInput {
application_name: self.application_name,
compute_platform: self.compute_platform,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateApplicationInputOperationOutputAlias = crate::operation::CreateApplication;
#[doc(hidden)]
pub type CreateApplicationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateApplicationInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateApplication,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateApplicationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.CreateApplication",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_application(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateApplication",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_application_input::Builder {
crate::input::create_application_input::Builder::default()
}
}
pub mod create_deployment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_name: std::option::Option<std::string::String>,
pub(crate) revision: std::option::Option<crate::model::RevisionLocation>,
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) ignore_application_stop_failures: std::option::Option<bool>,
pub(crate) target_instances: std::option::Option<crate::model::TargetInstances>,
pub(crate) auto_rollback_configuration:
std::option::Option<crate::model::AutoRollbackConfiguration>,
pub(crate) update_outdated_instances_only: std::option::Option<bool>,
pub(crate) file_exists_behavior: std::option::Option<crate::model::FileExistsBehavior>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_group_name = Some(input.into());
self
}
pub fn set_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_group_name = input;
self
}
pub fn revision(mut self, input: crate::model::RevisionLocation) -> Self {
self.revision = Some(input);
self
}
pub fn set_revision(
mut self,
input: std::option::Option<crate::model::RevisionLocation>,
) -> Self {
self.revision = input;
self
}
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_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 ignore_application_stop_failures(mut self, input: bool) -> Self {
self.ignore_application_stop_failures = Some(input);
self
}
pub fn set_ignore_application_stop_failures(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.ignore_application_stop_failures = input;
self
}
pub fn target_instances(mut self, input: crate::model::TargetInstances) -> Self {
self.target_instances = Some(input);
self
}
pub fn set_target_instances(
mut self,
input: std::option::Option<crate::model::TargetInstances>,
) -> Self {
self.target_instances = input;
self
}
pub fn auto_rollback_configuration(
mut self,
input: crate::model::AutoRollbackConfiguration,
) -> Self {
self.auto_rollback_configuration = Some(input);
self
}
pub fn set_auto_rollback_configuration(
mut self,
input: std::option::Option<crate::model::AutoRollbackConfiguration>,
) -> Self {
self.auto_rollback_configuration = input;
self
}
pub fn update_outdated_instances_only(mut self, input: bool) -> Self {
self.update_outdated_instances_only = Some(input);
self
}
pub fn set_update_outdated_instances_only(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.update_outdated_instances_only = input;
self
}
pub fn file_exists_behavior(mut self, input: crate::model::FileExistsBehavior) -> Self {
self.file_exists_behavior = Some(input);
self
}
pub fn set_file_exists_behavior(
mut self,
input: std::option::Option<crate::model::FileExistsBehavior>,
) -> Self {
self.file_exists_behavior = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateDeploymentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDeploymentInput {
application_name: self.application_name,
deployment_group_name: self.deployment_group_name,
revision: self.revision,
deployment_config_name: self.deployment_config_name,
description: self.description,
ignore_application_stop_failures: self
.ignore_application_stop_failures
.unwrap_or_default(),
target_instances: self.target_instances,
auto_rollback_configuration: self.auto_rollback_configuration,
update_outdated_instances_only: self
.update_outdated_instances_only
.unwrap_or_default(),
file_exists_behavior: self.file_exists_behavior,
})
}
}
}
#[doc(hidden)]
pub type CreateDeploymentInputOperationOutputAlias = crate::operation::CreateDeployment;
#[doc(hidden)]
pub type CreateDeploymentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateDeploymentInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDeployment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateDeploymentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.CreateDeployment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_deployment(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDeployment",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_deployment_input::Builder {
crate::input::create_deployment_input::Builder::default()
}
}
pub mod create_deployment_config_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
pub(crate) minimum_healthy_hosts: std::option::Option<crate::model::MinimumHealthyHosts>,
pub(crate) traffic_routing_config: std::option::Option<crate::model::TrafficRoutingConfig>,
pub(crate) compute_platform: std::option::Option<crate::model::ComputePlatform>,
}
impl Builder {
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_name = input;
self
}
pub fn minimum_healthy_hosts(mut self, input: crate::model::MinimumHealthyHosts) -> Self {
self.minimum_healthy_hosts = Some(input);
self
}
pub fn set_minimum_healthy_hosts(
mut self,
input: std::option::Option<crate::model::MinimumHealthyHosts>,
) -> Self {
self.minimum_healthy_hosts = input;
self
}
pub fn traffic_routing_config(mut self, input: crate::model::TrafficRoutingConfig) -> Self {
self.traffic_routing_config = Some(input);
self
}
pub fn set_traffic_routing_config(
mut self,
input: std::option::Option<crate::model::TrafficRoutingConfig>,
) -> Self {
self.traffic_routing_config = input;
self
}
pub fn compute_platform(mut self, input: crate::model::ComputePlatform) -> Self {
self.compute_platform = Some(input);
self
}
pub fn set_compute_platform(
mut self,
input: std::option::Option<crate::model::ComputePlatform>,
) -> Self {
self.compute_platform = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateDeploymentConfigInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDeploymentConfigInput {
deployment_config_name: self.deployment_config_name,
minimum_healthy_hosts: self.minimum_healthy_hosts,
traffic_routing_config: self.traffic_routing_config,
compute_platform: self.compute_platform,
})
}
}
}
#[doc(hidden)]
pub type CreateDeploymentConfigInputOperationOutputAlias = crate::operation::CreateDeploymentConfig;
#[doc(hidden)]
pub type CreateDeploymentConfigInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateDeploymentConfigInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDeploymentConfig,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateDeploymentConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDeploymentConfigInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateDeploymentConfigInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.CreateDeploymentConfig",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_deployment_config(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDeploymentConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDeploymentConfig",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_deployment_config_input::Builder {
crate::input::create_deployment_config_input::Builder::default()
}
}
pub mod create_deployment_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_name: std::option::Option<std::string::String>,
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
pub(crate) ec2_tag_filters: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
pub(crate) on_premises_instance_tag_filters:
std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub(crate) auto_scaling_groups: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) service_role_arn: std::option::Option<std::string::String>,
pub(crate) trigger_configurations:
std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
pub(crate) alarm_configuration: std::option::Option<crate::model::AlarmConfiguration>,
pub(crate) auto_rollback_configuration:
std::option::Option<crate::model::AutoRollbackConfiguration>,
pub(crate) outdated_instances_strategy:
std::option::Option<crate::model::OutdatedInstancesStrategy>,
pub(crate) deployment_style: std::option::Option<crate::model::DeploymentStyle>,
pub(crate) blue_green_deployment_configuration:
std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
pub(crate) load_balancer_info: std::option::Option<crate::model::LoadBalancerInfo>,
pub(crate) ec2_tag_set: std::option::Option<crate::model::Ec2TagSet>,
pub(crate) ecs_services: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
pub(crate) on_premises_tag_set: std::option::Option<crate::model::OnPremisesTagSet>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_group_name = Some(input.into());
self
}
pub fn set_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_group_name = input;
self
}
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_name = input;
self
}
pub fn ec2_tag_filters(mut self, input: impl Into<crate::model::Ec2TagFilter>) -> Self {
let mut v = self.ec2_tag_filters.unwrap_or_default();
v.push(input.into());
self.ec2_tag_filters = Some(v);
self
}
pub fn set_ec2_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
) -> Self {
self.ec2_tag_filters = input;
self
}
pub fn on_premises_instance_tag_filters(
mut self,
input: impl Into<crate::model::TagFilter>,
) -> Self {
let mut v = self.on_premises_instance_tag_filters.unwrap_or_default();
v.push(input.into());
self.on_premises_instance_tag_filters = Some(v);
self
}
pub fn set_on_premises_instance_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
) -> Self {
self.on_premises_instance_tag_filters = input;
self
}
pub fn auto_scaling_groups(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.auto_scaling_groups.unwrap_or_default();
v.push(input.into());
self.auto_scaling_groups = Some(v);
self
}
pub fn set_auto_scaling_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.auto_scaling_groups = input;
self
}
pub fn service_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.service_role_arn = Some(input.into());
self
}
pub fn set_service_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_role_arn = input;
self
}
pub fn trigger_configurations(
mut self,
input: impl Into<crate::model::TriggerConfig>,
) -> Self {
let mut v = self.trigger_configurations.unwrap_or_default();
v.push(input.into());
self.trigger_configurations = Some(v);
self
}
pub fn set_trigger_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
) -> Self {
self.trigger_configurations = input;
self
}
pub fn alarm_configuration(mut self, input: crate::model::AlarmConfiguration) -> Self {
self.alarm_configuration = Some(input);
self
}
pub fn set_alarm_configuration(
mut self,
input: std::option::Option<crate::model::AlarmConfiguration>,
) -> Self {
self.alarm_configuration = input;
self
}
pub fn auto_rollback_configuration(
mut self,
input: crate::model::AutoRollbackConfiguration,
) -> Self {
self.auto_rollback_configuration = Some(input);
self
}
pub fn set_auto_rollback_configuration(
mut self,
input: std::option::Option<crate::model::AutoRollbackConfiguration>,
) -> Self {
self.auto_rollback_configuration = input;
self
}
pub fn outdated_instances_strategy(
mut self,
input: crate::model::OutdatedInstancesStrategy,
) -> Self {
self.outdated_instances_strategy = Some(input);
self
}
pub fn set_outdated_instances_strategy(
mut self,
input: std::option::Option<crate::model::OutdatedInstancesStrategy>,
) -> Self {
self.outdated_instances_strategy = input;
self
}
pub fn deployment_style(mut self, input: crate::model::DeploymentStyle) -> Self {
self.deployment_style = Some(input);
self
}
pub fn set_deployment_style(
mut self,
input: std::option::Option<crate::model::DeploymentStyle>,
) -> Self {
self.deployment_style = input;
self
}
pub fn blue_green_deployment_configuration(
mut self,
input: crate::model::BlueGreenDeploymentConfiguration,
) -> Self {
self.blue_green_deployment_configuration = Some(input);
self
}
pub fn set_blue_green_deployment_configuration(
mut self,
input: std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
) -> Self {
self.blue_green_deployment_configuration = input;
self
}
pub fn load_balancer_info(mut self, input: crate::model::LoadBalancerInfo) -> Self {
self.load_balancer_info = Some(input);
self
}
pub fn set_load_balancer_info(
mut self,
input: std::option::Option<crate::model::LoadBalancerInfo>,
) -> Self {
self.load_balancer_info = input;
self
}
pub fn ec2_tag_set(mut self, input: crate::model::Ec2TagSet) -> Self {
self.ec2_tag_set = Some(input);
self
}
pub fn set_ec2_tag_set(
mut self,
input: std::option::Option<crate::model::Ec2TagSet>,
) -> Self {
self.ec2_tag_set = input;
self
}
pub fn ecs_services(mut self, input: impl Into<crate::model::EcsService>) -> Self {
let mut v = self.ecs_services.unwrap_or_default();
v.push(input.into());
self.ecs_services = Some(v);
self
}
pub fn set_ecs_services(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
) -> Self {
self.ecs_services = input;
self
}
pub fn on_premises_tag_set(mut self, input: crate::model::OnPremisesTagSet) -> Self {
self.on_premises_tag_set = Some(input);
self
}
pub fn set_on_premises_tag_set(
mut self,
input: std::option::Option<crate::model::OnPremisesTagSet>,
) -> Self {
self.on_premises_tag_set = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
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,
) -> std::result::Result<
crate::input::CreateDeploymentGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDeploymentGroupInput {
application_name: self.application_name,
deployment_group_name: self.deployment_group_name,
deployment_config_name: self.deployment_config_name,
ec2_tag_filters: self.ec2_tag_filters,
on_premises_instance_tag_filters: self.on_premises_instance_tag_filters,
auto_scaling_groups: self.auto_scaling_groups,
service_role_arn: self.service_role_arn,
trigger_configurations: self.trigger_configurations,
alarm_configuration: self.alarm_configuration,
auto_rollback_configuration: self.auto_rollback_configuration,
outdated_instances_strategy: self.outdated_instances_strategy,
deployment_style: self.deployment_style,
blue_green_deployment_configuration: self.blue_green_deployment_configuration,
load_balancer_info: self.load_balancer_info,
ec2_tag_set: self.ec2_tag_set,
ecs_services: self.ecs_services,
on_premises_tag_set: self.on_premises_tag_set,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateDeploymentGroupInputOperationOutputAlias = crate::operation::CreateDeploymentGroup;
#[doc(hidden)]
pub type CreateDeploymentGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateDeploymentGroupInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDeploymentGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateDeploymentGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDeploymentGroupInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateDeploymentGroupInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.CreateDeploymentGroup",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_deployment_group(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDeploymentGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDeploymentGroup",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_deployment_group_input::Builder {
crate::input::create_deployment_group_input::Builder::default()
}
}
pub mod delete_application_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteApplicationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteApplicationInput {
application_name: self.application_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteApplicationInputOperationOutputAlias = crate::operation::DeleteApplication;
#[doc(hidden)]
pub type DeleteApplicationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteApplicationInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteApplication,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteApplicationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeleteApplication",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_application(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteApplication",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_application_input::Builder {
crate::input::delete_application_input::Builder::default()
}
}
pub mod delete_deployment_config_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDeploymentConfigInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDeploymentConfigInput {
deployment_config_name: self.deployment_config_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteDeploymentConfigInputOperationOutputAlias = crate::operation::DeleteDeploymentConfig;
#[doc(hidden)]
pub type DeleteDeploymentConfigInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteDeploymentConfigInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDeploymentConfig,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteDeploymentConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDeploymentConfigInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteDeploymentConfigInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeleteDeploymentConfig",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_deployment_config(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDeploymentConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDeploymentConfig",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_deployment_config_input::Builder {
crate::input::delete_deployment_config_input::Builder::default()
}
}
pub mod delete_deployment_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_group_name = Some(input.into());
self
}
pub fn set_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDeploymentGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDeploymentGroupInput {
application_name: self.application_name,
deployment_group_name: self.deployment_group_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteDeploymentGroupInputOperationOutputAlias = crate::operation::DeleteDeploymentGroup;
#[doc(hidden)]
pub type DeleteDeploymentGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteDeploymentGroupInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDeploymentGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteDeploymentGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDeploymentGroupInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteDeploymentGroupInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeleteDeploymentGroup",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_deployment_group(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDeploymentGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDeploymentGroup",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_deployment_group_input::Builder {
crate::input::delete_deployment_group_input::Builder::default()
}
}
pub mod delete_git_hub_account_token_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) token_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn token_name(mut self, input: impl Into<std::string::String>) -> Self {
self.token_name = Some(input.into());
self
}
pub fn set_token_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.token_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteGitHubAccountTokenInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteGitHubAccountTokenInput {
token_name: self.token_name,
})
}
}
}
#[doc(hidden)]
pub type DeleteGitHubAccountTokenInputOperationOutputAlias =
crate::operation::DeleteGitHubAccountToken;
#[doc(hidden)]
pub type DeleteGitHubAccountTokenInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteGitHubAccountTokenInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteGitHubAccountToken,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteGitHubAccountTokenInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteGitHubAccountTokenInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteGitHubAccountTokenInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeleteGitHubAccountToken",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_git_hub_account_token(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteGitHubAccountToken::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteGitHubAccountToken",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_git_hub_account_token_input::Builder {
crate::input::delete_git_hub_account_token_input::Builder::default()
}
}
pub mod delete_resources_by_external_id_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) external_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
self.external_id = Some(input.into());
self
}
pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.external_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteResourcesByExternalIdInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteResourcesByExternalIdInput {
external_id: self.external_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteResourcesByExternalIdInputOperationOutputAlias =
crate::operation::DeleteResourcesByExternalId;
#[doc(hidden)]
pub type DeleteResourcesByExternalIdInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteResourcesByExternalIdInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteResourcesByExternalId,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteResourcesByExternalIdInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteResourcesByExternalIdInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteResourcesByExternalIdInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeleteResourcesByExternalId",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_resources_by_external_id(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteResourcesByExternalId::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteResourcesByExternalId",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_resources_by_external_id_input::Builder {
crate::input::delete_resources_by_external_id_input::Builder::default()
}
}
pub mod deregister_on_premises_instance_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) instance_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_name = Some(input.into());
self
}
pub fn set_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeregisterOnPremisesInstanceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeregisterOnPremisesInstanceInput {
instance_name: self.instance_name,
})
}
}
}
#[doc(hidden)]
pub type DeregisterOnPremisesInstanceInputOperationOutputAlias =
crate::operation::DeregisterOnPremisesInstance;
#[doc(hidden)]
pub type DeregisterOnPremisesInstanceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeregisterOnPremisesInstanceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeregisterOnPremisesInstance,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeregisterOnPremisesInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeregisterOnPremisesInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeregisterOnPremisesInstanceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.DeregisterOnPremisesInstance",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_deregister_on_premises_instance(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeregisterOnPremisesInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeregisterOnPremisesInstance",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::deregister_on_premises_instance_input::Builder {
crate::input::deregister_on_premises_instance_input::Builder::default()
}
}
pub mod get_application_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetApplicationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetApplicationInput {
application_name: self.application_name,
})
}
}
}
#[doc(hidden)]
pub type GetApplicationInputOperationOutputAlias = crate::operation::GetApplication;
#[doc(hidden)]
pub type GetApplicationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetApplicationInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetApplication,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetApplicationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetApplication",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_get_application(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetApplication",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_application_input::Builder {
crate::input::get_application_input::Builder::default()
}
}
pub mod get_application_revision_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) revision: std::option::Option<crate::model::RevisionLocation>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn revision(mut self, input: crate::model::RevisionLocation) -> Self {
self.revision = Some(input);
self
}
pub fn set_revision(
mut self,
input: std::option::Option<crate::model::RevisionLocation>,
) -> Self {
self.revision = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetApplicationRevisionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetApplicationRevisionInput {
application_name: self.application_name,
revision: self.revision,
})
}
}
}
#[doc(hidden)]
pub type GetApplicationRevisionInputOperationOutputAlias = crate::operation::GetApplicationRevision;
#[doc(hidden)]
pub type GetApplicationRevisionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetApplicationRevisionInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetApplicationRevision,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetApplicationRevisionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetApplicationRevisionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetApplicationRevisionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetApplicationRevision",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_application_revision(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetApplicationRevision::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetApplicationRevision",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_application_revision_input::Builder {
crate::input::get_application_revision_input::Builder::default()
}
}
pub mod get_deployment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
}
impl Builder {
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 build(
self,
) -> std::result::Result<
crate::input::GetDeploymentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDeploymentInput {
deployment_id: self.deployment_id,
})
}
}
}
#[doc(hidden)]
pub type GetDeploymentInputOperationOutputAlias = crate::operation::GetDeployment;
#[doc(hidden)]
pub type GetDeploymentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDeploymentInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeployment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDeploymentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetDeployment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_get_deployment(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeployment",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_deployment_input::Builder {
crate::input::get_deployment_input::Builder::default()
}
}
pub mod get_deployment_config_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDeploymentConfigInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDeploymentConfigInput {
deployment_config_name: self.deployment_config_name,
})
}
}
}
#[doc(hidden)]
pub type GetDeploymentConfigInputOperationOutputAlias = crate::operation::GetDeploymentConfig;
#[doc(hidden)]
pub type GetDeploymentConfigInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDeploymentConfigInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeploymentConfig,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDeploymentConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeploymentConfigInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDeploymentConfigInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetDeploymentConfig",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_deployment_config(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeploymentConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeploymentConfig",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_deployment_config_input::Builder {
crate::input::get_deployment_config_input::Builder::default()
}
}
pub mod get_deployment_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_group_name = Some(input.into());
self
}
pub fn set_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_group_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDeploymentGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDeploymentGroupInput {
application_name: self.application_name,
deployment_group_name: self.deployment_group_name,
})
}
}
}
#[doc(hidden)]
pub type GetDeploymentGroupInputOperationOutputAlias = crate::operation::GetDeploymentGroup;
#[doc(hidden)]
pub type GetDeploymentGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDeploymentGroupInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeploymentGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDeploymentGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeploymentGroupInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDeploymentGroupInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetDeploymentGroup",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_deployment_group(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeploymentGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeploymentGroup",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_deployment_group_input::Builder {
crate::input::get_deployment_group_input::Builder::default()
}
}
pub mod get_deployment_instance_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) instance_id: std::option::Option<std::string::String>,
}
impl Builder {
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 instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_id = Some(input.into());
self
}
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.instance_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDeploymentInstanceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDeploymentInstanceInput {
deployment_id: self.deployment_id,
instance_id: self.instance_id,
})
}
}
}
#[doc(hidden)]
pub type GetDeploymentInstanceInputOperationOutputAlias = crate::operation::GetDeploymentInstance;
#[doc(hidden)]
pub type GetDeploymentInstanceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDeploymentInstanceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeploymentInstance,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDeploymentInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeploymentInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDeploymentInstanceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetDeploymentInstance",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_deployment_instance(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeploymentInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeploymentInstance",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_deployment_instance_input::Builder {
crate::input::get_deployment_instance_input::Builder::default()
}
}
pub mod get_deployment_target_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) target_id: std::option::Option<std::string::String>,
}
impl Builder {
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 target_id(mut self, input: impl Into<std::string::String>) -> Self {
self.target_id = Some(input.into());
self
}
pub fn set_target_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.target_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDeploymentTargetInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDeploymentTargetInput {
deployment_id: self.deployment_id,
target_id: self.target_id,
})
}
}
}
#[doc(hidden)]
pub type GetDeploymentTargetInputOperationOutputAlias = crate::operation::GetDeploymentTarget;
#[doc(hidden)]
pub type GetDeploymentTargetInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDeploymentTargetInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDeploymentTarget,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDeploymentTargetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDeploymentTargetInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDeploymentTargetInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetDeploymentTarget",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_deployment_target(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetDeploymentTarget::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDeploymentTarget",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_deployment_target_input::Builder {
crate::input::get_deployment_target_input::Builder::default()
}
}
pub mod get_on_premises_instance_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) instance_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_name = Some(input.into());
self
}
pub fn set_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetOnPremisesInstanceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetOnPremisesInstanceInput {
instance_name: self.instance_name,
})
}
}
}
#[doc(hidden)]
pub type GetOnPremisesInstanceInputOperationOutputAlias = crate::operation::GetOnPremisesInstance;
#[doc(hidden)]
pub type GetOnPremisesInstanceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetOnPremisesInstanceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetOnPremisesInstance,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetOnPremisesInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetOnPremisesInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetOnPremisesInstanceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.GetOnPremisesInstance",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_get_on_premises_instance(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetOnPremisesInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetOnPremisesInstance",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_on_premises_instance_input::Builder {
crate::input::get_on_premises_instance_input::Builder::default()
}
}
pub mod list_application_revisions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) sort_by: std::option::Option<crate::model::ApplicationRevisionSortBy>,
pub(crate) sort_order: std::option::Option<crate::model::SortOrder>,
pub(crate) s3_bucket: std::option::Option<std::string::String>,
pub(crate) s3_key_prefix: std::option::Option<std::string::String>,
pub(crate) deployed: std::option::Option<crate::model::ListStateFilterAction>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn sort_by(mut self, input: crate::model::ApplicationRevisionSortBy) -> Self {
self.sort_by = Some(input);
self
}
pub fn set_sort_by(
mut self,
input: std::option::Option<crate::model::ApplicationRevisionSortBy>,
) -> 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 s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_bucket = Some(input.into());
self
}
pub fn set_s3_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.s3_bucket = input;
self
}
pub fn s3_key_prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.s3_key_prefix = Some(input.into());
self
}
pub fn set_s3_key_prefix(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.s3_key_prefix = input;
self
}
pub fn deployed(mut self, input: crate::model::ListStateFilterAction) -> Self {
self.deployed = Some(input);
self
}
pub fn set_deployed(
mut self,
input: std::option::Option<crate::model::ListStateFilterAction>,
) -> Self {
self.deployed = 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,
) -> std::result::Result<
crate::input::ListApplicationRevisionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListApplicationRevisionsInput {
application_name: self.application_name,
sort_by: self.sort_by,
sort_order: self.sort_order,
s3_bucket: self.s3_bucket,
s3_key_prefix: self.s3_key_prefix,
deployed: self.deployed,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListApplicationRevisionsInputOperationOutputAlias =
crate::operation::ListApplicationRevisions;
#[doc(hidden)]
pub type ListApplicationRevisionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListApplicationRevisionsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListApplicationRevisions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListApplicationRevisionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListApplicationRevisionsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListApplicationRevisionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListApplicationRevisions",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_application_revisions(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListApplicationRevisions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListApplicationRevisions",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_application_revisions_input::Builder {
crate::input::list_application_revisions_input::Builder::default()
}
}
pub mod list_applications_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
}
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 build(
self,
) -> std::result::Result<
crate::input::ListApplicationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListApplicationsInput {
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListApplicationsInputOperationOutputAlias = crate::operation::ListApplications;
#[doc(hidden)]
pub type ListApplicationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListApplicationsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListApplications,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListApplicationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListApplicationsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListApplicationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListApplications",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_applications(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListApplications::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListApplications",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_applications_input::Builder {
crate::input::list_applications_input::Builder::default()
}
}
pub mod list_deployment_configs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
}
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 build(
self,
) -> std::result::Result<
crate::input::ListDeploymentConfigsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDeploymentConfigsInput {
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListDeploymentConfigsInputOperationOutputAlias = crate::operation::ListDeploymentConfigs;
#[doc(hidden)]
pub type ListDeploymentConfigsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDeploymentConfigsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeploymentConfigs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDeploymentConfigsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeploymentConfigsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDeploymentConfigsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListDeploymentConfigs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_deployment_configs(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeploymentConfigs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeploymentConfigs",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_deployment_configs_input::Builder {
crate::input::list_deployment_configs_input::Builder::default()
}
}
pub mod list_deployment_groups_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_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,
) -> std::result::Result<
crate::input::ListDeploymentGroupsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDeploymentGroupsInput {
application_name: self.application_name,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListDeploymentGroupsInputOperationOutputAlias = crate::operation::ListDeploymentGroups;
#[doc(hidden)]
pub type ListDeploymentGroupsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDeploymentGroupsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeploymentGroups,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDeploymentGroupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeploymentGroupsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDeploymentGroupsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListDeploymentGroups",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_deployment_groups(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeploymentGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeploymentGroups",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_deployment_groups_input::Builder {
crate::input::list_deployment_groups_input::Builder::default()
}
}
pub mod list_deployment_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) instance_status_filter:
std::option::Option<std::vec::Vec<crate::model::InstanceStatus>>,
pub(crate) instance_type_filter:
std::option::Option<std::vec::Vec<crate::model::InstanceType>>,
}
impl Builder {
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 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 instance_status_filter(
mut self,
input: impl Into<crate::model::InstanceStatus>,
) -> Self {
let mut v = self.instance_status_filter.unwrap_or_default();
v.push(input.into());
self.instance_status_filter = Some(v);
self
}
pub fn set_instance_status_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceStatus>>,
) -> Self {
self.instance_status_filter = input;
self
}
pub fn instance_type_filter(
mut self,
input: impl Into<crate::model::InstanceType>,
) -> Self {
let mut v = self.instance_type_filter.unwrap_or_default();
v.push(input.into());
self.instance_type_filter = Some(v);
self
}
pub fn set_instance_type_filter(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceType>>,
) -> Self {
self.instance_type_filter = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListDeploymentInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDeploymentInstancesInput {
deployment_id: self.deployment_id,
next_token: self.next_token,
instance_status_filter: self.instance_status_filter,
instance_type_filter: self.instance_type_filter,
})
}
}
}
#[doc(hidden)]
pub type ListDeploymentInstancesInputOperationOutputAlias =
crate::operation::ListDeploymentInstances;
#[doc(hidden)]
pub type ListDeploymentInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDeploymentInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeploymentInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDeploymentInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeploymentInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDeploymentInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListDeploymentInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_deployment_instances(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeploymentInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeploymentInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_deployment_instances_input::Builder {
crate::input::list_deployment_instances_input::Builder::default()
}
}
pub mod list_deployments_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) deployment_group_name: std::option::Option<std::string::String>,
pub(crate) external_id: std::option::Option<std::string::String>,
pub(crate) include_only_statuses:
std::option::Option<std::vec::Vec<crate::model::DeploymentStatus>>,
pub(crate) create_time_range: std::option::Option<crate::model::TimeRange>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_group_name = Some(input.into());
self
}
pub fn set_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_group_name = input;
self
}
pub fn external_id(mut self, input: impl Into<std::string::String>) -> Self {
self.external_id = Some(input.into());
self
}
pub fn set_external_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.external_id = input;
self
}
pub fn include_only_statuses(
mut self,
input: impl Into<crate::model::DeploymentStatus>,
) -> Self {
let mut v = self.include_only_statuses.unwrap_or_default();
v.push(input.into());
self.include_only_statuses = Some(v);
self
}
pub fn set_include_only_statuses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DeploymentStatus>>,
) -> Self {
self.include_only_statuses = input;
self
}
pub fn create_time_range(mut self, input: crate::model::TimeRange) -> Self {
self.create_time_range = Some(input);
self
}
pub fn set_create_time_range(
mut self,
input: std::option::Option<crate::model::TimeRange>,
) -> Self {
self.create_time_range = 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,
) -> std::result::Result<
crate::input::ListDeploymentsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDeploymentsInput {
application_name: self.application_name,
deployment_group_name: self.deployment_group_name,
external_id: self.external_id,
include_only_statuses: self.include_only_statuses,
create_time_range: self.create_time_range,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListDeploymentsInputOperationOutputAlias = crate::operation::ListDeployments;
#[doc(hidden)]
pub type ListDeploymentsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDeploymentsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeployments,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDeploymentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeploymentsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDeploymentsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListDeployments",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_deployments(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeployments::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeployments",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_deployments_input::Builder {
crate::input::list_deployments_input::Builder::default()
}
}
pub mod list_deployment_targets_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) target_filters: std::option::Option<
std::collections::HashMap<
crate::model::TargetFilterName,
std::vec::Vec<std::string::String>,
>,
>,
}
impl Builder {
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 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 target_filters(
mut self,
k: impl Into<crate::model::TargetFilterName>,
v: impl Into<std::vec::Vec<std::string::String>>,
) -> Self {
let mut hash_map = self.target_filters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.target_filters = Some(hash_map);
self
}
pub fn set_target_filters(
mut self,
input: std::option::Option<
std::collections::HashMap<
crate::model::TargetFilterName,
std::vec::Vec<std::string::String>,
>,
>,
) -> Self {
self.target_filters = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListDeploymentTargetsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDeploymentTargetsInput {
deployment_id: self.deployment_id,
next_token: self.next_token,
target_filters: self.target_filters,
})
}
}
}
#[doc(hidden)]
pub type ListDeploymentTargetsInputOperationOutputAlias = crate::operation::ListDeploymentTargets;
#[doc(hidden)]
pub type ListDeploymentTargetsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDeploymentTargetsInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDeploymentTargets,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDeploymentTargetsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDeploymentTargetsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDeploymentTargetsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListDeploymentTargets",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_deployment_targets(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDeploymentTargets::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDeploymentTargets",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_deployment_targets_input::Builder {
crate::input::list_deployment_targets_input::Builder::default()
}
}
pub mod list_git_hub_account_token_names_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
}
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 build(
self,
) -> std::result::Result<
crate::input::ListGitHubAccountTokenNamesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListGitHubAccountTokenNamesInput {
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListGitHubAccountTokenNamesInputOperationOutputAlias =
crate::operation::ListGitHubAccountTokenNames;
#[doc(hidden)]
pub type ListGitHubAccountTokenNamesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListGitHubAccountTokenNamesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListGitHubAccountTokenNames,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListGitHubAccountTokenNamesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListGitHubAccountTokenNamesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListGitHubAccountTokenNamesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListGitHubAccountTokenNames",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_git_hub_account_token_names(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListGitHubAccountTokenNames::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListGitHubAccountTokenNames",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_git_hub_account_token_names_input::Builder {
crate::input::list_git_hub_account_token_names_input::Builder::default()
}
}
pub mod list_on_premises_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) registration_status: std::option::Option<crate::model::RegistrationStatus>,
pub(crate) tag_filters: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn registration_status(mut self, input: crate::model::RegistrationStatus) -> Self {
self.registration_status = Some(input);
self
}
pub fn set_registration_status(
mut self,
input: std::option::Option<crate::model::RegistrationStatus>,
) -> Self {
self.registration_status = input;
self
}
pub fn tag_filters(mut self, input: impl Into<crate::model::TagFilter>) -> Self {
let mut v = self.tag_filters.unwrap_or_default();
v.push(input.into());
self.tag_filters = Some(v);
self
}
pub fn set_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
) -> Self {
self.tag_filters = 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,
) -> std::result::Result<
crate::input::ListOnPremisesInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListOnPremisesInstancesInput {
registration_status: self.registration_status,
tag_filters: self.tag_filters,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListOnPremisesInstancesInputOperationOutputAlias =
crate::operation::ListOnPremisesInstances;
#[doc(hidden)]
pub type ListOnPremisesInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListOnPremisesInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListOnPremisesInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListOnPremisesInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListOnPremisesInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListOnPremisesInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListOnPremisesInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_on_premises_instances(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListOnPremisesInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListOnPremisesInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_on_premises_instances_input::Builder {
crate::input::list_on_premises_instances_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn 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,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTagsForResourceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListTagsForResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.ListTagsForResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_tags_for_resource(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod put_lifecycle_event_hook_execution_status_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) lifecycle_event_hook_execution_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::LifecycleEventStatus>,
}
impl Builder {
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 lifecycle_event_hook_execution_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.lifecycle_event_hook_execution_id = Some(input.into());
self
}
pub fn set_lifecycle_event_hook_execution_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.lifecycle_event_hook_execution_id = input;
self
}
pub fn status(mut self, input: crate::model::LifecycleEventStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::LifecycleEventStatus>,
) -> Self {
self.status = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutLifecycleEventHookExecutionStatusInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutLifecycleEventHookExecutionStatusInput {
deployment_id: self.deployment_id,
lifecycle_event_hook_execution_id: self.lifecycle_event_hook_execution_id,
status: self.status,
})
}
}
}
#[doc(hidden)]
pub type PutLifecycleEventHookExecutionStatusInputOperationOutputAlias =
crate::operation::PutLifecycleEventHookExecutionStatus;
#[doc(hidden)]
pub type PutLifecycleEventHookExecutionStatusInputOperationRetryAlias =
aws_http::AwsErrorRetryPolicy;
impl PutLifecycleEventHookExecutionStatusInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutLifecycleEventHookExecutionStatus,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutLifecycleEventHookExecutionStatusInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutLifecycleEventHookExecutionStatusInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutLifecycleEventHookExecutionStatusInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.PutLifecycleEventHookExecutionStatus",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_put_lifecycle_event_hook_execution_status(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::PutLifecycleEventHookExecutionStatus::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutLifecycleEventHookExecutionStatus",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::put_lifecycle_event_hook_execution_status_input::Builder {
crate::input::put_lifecycle_event_hook_execution_status_input::Builder::default()
}
}
pub mod register_application_revision_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) revision: std::option::Option<crate::model::RevisionLocation>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_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 revision(mut self, input: crate::model::RevisionLocation) -> Self {
self.revision = Some(input);
self
}
pub fn set_revision(
mut self,
input: std::option::Option<crate::model::RevisionLocation>,
) -> Self {
self.revision = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::RegisterApplicationRevisionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::RegisterApplicationRevisionInput {
application_name: self.application_name,
description: self.description,
revision: self.revision,
})
}
}
}
#[doc(hidden)]
pub type RegisterApplicationRevisionInputOperationOutputAlias =
crate::operation::RegisterApplicationRevision;
#[doc(hidden)]
pub type RegisterApplicationRevisionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl RegisterApplicationRevisionInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::RegisterApplicationRevision,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::RegisterApplicationRevisionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RegisterApplicationRevisionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::RegisterApplicationRevisionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.RegisterApplicationRevision",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_register_application_revision(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RegisterApplicationRevision::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RegisterApplicationRevision",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::register_application_revision_input::Builder {
crate::input::register_application_revision_input::Builder::default()
}
}
pub mod register_on_premises_instance_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) instance_name: std::option::Option<std::string::String>,
pub(crate) iam_session_arn: std::option::Option<std::string::String>,
pub(crate) iam_user_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn instance_name(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_name = Some(input.into());
self
}
pub fn set_instance_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_name = input;
self
}
pub fn iam_session_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_session_arn = Some(input.into());
self
}
pub fn set_iam_session_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.iam_session_arn = input;
self
}
pub fn iam_user_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_user_arn = Some(input.into());
self
}
pub fn set_iam_user_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_user_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::RegisterOnPremisesInstanceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::RegisterOnPremisesInstanceInput {
instance_name: self.instance_name,
iam_session_arn: self.iam_session_arn,
iam_user_arn: self.iam_user_arn,
})
}
}
}
#[doc(hidden)]
pub type RegisterOnPremisesInstanceInputOperationOutputAlias =
crate::operation::RegisterOnPremisesInstance;
#[doc(hidden)]
pub type RegisterOnPremisesInstanceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl RegisterOnPremisesInstanceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::RegisterOnPremisesInstance,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::RegisterOnPremisesInstanceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RegisterOnPremisesInstanceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::RegisterOnPremisesInstanceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.RegisterOnPremisesInstance",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_register_on_premises_instance(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RegisterOnPremisesInstance::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RegisterOnPremisesInstance",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::register_on_premises_instance_input::Builder {
crate::input::register_on_premises_instance_input::Builder::default()
}
}
pub mod remove_tags_from_on_premises_instances_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
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 instance_names(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_names.unwrap_or_default();
v.push(input.into());
self.instance_names = Some(v);
self
}
pub fn set_instance_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_names = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::RemoveTagsFromOnPremisesInstancesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::RemoveTagsFromOnPremisesInstancesInput {
tags: self.tags,
instance_names: self.instance_names,
})
}
}
}
#[doc(hidden)]
pub type RemoveTagsFromOnPremisesInstancesInputOperationOutputAlias =
crate::operation::RemoveTagsFromOnPremisesInstances;
#[doc(hidden)]
pub type RemoveTagsFromOnPremisesInstancesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl RemoveTagsFromOnPremisesInstancesInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::RemoveTagsFromOnPremisesInstances,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::RemoveTagsFromOnPremisesInstancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::RemoveTagsFromOnPremisesInstancesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::RemoveTagsFromOnPremisesInstancesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.RemoveTagsFromOnPremisesInstances",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_remove_tags_from_on_premises_instances(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::RemoveTagsFromOnPremisesInstances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"RemoveTagsFromOnPremisesInstances",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::remove_tags_from_on_premises_instances_input::Builder {
crate::input::remove_tags_from_on_premises_instances_input::Builder::default()
}
}
pub mod skip_wait_time_for_instance_termination_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
}
impl Builder {
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 build(
self,
) -> std::result::Result<
crate::input::SkipWaitTimeForInstanceTerminationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::SkipWaitTimeForInstanceTerminationInput {
deployment_id: self.deployment_id,
})
}
}
}
#[doc(hidden)]
pub type SkipWaitTimeForInstanceTerminationInputOperationOutputAlias =
crate::operation::SkipWaitTimeForInstanceTermination;
#[doc(hidden)]
pub type SkipWaitTimeForInstanceTerminationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl SkipWaitTimeForInstanceTerminationInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::SkipWaitTimeForInstanceTermination,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::SkipWaitTimeForInstanceTerminationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SkipWaitTimeForInstanceTerminationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::SkipWaitTimeForInstanceTerminationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.SkipWaitTimeForInstanceTermination",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_skip_wait_time_for_instance_termination(&self).map_err(|err|aws_smithy_http::operation::BuildError::SerializationError(err.into()))?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::SkipWaitTimeForInstanceTermination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SkipWaitTimeForInstanceTermination",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::skip_wait_time_for_instance_termination_input::Builder {
crate::input::skip_wait_time_for_instance_termination_input::Builder::default()
}
}
pub mod stop_deployment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) deployment_id: std::option::Option<std::string::String>,
pub(crate) auto_rollback_enabled: std::option::Option<bool>,
}
impl Builder {
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 auto_rollback_enabled(mut self, input: bool) -> Self {
self.auto_rollback_enabled = Some(input);
self
}
pub fn set_auto_rollback_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.auto_rollback_enabled = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StopDeploymentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopDeploymentInput {
deployment_id: self.deployment_id,
auto_rollback_enabled: self.auto_rollback_enabled,
})
}
}
}
#[doc(hidden)]
pub type StopDeploymentInputOperationOutputAlias = crate::operation::StopDeployment;
#[doc(hidden)]
pub type StopDeploymentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopDeploymentInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StopDeployment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopDeploymentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopDeploymentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopDeploymentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.StopDeployment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_stop_deployment(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopDeployment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopDeployment",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_deployment_input::Builder {
crate::input::stop_deployment_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::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: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
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,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TagResourceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::TagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.TagResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UntagResourceInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::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::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UntagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.UntagResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_application_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) new_application_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn new_application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.new_application_name = Some(input.into());
self
}
pub fn set_new_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_application_name = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateApplicationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateApplicationInput {
application_name: self.application_name,
new_application_name: self.new_application_name,
})
}
}
}
#[doc(hidden)]
pub type UpdateApplicationInputOperationOutputAlias = crate::operation::UpdateApplication;
#[doc(hidden)]
pub type UpdateApplicationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateApplicationInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateApplication,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateApplicationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateApplicationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateApplicationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.UpdateApplication",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_application(&self)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateApplication::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateApplication",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_application_input::Builder {
crate::input::update_application_input::Builder::default()
}
}
pub mod update_deployment_group_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) application_name: std::option::Option<std::string::String>,
pub(crate) current_deployment_group_name: std::option::Option<std::string::String>,
pub(crate) new_deployment_group_name: std::option::Option<std::string::String>,
pub(crate) deployment_config_name: std::option::Option<std::string::String>,
pub(crate) ec2_tag_filters: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
pub(crate) on_premises_instance_tag_filters:
std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub(crate) auto_scaling_groups: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) service_role_arn: std::option::Option<std::string::String>,
pub(crate) trigger_configurations:
std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
pub(crate) alarm_configuration: std::option::Option<crate::model::AlarmConfiguration>,
pub(crate) auto_rollback_configuration:
std::option::Option<crate::model::AutoRollbackConfiguration>,
pub(crate) outdated_instances_strategy:
std::option::Option<crate::model::OutdatedInstancesStrategy>,
pub(crate) deployment_style: std::option::Option<crate::model::DeploymentStyle>,
pub(crate) blue_green_deployment_configuration:
std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
pub(crate) load_balancer_info: std::option::Option<crate::model::LoadBalancerInfo>,
pub(crate) ec2_tag_set: std::option::Option<crate::model::Ec2TagSet>,
pub(crate) ecs_services: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
pub(crate) on_premises_tag_set: std::option::Option<crate::model::OnPremisesTagSet>,
}
impl Builder {
pub fn application_name(mut self, input: impl Into<std::string::String>) -> Self {
self.application_name = Some(input.into());
self
}
pub fn set_application_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.application_name = input;
self
}
pub fn current_deployment_group_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.current_deployment_group_name = Some(input.into());
self
}
pub fn set_current_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.current_deployment_group_name = input;
self
}
pub fn new_deployment_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.new_deployment_group_name = Some(input.into());
self
}
pub fn set_new_deployment_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_deployment_group_name = input;
self
}
pub fn deployment_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.deployment_config_name = Some(input.into());
self
}
pub fn set_deployment_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.deployment_config_name = input;
self
}
pub fn ec2_tag_filters(mut self, input: impl Into<crate::model::Ec2TagFilter>) -> Self {
let mut v = self.ec2_tag_filters.unwrap_or_default();
v.push(input.into());
self.ec2_tag_filters = Some(v);
self
}
pub fn set_ec2_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
) -> Self {
self.ec2_tag_filters = input;
self
}
pub fn on_premises_instance_tag_filters(
mut self,
input: impl Into<crate::model::TagFilter>,
) -> Self {
let mut v = self.on_premises_instance_tag_filters.unwrap_or_default();
v.push(input.into());
self.on_premises_instance_tag_filters = Some(v);
self
}
pub fn set_on_premises_instance_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
) -> Self {
self.on_premises_instance_tag_filters = input;
self
}
pub fn auto_scaling_groups(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.auto_scaling_groups.unwrap_or_default();
v.push(input.into());
self.auto_scaling_groups = Some(v);
self
}
pub fn set_auto_scaling_groups(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.auto_scaling_groups = input;
self
}
pub fn service_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.service_role_arn = Some(input.into());
self
}
pub fn set_service_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.service_role_arn = input;
self
}
pub fn trigger_configurations(
mut self,
input: impl Into<crate::model::TriggerConfig>,
) -> Self {
let mut v = self.trigger_configurations.unwrap_or_default();
v.push(input.into());
self.trigger_configurations = Some(v);
self
}
pub fn set_trigger_configurations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
) -> Self {
self.trigger_configurations = input;
self
}
pub fn alarm_configuration(mut self, input: crate::model::AlarmConfiguration) -> Self {
self.alarm_configuration = Some(input);
self
}
pub fn set_alarm_configuration(
mut self,
input: std::option::Option<crate::model::AlarmConfiguration>,
) -> Self {
self.alarm_configuration = input;
self
}
pub fn auto_rollback_configuration(
mut self,
input: crate::model::AutoRollbackConfiguration,
) -> Self {
self.auto_rollback_configuration = Some(input);
self
}
pub fn set_auto_rollback_configuration(
mut self,
input: std::option::Option<crate::model::AutoRollbackConfiguration>,
) -> Self {
self.auto_rollback_configuration = input;
self
}
pub fn outdated_instances_strategy(
mut self,
input: crate::model::OutdatedInstancesStrategy,
) -> Self {
self.outdated_instances_strategy = Some(input);
self
}
pub fn set_outdated_instances_strategy(
mut self,
input: std::option::Option<crate::model::OutdatedInstancesStrategy>,
) -> Self {
self.outdated_instances_strategy = input;
self
}
pub fn deployment_style(mut self, input: crate::model::DeploymentStyle) -> Self {
self.deployment_style = Some(input);
self
}
pub fn set_deployment_style(
mut self,
input: std::option::Option<crate::model::DeploymentStyle>,
) -> Self {
self.deployment_style = input;
self
}
pub fn blue_green_deployment_configuration(
mut self,
input: crate::model::BlueGreenDeploymentConfiguration,
) -> Self {
self.blue_green_deployment_configuration = Some(input);
self
}
pub fn set_blue_green_deployment_configuration(
mut self,
input: std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
) -> Self {
self.blue_green_deployment_configuration = input;
self
}
pub fn load_balancer_info(mut self, input: crate::model::LoadBalancerInfo) -> Self {
self.load_balancer_info = Some(input);
self
}
pub fn set_load_balancer_info(
mut self,
input: std::option::Option<crate::model::LoadBalancerInfo>,
) -> Self {
self.load_balancer_info = input;
self
}
pub fn ec2_tag_set(mut self, input: crate::model::Ec2TagSet) -> Self {
self.ec2_tag_set = Some(input);
self
}
pub fn set_ec2_tag_set(
mut self,
input: std::option::Option<crate::model::Ec2TagSet>,
) -> Self {
self.ec2_tag_set = input;
self
}
pub fn ecs_services(mut self, input: impl Into<crate::model::EcsService>) -> Self {
let mut v = self.ecs_services.unwrap_or_default();
v.push(input.into());
self.ecs_services = Some(v);
self
}
pub fn set_ecs_services(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
) -> Self {
self.ecs_services = input;
self
}
pub fn on_premises_tag_set(mut self, input: crate::model::OnPremisesTagSet) -> Self {
self.on_premises_tag_set = Some(input);
self
}
pub fn set_on_premises_tag_set(
mut self,
input: std::option::Option<crate::model::OnPremisesTagSet>,
) -> Self {
self.on_premises_tag_set = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateDeploymentGroupInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateDeploymentGroupInput {
application_name: self.application_name,
current_deployment_group_name: self.current_deployment_group_name,
new_deployment_group_name: self.new_deployment_group_name,
deployment_config_name: self.deployment_config_name,
ec2_tag_filters: self.ec2_tag_filters,
on_premises_instance_tag_filters: self.on_premises_instance_tag_filters,
auto_scaling_groups: self.auto_scaling_groups,
service_role_arn: self.service_role_arn,
trigger_configurations: self.trigger_configurations,
alarm_configuration: self.alarm_configuration,
auto_rollback_configuration: self.auto_rollback_configuration,
outdated_instances_strategy: self.outdated_instances_strategy,
deployment_style: self.deployment_style,
blue_green_deployment_configuration: self.blue_green_deployment_configuration,
load_balancer_info: self.load_balancer_info,
ec2_tag_set: self.ec2_tag_set,
ecs_services: self.ecs_services,
on_premises_tag_set: self.on_premises_tag_set,
})
}
}
}
#[doc(hidden)]
pub type UpdateDeploymentGroupInputOperationOutputAlias = crate::operation::UpdateDeploymentGroup;
#[doc(hidden)]
pub type UpdateDeploymentGroupInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateDeploymentGroupInput {
#[allow(clippy::let_and_return)]
pub fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDeploymentGroup,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateDeploymentGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDeploymentGroupInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateDeploymentGroupInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"CodeDeploy_20141006.UpdateDeploymentGroup",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_deployment_group(
&self,
)
.map_err(|err| {
aws_smithy_http::operation::BuildError::SerializationError(err.into())
})?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
request
.properties_mut()
.insert(aws_http::user_agent::AwsUserAgent::new_from_environment(
crate::API_METADATA.clone(),
));
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDeploymentGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDeploymentGroup",
"codedeploy",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
mut builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_deployment_group_input::Builder {
crate::input::update_deployment_group_input::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateDeploymentGroupInput {
pub application_name: std::option::Option<std::string::String>,
pub current_deployment_group_name: std::option::Option<std::string::String>,
pub new_deployment_group_name: std::option::Option<std::string::String>,
pub deployment_config_name: std::option::Option<std::string::String>,
pub ec2_tag_filters: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
pub on_premises_instance_tag_filters:
std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub auto_scaling_groups: std::option::Option<std::vec::Vec<std::string::String>>,
pub service_role_arn: std::option::Option<std::string::String>,
pub trigger_configurations: std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
pub alarm_configuration: std::option::Option<crate::model::AlarmConfiguration>,
pub auto_rollback_configuration: std::option::Option<crate::model::AutoRollbackConfiguration>,
pub outdated_instances_strategy: std::option::Option<crate::model::OutdatedInstancesStrategy>,
pub deployment_style: std::option::Option<crate::model::DeploymentStyle>,
pub blue_green_deployment_configuration:
std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
pub load_balancer_info: std::option::Option<crate::model::LoadBalancerInfo>,
pub ec2_tag_set: std::option::Option<crate::model::Ec2TagSet>,
pub ecs_services: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
pub on_premises_tag_set: std::option::Option<crate::model::OnPremisesTagSet>,
}
impl std::fmt::Debug for UpdateDeploymentGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDeploymentGroupInput");
formatter.field("application_name", &self.application_name);
formatter.field(
"current_deployment_group_name",
&self.current_deployment_group_name,
);
formatter.field("new_deployment_group_name", &self.new_deployment_group_name);
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.field("ec2_tag_filters", &self.ec2_tag_filters);
formatter.field(
"on_premises_instance_tag_filters",
&self.on_premises_instance_tag_filters,
);
formatter.field("auto_scaling_groups", &self.auto_scaling_groups);
formatter.field("service_role_arn", &self.service_role_arn);
formatter.field("trigger_configurations", &self.trigger_configurations);
formatter.field("alarm_configuration", &self.alarm_configuration);
formatter.field(
"auto_rollback_configuration",
&self.auto_rollback_configuration,
);
formatter.field(
"outdated_instances_strategy",
&self.outdated_instances_strategy,
);
formatter.field("deployment_style", &self.deployment_style);
formatter.field(
"blue_green_deployment_configuration",
&self.blue_green_deployment_configuration,
);
formatter.field("load_balancer_info", &self.load_balancer_info);
formatter.field("ec2_tag_set", &self.ec2_tag_set);
formatter.field("ecs_services", &self.ecs_services);
formatter.field("on_premises_tag_set", &self.on_premises_tag_set);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateApplicationInput {
pub application_name: std::option::Option<std::string::String>,
pub new_application_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for UpdateApplicationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateApplicationInput");
formatter.field("application_name", &self.application_name);
formatter.field("new_application_name", &self.new_application_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &self.tag_keys);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopDeploymentInput {
pub deployment_id: std::option::Option<std::string::String>,
pub auto_rollback_enabled: std::option::Option<bool>,
}
impl std::fmt::Debug for StopDeploymentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopDeploymentInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("auto_rollback_enabled", &self.auto_rollback_enabled);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SkipWaitTimeForInstanceTerminationInput {
pub deployment_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for SkipWaitTimeForInstanceTerminationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SkipWaitTimeForInstanceTerminationInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RemoveTagsFromOnPremisesInstancesInput {
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for RemoveTagsFromOnPremisesInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RemoveTagsFromOnPremisesInstancesInput");
formatter.field("tags", &self.tags);
formatter.field("instance_names", &self.instance_names);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RegisterOnPremisesInstanceInput {
pub instance_name: std::option::Option<std::string::String>,
pub iam_session_arn: std::option::Option<std::string::String>,
pub iam_user_arn: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for RegisterOnPremisesInstanceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RegisterOnPremisesInstanceInput");
formatter.field("instance_name", &self.instance_name);
formatter.field("iam_session_arn", &self.iam_session_arn);
formatter.field("iam_user_arn", &self.iam_user_arn);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RegisterApplicationRevisionInput {
pub application_name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub revision: std::option::Option<crate::model::RevisionLocation>,
}
impl std::fmt::Debug for RegisterApplicationRevisionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RegisterApplicationRevisionInput");
formatter.field("application_name", &self.application_name);
formatter.field("description", &self.description);
formatter.field("revision", &self.revision);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutLifecycleEventHookExecutionStatusInput {
pub deployment_id: std::option::Option<std::string::String>,
pub lifecycle_event_hook_execution_id: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::LifecycleEventStatus>,
}
impl std::fmt::Debug for PutLifecycleEventHookExecutionStatusInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutLifecycleEventHookExecutionStatusInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field(
"lifecycle_event_hook_execution_id",
&self.lifecycle_event_hook_execution_id,
);
formatter.field("status", &self.status);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsForResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListTagsForResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsForResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListOnPremisesInstancesInput {
pub registration_status: std::option::Option<crate::model::RegistrationStatus>,
pub tag_filters: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListOnPremisesInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListOnPremisesInstancesInput");
formatter.field("registration_status", &self.registration_status);
formatter.field("tag_filters", &self.tag_filters);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListGitHubAccountTokenNamesInput {
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListGitHubAccountTokenNamesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListGitHubAccountTokenNamesInput");
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDeploymentTargetsInput {
pub deployment_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub target_filters: std::option::Option<
std::collections::HashMap<
crate::model::TargetFilterName,
std::vec::Vec<std::string::String>,
>,
>,
}
impl std::fmt::Debug for ListDeploymentTargetsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDeploymentTargetsInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("next_token", &self.next_token);
formatter.field("target_filters", &self.target_filters);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDeploymentsInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_name: std::option::Option<std::string::String>,
pub external_id: std::option::Option<std::string::String>,
pub include_only_statuses: std::option::Option<std::vec::Vec<crate::model::DeploymentStatus>>,
pub create_time_range: std::option::Option<crate::model::TimeRange>,
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListDeploymentsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDeploymentsInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_name", &self.deployment_group_name);
formatter.field("external_id", &self.external_id);
formatter.field("include_only_statuses", &self.include_only_statuses);
formatter.field("create_time_range", &self.create_time_range);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDeploymentInstancesInput {
pub deployment_id: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
pub instance_status_filter: std::option::Option<std::vec::Vec<crate::model::InstanceStatus>>,
pub instance_type_filter: std::option::Option<std::vec::Vec<crate::model::InstanceType>>,
}
impl std::fmt::Debug for ListDeploymentInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDeploymentInstancesInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("next_token", &self.next_token);
formatter.field("instance_status_filter", &self.instance_status_filter);
formatter.field("instance_type_filter", &self.instance_type_filter);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDeploymentGroupsInput {
pub application_name: std::option::Option<std::string::String>,
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListDeploymentGroupsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDeploymentGroupsInput");
formatter.field("application_name", &self.application_name);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDeploymentConfigsInput {
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListDeploymentConfigsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDeploymentConfigsInput");
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListApplicationsInput {
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListApplicationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListApplicationsInput");
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListApplicationRevisionsInput {
pub application_name: std::option::Option<std::string::String>,
pub sort_by: std::option::Option<crate::model::ApplicationRevisionSortBy>,
pub sort_order: std::option::Option<crate::model::SortOrder>,
pub s3_bucket: std::option::Option<std::string::String>,
pub s3_key_prefix: std::option::Option<std::string::String>,
pub deployed: std::option::Option<crate::model::ListStateFilterAction>,
pub next_token: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ListApplicationRevisionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListApplicationRevisionsInput");
formatter.field("application_name", &self.application_name);
formatter.field("sort_by", &self.sort_by);
formatter.field("sort_order", &self.sort_order);
formatter.field("s3_bucket", &self.s3_bucket);
formatter.field("s3_key_prefix", &self.s3_key_prefix);
formatter.field("deployed", &self.deployed);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetOnPremisesInstanceInput {
pub instance_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetOnPremisesInstanceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetOnPremisesInstanceInput");
formatter.field("instance_name", &self.instance_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDeploymentTargetInput {
pub deployment_id: std::option::Option<std::string::String>,
pub target_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetDeploymentTargetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDeploymentTargetInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("target_id", &self.target_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDeploymentInstanceInput {
pub deployment_id: std::option::Option<std::string::String>,
pub instance_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetDeploymentInstanceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDeploymentInstanceInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("instance_id", &self.instance_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDeploymentGroupInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetDeploymentGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDeploymentGroupInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_name", &self.deployment_group_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDeploymentConfigInput {
pub deployment_config_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetDeploymentConfigInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDeploymentConfigInput");
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDeploymentInput {
pub deployment_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetDeploymentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDeploymentInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetApplicationRevisionInput {
pub application_name: std::option::Option<std::string::String>,
pub revision: std::option::Option<crate::model::RevisionLocation>,
}
impl std::fmt::Debug for GetApplicationRevisionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetApplicationRevisionInput");
formatter.field("application_name", &self.application_name);
formatter.field("revision", &self.revision);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetApplicationInput {
pub application_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GetApplicationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetApplicationInput");
formatter.field("application_name", &self.application_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeregisterOnPremisesInstanceInput {
pub instance_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeregisterOnPremisesInstanceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeregisterOnPremisesInstanceInput");
formatter.field("instance_name", &self.instance_name);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteResourcesByExternalIdInput {
pub external_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeleteResourcesByExternalIdInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteResourcesByExternalIdInput");
formatter.field("external_id", &self.external_id);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteGitHubAccountTokenInput {
pub token_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeleteGitHubAccountTokenInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteGitHubAccountTokenInput");
formatter.field("token_name", &self.token_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDeploymentGroupInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeleteDeploymentGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDeploymentGroupInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_name", &self.deployment_group_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDeploymentConfigInput {
pub deployment_config_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeleteDeploymentConfigInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDeploymentConfigInput");
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteApplicationInput {
pub application_name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for DeleteApplicationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteApplicationInput");
formatter.field("application_name", &self.application_name);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDeploymentGroupInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_name: std::option::Option<std::string::String>,
pub deployment_config_name: std::option::Option<std::string::String>,
pub ec2_tag_filters: std::option::Option<std::vec::Vec<crate::model::Ec2TagFilter>>,
pub on_premises_instance_tag_filters:
std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
pub auto_scaling_groups: std::option::Option<std::vec::Vec<std::string::String>>,
pub service_role_arn: std::option::Option<std::string::String>,
pub trigger_configurations: std::option::Option<std::vec::Vec<crate::model::TriggerConfig>>,
pub alarm_configuration: std::option::Option<crate::model::AlarmConfiguration>,
pub auto_rollback_configuration: std::option::Option<crate::model::AutoRollbackConfiguration>,
pub outdated_instances_strategy: std::option::Option<crate::model::OutdatedInstancesStrategy>,
pub deployment_style: std::option::Option<crate::model::DeploymentStyle>,
pub blue_green_deployment_configuration:
std::option::Option<crate::model::BlueGreenDeploymentConfiguration>,
pub load_balancer_info: std::option::Option<crate::model::LoadBalancerInfo>,
pub ec2_tag_set: std::option::Option<crate::model::Ec2TagSet>,
pub ecs_services: std::option::Option<std::vec::Vec<crate::model::EcsService>>,
pub on_premises_tag_set: std::option::Option<crate::model::OnPremisesTagSet>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for CreateDeploymentGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDeploymentGroupInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_name", &self.deployment_group_name);
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.field("ec2_tag_filters", &self.ec2_tag_filters);
formatter.field(
"on_premises_instance_tag_filters",
&self.on_premises_instance_tag_filters,
);
formatter.field("auto_scaling_groups", &self.auto_scaling_groups);
formatter.field("service_role_arn", &self.service_role_arn);
formatter.field("trigger_configurations", &self.trigger_configurations);
formatter.field("alarm_configuration", &self.alarm_configuration);
formatter.field(
"auto_rollback_configuration",
&self.auto_rollback_configuration,
);
formatter.field(
"outdated_instances_strategy",
&self.outdated_instances_strategy,
);
formatter.field("deployment_style", &self.deployment_style);
formatter.field(
"blue_green_deployment_configuration",
&self.blue_green_deployment_configuration,
);
formatter.field("load_balancer_info", &self.load_balancer_info);
formatter.field("ec2_tag_set", &self.ec2_tag_set);
formatter.field("ecs_services", &self.ecs_services);
formatter.field("on_premises_tag_set", &self.on_premises_tag_set);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDeploymentConfigInput {
pub deployment_config_name: std::option::Option<std::string::String>,
pub minimum_healthy_hosts: std::option::Option<crate::model::MinimumHealthyHosts>,
pub traffic_routing_config: std::option::Option<crate::model::TrafficRoutingConfig>,
pub compute_platform: std::option::Option<crate::model::ComputePlatform>,
}
impl std::fmt::Debug for CreateDeploymentConfigInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDeploymentConfigInput");
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.field("minimum_healthy_hosts", &self.minimum_healthy_hosts);
formatter.field("traffic_routing_config", &self.traffic_routing_config);
formatter.field("compute_platform", &self.compute_platform);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDeploymentInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_name: std::option::Option<std::string::String>,
pub revision: std::option::Option<crate::model::RevisionLocation>,
pub deployment_config_name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub ignore_application_stop_failures: bool,
pub target_instances: std::option::Option<crate::model::TargetInstances>,
pub auto_rollback_configuration: std::option::Option<crate::model::AutoRollbackConfiguration>,
pub update_outdated_instances_only: bool,
pub file_exists_behavior: std::option::Option<crate::model::FileExistsBehavior>,
}
impl std::fmt::Debug for CreateDeploymentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDeploymentInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_name", &self.deployment_group_name);
formatter.field("revision", &self.revision);
formatter.field("deployment_config_name", &self.deployment_config_name);
formatter.field("description", &self.description);
formatter.field(
"ignore_application_stop_failures",
&self.ignore_application_stop_failures,
);
formatter.field("target_instances", &self.target_instances);
formatter.field(
"auto_rollback_configuration",
&self.auto_rollback_configuration,
);
formatter.field(
"update_outdated_instances_only",
&self.update_outdated_instances_only,
);
formatter.field("file_exists_behavior", &self.file_exists_behavior);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateApplicationInput {
pub application_name: std::option::Option<std::string::String>,
pub compute_platform: std::option::Option<crate::model::ComputePlatform>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl std::fmt::Debug for CreateApplicationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateApplicationInput");
formatter.field("application_name", &self.application_name);
formatter.field("compute_platform", &self.compute_platform);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ContinueDeploymentInput {
pub deployment_id: std::option::Option<std::string::String>,
pub deployment_wait_type: std::option::Option<crate::model::DeploymentWaitType>,
}
impl std::fmt::Debug for ContinueDeploymentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ContinueDeploymentInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("deployment_wait_type", &self.deployment_wait_type);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetOnPremisesInstancesInput {
pub instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetOnPremisesInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetOnPremisesInstancesInput");
formatter.field("instance_names", &self.instance_names);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetDeploymentTargetsInput {
pub deployment_id: std::option::Option<std::string::String>,
pub target_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetDeploymentTargetsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetDeploymentTargetsInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("target_ids", &self.target_ids);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetDeploymentsInput {
pub deployment_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetDeploymentsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetDeploymentsInput");
formatter.field("deployment_ids", &self.deployment_ids);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetDeploymentInstancesInput {
pub deployment_id: std::option::Option<std::string::String>,
pub instance_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetDeploymentInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetDeploymentInstancesInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("instance_ids", &self.instance_ids);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetDeploymentGroupsInput {
pub application_name: std::option::Option<std::string::String>,
pub deployment_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetDeploymentGroupsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetDeploymentGroupsInput");
formatter.field("application_name", &self.application_name);
formatter.field("deployment_group_names", &self.deployment_group_names);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetApplicationsInput {
pub application_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for BatchGetApplicationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetApplicationsInput");
formatter.field("application_names", &self.application_names);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchGetApplicationRevisionsInput {
pub application_name: std::option::Option<std::string::String>,
pub revisions: std::option::Option<std::vec::Vec<crate::model::RevisionLocation>>,
}
impl std::fmt::Debug for BatchGetApplicationRevisionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchGetApplicationRevisionsInput");
formatter.field("application_name", &self.application_name);
formatter.field("revisions", &self.revisions);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AddTagsToOnPremisesInstancesInput {
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub instance_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for AddTagsToOnPremisesInstancesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AddTagsToOnPremisesInstancesInput");
formatter.field("tags", &self.tags);
formatter.field("instance_names", &self.instance_names);
formatter.finish()
}
}