use std::fmt::Write;
pub mod cancel_image_creation_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_build_version_arn: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_build_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_build_version_arn = Some(input.into());
self
}
pub fn set_image_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_build_version_arn = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CancelImageCreationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CancelImageCreationInput {
image_build_version_arn: self.image_build_version_arn,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CancelImageCreationInputOperationOutputAlias = crate::operation::CancelImageCreation;
#[doc(hidden)]
pub type CancelImageCreationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CancelImageCreationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CancelImageCreation,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CancelImageCreationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CancelImageCreation").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CancelImageCreationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CancelImageCreationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_cancel_image_creation(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CancelImageCreation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CancelImageCreation",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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::cancel_image_creation_input::Builder {
crate::input::cancel_image_creation_input::Builder::default()
}
}
pub mod create_component_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) semantic_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) change_description: std::option::Option<std::string::String>,
pub(crate) platform: std::option::Option<crate::model::Platform>,
pub(crate) supported_os_versions: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) data: std::option::Option<std::string::String>,
pub(crate) uri: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn semantic_version(mut self, input: impl Into<std::string::String>) -> Self {
self.semantic_version = Some(input.into());
self
}
pub fn set_semantic_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.semantic_version = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn change_description(mut self, input: impl Into<std::string::String>) -> Self {
self.change_description = Some(input.into());
self
}
pub fn set_change_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.change_description = input;
self
}
pub fn platform(mut self, input: crate::model::Platform) -> Self {
self.platform = Some(input);
self
}
pub fn set_platform(mut self, input: std::option::Option<crate::model::Platform>) -> Self {
self.platform = input;
self
}
pub fn supported_os_versions(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.supported_os_versions.unwrap_or_default();
v.push(input.into());
self.supported_os_versions = Some(v);
self
}
pub fn set_supported_os_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.supported_os_versions = input;
self
}
pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
self.data = Some(input.into());
self
}
pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.data = input;
self
}
pub fn uri(mut self, input: impl Into<std::string::String>) -> Self {
self.uri = Some(input.into());
self
}
pub fn set_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.uri = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateComponentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateComponentInput {
name: self.name,
semantic_version: self.semantic_version,
description: self.description,
change_description: self.change_description,
platform: self.platform,
supported_os_versions: self.supported_os_versions,
data: self.data,
uri: self.uri,
kms_key_id: self.kms_key_id,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateComponentInputOperationOutputAlias = crate::operation::CreateComponent;
#[doc(hidden)]
pub type CreateComponentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateComponentInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateComponent,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateComponent").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateComponentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateComponentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_component(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateComponent",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_component_input::Builder {
crate::input::create_component_input::Builder::default()
}
}
pub mod create_container_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) container_type: std::option::Option<crate::model::ContainerType>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) semantic_version: std::option::Option<std::string::String>,
pub(crate) components:
std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
pub(crate) instance_configuration: std::option::Option<crate::model::InstanceConfiguration>,
pub(crate) dockerfile_template_data: std::option::Option<std::string::String>,
pub(crate) dockerfile_template_uri: std::option::Option<std::string::String>,
pub(crate) platform_override: std::option::Option<crate::model::Platform>,
pub(crate) image_os_version_override: std::option::Option<std::string::String>,
pub(crate) parent_image: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) working_directory: std::option::Option<std::string::String>,
pub(crate) target_repository: std::option::Option<crate::model::TargetContainerRepository>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn container_type(mut self, input: crate::model::ContainerType) -> Self {
self.container_type = Some(input);
self
}
pub fn set_container_type(
mut self,
input: std::option::Option<crate::model::ContainerType>,
) -> Self {
self.container_type = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn semantic_version(mut self, input: impl Into<std::string::String>) -> Self {
self.semantic_version = Some(input.into());
self
}
pub fn set_semantic_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.semantic_version = input;
self
}
pub fn components(
mut self,
input: impl Into<crate::model::ComponentConfiguration>,
) -> Self {
let mut v = self.components.unwrap_or_default();
v.push(input.into());
self.components = Some(v);
self
}
pub fn set_components(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
) -> Self {
self.components = input;
self
}
pub fn instance_configuration(
mut self,
input: crate::model::InstanceConfiguration,
) -> Self {
self.instance_configuration = Some(input);
self
}
pub fn set_instance_configuration(
mut self,
input: std::option::Option<crate::model::InstanceConfiguration>,
) -> Self {
self.instance_configuration = input;
self
}
pub fn dockerfile_template_data(mut self, input: impl Into<std::string::String>) -> Self {
self.dockerfile_template_data = Some(input.into());
self
}
pub fn set_dockerfile_template_data(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dockerfile_template_data = input;
self
}
pub fn dockerfile_template_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.dockerfile_template_uri = Some(input.into());
self
}
pub fn set_dockerfile_template_uri(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.dockerfile_template_uri = input;
self
}
pub fn platform_override(mut self, input: crate::model::Platform) -> Self {
self.platform_override = Some(input);
self
}
pub fn set_platform_override(
mut self,
input: std::option::Option<crate::model::Platform>,
) -> Self {
self.platform_override = input;
self
}
pub fn image_os_version_override(mut self, input: impl Into<std::string::String>) -> Self {
self.image_os_version_override = Some(input.into());
self
}
pub fn set_image_os_version_override(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_os_version_override = input;
self
}
pub fn parent_image(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_image = Some(input.into());
self
}
pub fn set_parent_image(mut self, input: std::option::Option<std::string::String>) -> Self {
self.parent_image = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn working_directory(mut self, input: impl Into<std::string::String>) -> Self {
self.working_directory = Some(input.into());
self
}
pub fn set_working_directory(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.working_directory = input;
self
}
pub fn target_repository(mut self, input: crate::model::TargetContainerRepository) -> Self {
self.target_repository = Some(input);
self
}
pub fn set_target_repository(
mut self,
input: std::option::Option<crate::model::TargetContainerRepository>,
) -> Self {
self.target_repository = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateContainerRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateContainerRecipeInput {
container_type: self.container_type,
name: self.name,
description: self.description,
semantic_version: self.semantic_version,
components: self.components,
instance_configuration: self.instance_configuration,
dockerfile_template_data: self.dockerfile_template_data,
dockerfile_template_uri: self.dockerfile_template_uri,
platform_override: self.platform_override,
image_os_version_override: self.image_os_version_override,
parent_image: self.parent_image,
tags: self.tags,
working_directory: self.working_directory,
target_repository: self.target_repository,
kms_key_id: self.kms_key_id,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateContainerRecipeInputOperationOutputAlias = crate::operation::CreateContainerRecipe;
#[doc(hidden)]
pub type CreateContainerRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateContainerRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateContainerRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateContainerRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateContainerRecipe").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateContainerRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateContainerRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_container_recipe(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateContainerRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateContainerRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_container_recipe_input::Builder {
crate::input::create_container_recipe_input::Builder::default()
}
}
pub mod create_distribution_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) distributions: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn distributions(mut self, input: impl Into<crate::model::Distribution>) -> Self {
let mut v = self.distributions.unwrap_or_default();
v.push(input.into());
self.distributions = Some(v);
self
}
pub fn set_distributions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
) -> Self {
self.distributions = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateDistributionConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDistributionConfigurationInput {
name: self.name,
description: self.description,
distributions: self.distributions,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateDistributionConfigurationInputOperationOutputAlias =
crate::operation::CreateDistributionConfiguration;
#[doc(hidden)]
pub type CreateDistributionConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateDistributionConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDistributionConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateDistributionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateDistributionConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDistributionConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateDistributionConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_distribution_configuration(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateDistributionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDistributionConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_distribution_configuration_input::Builder {
crate::input::create_distribution_configuration_input::Builder::default()
}
}
pub mod create_image_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub(crate) image_tests_configuration:
std::option::Option<crate::model::ImageTestsConfiguration>,
pub(crate) enhanced_image_metadata_enabled: std::option::Option<bool>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = input;
self
}
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = input;
self
}
pub fn image_tests_configuration(
mut self,
input: crate::model::ImageTestsConfiguration,
) -> Self {
self.image_tests_configuration = Some(input);
self
}
pub fn set_image_tests_configuration(
mut self,
input: std::option::Option<crate::model::ImageTestsConfiguration>,
) -> Self {
self.image_tests_configuration = input;
self
}
pub fn enhanced_image_metadata_enabled(mut self, input: bool) -> Self {
self.enhanced_image_metadata_enabled = Some(input);
self
}
pub fn set_enhanced_image_metadata_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.enhanced_image_metadata_enabled = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateImageInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateImageInput {
image_recipe_arn: self.image_recipe_arn,
container_recipe_arn: self.container_recipe_arn,
distribution_configuration_arn: self.distribution_configuration_arn,
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
image_tests_configuration: self.image_tests_configuration,
enhanced_image_metadata_enabled: self.enhanced_image_metadata_enabled,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateImageInputOperationOutputAlias = crate::operation::CreateImage;
#[doc(hidden)]
pub type CreateImageInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateImageInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateImage,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateImage").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateImageInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateImageInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_image(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateImage",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_input::Builder {
crate::input::create_image_input::Builder::default()
}
}
pub mod create_image_pipeline_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
pub(crate) image_tests_configuration:
std::option::Option<crate::model::ImageTestsConfiguration>,
pub(crate) enhanced_image_metadata_enabled: std::option::Option<bool>,
pub(crate) schedule: std::option::Option<crate::model::Schedule>,
pub(crate) status: std::option::Option<crate::model::PipelineStatus>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = input;
self
}
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = input;
self
}
pub fn image_tests_configuration(
mut self,
input: crate::model::ImageTestsConfiguration,
) -> Self {
self.image_tests_configuration = Some(input);
self
}
pub fn set_image_tests_configuration(
mut self,
input: std::option::Option<crate::model::ImageTestsConfiguration>,
) -> Self {
self.image_tests_configuration = input;
self
}
pub fn enhanced_image_metadata_enabled(mut self, input: bool) -> Self {
self.enhanced_image_metadata_enabled = Some(input);
self
}
pub fn set_enhanced_image_metadata_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.enhanced_image_metadata_enabled = input;
self
}
pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
self.schedule = Some(input);
self
}
pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
self.schedule = input;
self
}
pub fn status(mut self, input: crate::model::PipelineStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PipelineStatus>,
) -> Self {
self.status = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateImagePipelineInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateImagePipelineInput {
name: self.name,
description: self.description,
image_recipe_arn: self.image_recipe_arn,
container_recipe_arn: self.container_recipe_arn,
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
distribution_configuration_arn: self.distribution_configuration_arn,
image_tests_configuration: self.image_tests_configuration,
enhanced_image_metadata_enabled: self.enhanced_image_metadata_enabled,
schedule: self.schedule,
status: self.status,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateImagePipelineInputOperationOutputAlias = crate::operation::CreateImagePipeline;
#[doc(hidden)]
pub type CreateImagePipelineInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateImagePipelineInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateImagePipeline,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateImagePipelineInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateImagePipeline").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateImagePipelineInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateImagePipelineInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_image_pipeline(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateImagePipeline::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateImagePipeline",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_pipeline_input::Builder {
crate::input::create_image_pipeline_input::Builder::default()
}
}
pub mod create_image_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) semantic_version: std::option::Option<std::string::String>,
pub(crate) components:
std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
pub(crate) parent_image: std::option::Option<std::string::String>,
pub(crate) block_device_mappings:
std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) working_directory: std::option::Option<std::string::String>,
pub(crate) additional_instance_configuration:
std::option::Option<crate::model::AdditionalInstanceConfiguration>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn semantic_version(mut self, input: impl Into<std::string::String>) -> Self {
self.semantic_version = Some(input.into());
self
}
pub fn set_semantic_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.semantic_version = input;
self
}
pub fn components(
mut self,
input: impl Into<crate::model::ComponentConfiguration>,
) -> Self {
let mut v = self.components.unwrap_or_default();
v.push(input.into());
self.components = Some(v);
self
}
pub fn set_components(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
) -> Self {
self.components = input;
self
}
pub fn parent_image(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_image = Some(input.into());
self
}
pub fn set_parent_image(mut self, input: std::option::Option<std::string::String>) -> Self {
self.parent_image = input;
self
}
pub fn block_device_mappings(
mut self,
input: impl Into<crate::model::InstanceBlockDeviceMapping>,
) -> Self {
let mut v = self.block_device_mappings.unwrap_or_default();
v.push(input.into());
self.block_device_mappings = Some(v);
self
}
pub fn set_block_device_mappings(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
) -> Self {
self.block_device_mappings = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn working_directory(mut self, input: impl Into<std::string::String>) -> Self {
self.working_directory = Some(input.into());
self
}
pub fn set_working_directory(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.working_directory = input;
self
}
pub fn additional_instance_configuration(
mut self,
input: crate::model::AdditionalInstanceConfiguration,
) -> Self {
self.additional_instance_configuration = Some(input);
self
}
pub fn set_additional_instance_configuration(
mut self,
input: std::option::Option<crate::model::AdditionalInstanceConfiguration>,
) -> Self {
self.additional_instance_configuration = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateImageRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateImageRecipeInput {
name: self.name,
description: self.description,
semantic_version: self.semantic_version,
components: self.components,
parent_image: self.parent_image,
block_device_mappings: self.block_device_mappings,
tags: self.tags,
working_directory: self.working_directory,
additional_instance_configuration: self.additional_instance_configuration,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateImageRecipeInputOperationOutputAlias = crate::operation::CreateImageRecipe;
#[doc(hidden)]
pub type CreateImageRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateImageRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateImageRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateImageRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateImageRecipe").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateImageRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateImageRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_image_recipe(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateImageRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateImageRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_recipe_input::Builder {
crate::input::create_image_recipe_input::Builder::default()
}
}
pub mod create_infrastructure_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) instance_profile_name: std::option::Option<std::string::String>,
pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) subnet_id: std::option::Option<std::string::String>,
pub(crate) logging: std::option::Option<crate::model::Logging>,
pub(crate) key_pair: std::option::Option<std::string::String>,
pub(crate) terminate_instance_on_failure: std::option::Option<bool>,
pub(crate) sns_topic_arn: std::option::Option<std::string::String>,
pub(crate) resource_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) instance_metadata_options:
std::option::Option<crate::model::InstanceMetadataOptions>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn instance_types(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_types.unwrap_or_default();
v.push(input.into());
self.instance_types = Some(v);
self
}
pub fn set_instance_types(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_types = input;
self
}
pub fn instance_profile_name(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_profile_name = Some(input.into());
self
}
pub fn set_instance_profile_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_profile_name = input;
self
}
pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.security_group_ids.unwrap_or_default();
v.push(input.into());
self.security_group_ids = Some(v);
self
}
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.security_group_ids = input;
self
}
pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_id = Some(input.into());
self
}
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subnet_id = input;
self
}
pub fn logging(mut self, input: crate::model::Logging) -> Self {
self.logging = Some(input);
self
}
pub fn set_logging(mut self, input: std::option::Option<crate::model::Logging>) -> Self {
self.logging = input;
self
}
pub fn key_pair(mut self, input: impl Into<std::string::String>) -> Self {
self.key_pair = Some(input.into());
self
}
pub fn set_key_pair(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key_pair = input;
self
}
pub fn terminate_instance_on_failure(mut self, input: bool) -> Self {
self.terminate_instance_on_failure = Some(input);
self
}
pub fn set_terminate_instance_on_failure(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.terminate_instance_on_failure = input;
self
}
pub fn sns_topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.sns_topic_arn = Some(input.into());
self
}
pub fn set_sns_topic_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.sns_topic_arn = input;
self
}
pub fn resource_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.resource_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.resource_tags = Some(hash_map);
self
}
pub fn set_resource_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.resource_tags = input;
self
}
pub fn instance_metadata_options(
mut self,
input: crate::model::InstanceMetadataOptions,
) -> Self {
self.instance_metadata_options = Some(input);
self
}
pub fn set_instance_metadata_options(
mut self,
input: std::option::Option<crate::model::InstanceMetadataOptions>,
) -> Self {
self.instance_metadata_options = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateInfrastructureConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateInfrastructureConfigurationInput {
name: self.name,
description: self.description,
instance_types: self.instance_types,
instance_profile_name: self.instance_profile_name,
security_group_ids: self.security_group_ids,
subnet_id: self.subnet_id,
logging: self.logging,
key_pair: self.key_pair,
terminate_instance_on_failure: self.terminate_instance_on_failure,
sns_topic_arn: self.sns_topic_arn,
resource_tags: self.resource_tags,
instance_metadata_options: self.instance_metadata_options,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type CreateInfrastructureConfigurationInputOperationOutputAlias =
crate::operation::CreateInfrastructureConfiguration;
#[doc(hidden)]
pub type CreateInfrastructureConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateInfrastructureConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateInfrastructureConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateInfrastructureConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/CreateInfrastructureConfiguration")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateInfrastructureConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateInfrastructureConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_infrastructure_configuration(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::CreateInfrastructureConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateInfrastructureConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_infrastructure_configuration_input::Builder {
crate::input::create_infrastructure_configuration_input::Builder::default()
}
}
pub mod delete_component_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_build_version_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_build_version_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.component_build_version_arn = Some(input.into());
self
}
pub fn set_component_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_build_version_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteComponentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteComponentInput {
component_build_version_arn: self.component_build_version_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteComponentInputOperationOutputAlias = crate::operation::DeleteComponent;
#[doc(hidden)]
pub type DeleteComponentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteComponentInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteComponent,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteComponent").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteComponentInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_1) = &_input.component_build_version_arn {
query.push_kv(
"componentBuildVersionArn",
&aws_smithy_http::query::fmt_string(&inner_1),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteComponentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteComponentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteComponent",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_component_input::Builder {
crate::input::delete_component_input::Builder::default()
}
}
pub mod delete_container_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteContainerRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteContainerRecipeInput {
container_recipe_arn: self.container_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteContainerRecipeInputOperationOutputAlias = crate::operation::DeleteContainerRecipe;
#[doc(hidden)]
pub type DeleteContainerRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteContainerRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteContainerRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteContainerRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteContainerRecipe").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteContainerRecipeInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_2) = &_input.container_recipe_arn {
query.push_kv(
"containerRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_2),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteContainerRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteContainerRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteContainerRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteContainerRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_container_recipe_input::Builder {
crate::input::delete_container_recipe_input::Builder::default()
}
}
pub mod delete_distribution_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDistributionConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDistributionConfigurationInput {
distribution_configuration_arn: self.distribution_configuration_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteDistributionConfigurationInputOperationOutputAlias =
crate::operation::DeleteDistributionConfiguration;
#[doc(hidden)]
pub type DeleteDistributionConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteDistributionConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDistributionConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteDistributionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteDistributionConfiguration").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteDistributionConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_3) = &_input.distribution_configuration_arn {
query.push_kv(
"distributionConfigurationArn",
&aws_smithy_http::query::fmt_string(&inner_3),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDistributionConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteDistributionConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteDistributionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDistributionConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_distribution_configuration_input::Builder {
crate::input::delete_distribution_configuration_input::Builder::default()
}
}
pub mod delete_image_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_build_version_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_build_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_build_version_arn = Some(input.into());
self
}
pub fn set_image_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_build_version_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteImageInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteImageInput {
image_build_version_arn: self.image_build_version_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteImageInputOperationOutputAlias = crate::operation::DeleteImage;
#[doc(hidden)]
pub type DeleteImageInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteImageInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteImage,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteImage").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteImageInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_4) = &_input.image_build_version_arn {
query.push_kv(
"imageBuildVersionArn",
&aws_smithy_http::query::fmt_string(&inner_4),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteImageInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteImageInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteImage",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_image_input::Builder {
crate::input::delete_image_input::Builder::default()
}
}
pub mod delete_image_pipeline_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_pipeline_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_pipeline_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_pipeline_arn = Some(input.into());
self
}
pub fn set_image_pipeline_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_pipeline_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteImagePipelineInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteImagePipelineInput {
image_pipeline_arn: self.image_pipeline_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteImagePipelineInputOperationOutputAlias = crate::operation::DeleteImagePipeline;
#[doc(hidden)]
pub type DeleteImagePipelineInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteImagePipelineInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteImagePipeline,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteImagePipelineInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteImagePipeline").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteImagePipelineInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_5) = &_input.image_pipeline_arn {
query.push_kv(
"imagePipelineArn",
&aws_smithy_http::query::fmt_string(&inner_5),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteImagePipelineInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteImagePipelineInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteImagePipeline::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteImagePipeline",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_image_pipeline_input::Builder {
crate::input::delete_image_pipeline_input::Builder::default()
}
}
pub mod delete_image_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteImageRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteImageRecipeInput {
image_recipe_arn: self.image_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteImageRecipeInputOperationOutputAlias = crate::operation::DeleteImageRecipe;
#[doc(hidden)]
pub type DeleteImageRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteImageRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteImageRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteImageRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteImageRecipe").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteImageRecipeInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_6) = &_input.image_recipe_arn {
query.push_kv(
"imageRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_6),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteImageRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteImageRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteImageRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteImageRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_image_recipe_input::Builder {
crate::input::delete_image_recipe_input::Builder::default()
}
}
pub mod delete_infrastructure_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteInfrastructureConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteInfrastructureConfigurationInput {
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteInfrastructureConfigurationInputOperationOutputAlias =
crate::operation::DeleteInfrastructureConfiguration;
#[doc(hidden)]
pub type DeleteInfrastructureConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteInfrastructureConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteInfrastructureConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteInfrastructureConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/DeleteInfrastructureConfiguration")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteInfrastructureConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_7) = &_input.infrastructure_configuration_arn {
query.push_kv(
"infrastructureConfigurationArn",
&aws_smithy_http::query::fmt_string(&inner_7),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteInfrastructureConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteInfrastructureConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::DeleteInfrastructureConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteInfrastructureConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_infrastructure_configuration_input::Builder {
crate::input::delete_infrastructure_configuration_input::Builder::default()
}
}
pub mod get_component_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_build_version_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_build_version_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.component_build_version_arn = Some(input.into());
self
}
pub fn set_component_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_build_version_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetComponentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetComponentInput {
component_build_version_arn: self.component_build_version_arn,
})
}
}
}
#[doc(hidden)]
pub type GetComponentInputOperationOutputAlias = crate::operation::GetComponent;
#[doc(hidden)]
pub type GetComponentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetComponentInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetComponent,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetComponent").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetComponentInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_8) = &_input.component_build_version_arn {
query.push_kv(
"componentBuildVersionArn",
&aws_smithy_http::query::fmt_string(&inner_8),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComponentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetComponentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComponent",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_component_input::Builder {
crate::input::get_component_input::Builder::default()
}
}
pub mod get_component_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_arn = Some(input.into());
self
}
pub fn set_component_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetComponentPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetComponentPolicyInput {
component_arn: self.component_arn,
})
}
}
}
#[doc(hidden)]
pub type GetComponentPolicyInputOperationOutputAlias = crate::operation::GetComponentPolicy;
#[doc(hidden)]
pub type GetComponentPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetComponentPolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetComponentPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetComponentPolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetComponentPolicy").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetComponentPolicyInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_9) = &_input.component_arn {
query.push_kv(
"componentArn",
&aws_smithy_http::query::fmt_string(&inner_9),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetComponentPolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetComponentPolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetComponentPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetComponentPolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_component_policy_input::Builder {
crate::input::get_component_policy_input::Builder::default()
}
}
pub mod get_container_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetContainerRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetContainerRecipeInput {
container_recipe_arn: self.container_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type GetContainerRecipeInputOperationOutputAlias = crate::operation::GetContainerRecipe;
#[doc(hidden)]
pub type GetContainerRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetContainerRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetContainerRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetContainerRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetContainerRecipe").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetContainerRecipeInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_10) = &_input.container_recipe_arn {
query.push_kv(
"containerRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_10),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetContainerRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetContainerRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetContainerRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetContainerRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_container_recipe_input::Builder {
crate::input::get_container_recipe_input::Builder::default()
}
}
pub mod get_container_recipe_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetContainerRecipePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetContainerRecipePolicyInput {
container_recipe_arn: self.container_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type GetContainerRecipePolicyInputOperationOutputAlias =
crate::operation::GetContainerRecipePolicy;
#[doc(hidden)]
pub type GetContainerRecipePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetContainerRecipePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetContainerRecipePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetContainerRecipePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetContainerRecipePolicy").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetContainerRecipePolicyInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_11) = &_input.container_recipe_arn {
query.push_kv(
"containerRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_11),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetContainerRecipePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetContainerRecipePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetContainerRecipePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetContainerRecipePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_container_recipe_policy_input::Builder {
crate::input::get_container_recipe_policy_input::Builder::default()
}
}
pub mod get_distribution_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetDistributionConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetDistributionConfigurationInput {
distribution_configuration_arn: self.distribution_configuration_arn,
})
}
}
}
#[doc(hidden)]
pub type GetDistributionConfigurationInputOperationOutputAlias =
crate::operation::GetDistributionConfiguration;
#[doc(hidden)]
pub type GetDistributionConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetDistributionConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetDistributionConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetDistributionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetDistributionConfiguration").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetDistributionConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_12) = &_input.distribution_configuration_arn {
query.push_kv(
"distributionConfigurationArn",
&aws_smithy_http::query::fmt_string(&inner_12),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetDistributionConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetDistributionConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetDistributionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetDistributionConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_distribution_configuration_input::Builder {
crate::input::get_distribution_configuration_input::Builder::default()
}
}
pub mod get_image_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_build_version_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_build_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_build_version_arn = Some(input.into());
self
}
pub fn set_image_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_build_version_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetImageInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetImageInput {
image_build_version_arn: self.image_build_version_arn,
})
}
}
}
#[doc(hidden)]
pub type GetImageInputOperationOutputAlias = crate::operation::GetImage;
#[doc(hidden)]
pub type GetImageInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetImageInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetImage,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetImage").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetImageInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_13) = &_input.image_build_version_arn {
query.push_kv(
"imageBuildVersionArn",
&aws_smithy_http::query::fmt_string(&inner_13),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetImageInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetImageInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetImage::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetImage",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_image_input::Builder {
crate::input::get_image_input::Builder::default()
}
}
pub mod get_image_pipeline_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_pipeline_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_pipeline_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_pipeline_arn = Some(input.into());
self
}
pub fn set_image_pipeline_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_pipeline_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetImagePipelineInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetImagePipelineInput {
image_pipeline_arn: self.image_pipeline_arn,
})
}
}
}
#[doc(hidden)]
pub type GetImagePipelineInputOperationOutputAlias = crate::operation::GetImagePipeline;
#[doc(hidden)]
pub type GetImagePipelineInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetImagePipelineInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetImagePipeline,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetImagePipelineInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetImagePipeline").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetImagePipelineInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_14) = &_input.image_pipeline_arn {
query.push_kv(
"imagePipelineArn",
&aws_smithy_http::query::fmt_string(&inner_14),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetImagePipelineInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetImagePipelineInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetImagePipeline::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetImagePipeline",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_image_pipeline_input::Builder {
crate::input::get_image_pipeline_input::Builder::default()
}
}
pub mod get_image_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_arn = Some(input.into());
self
}
pub fn set_image_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.image_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetImagePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetImagePolicyInput {
image_arn: self.image_arn,
})
}
}
}
#[doc(hidden)]
pub type GetImagePolicyInputOperationOutputAlias = crate::operation::GetImagePolicy;
#[doc(hidden)]
pub type GetImagePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetImagePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetImagePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetImagePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetImagePolicy").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetImagePolicyInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_15) = &_input.image_arn {
query.push_kv("imageArn", &aws_smithy_http::query::fmt_string(&inner_15));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetImagePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetImagePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetImagePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetImagePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_image_policy_input::Builder {
crate::input::get_image_policy_input::Builder::default()
}
}
pub mod get_image_recipe_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetImageRecipeInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetImageRecipeInput {
image_recipe_arn: self.image_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type GetImageRecipeInputOperationOutputAlias = crate::operation::GetImageRecipe;
#[doc(hidden)]
pub type GetImageRecipeInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetImageRecipeInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetImageRecipe,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetImageRecipeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetImageRecipe").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetImageRecipeInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_16) = &_input.image_recipe_arn {
query.push_kv(
"imageRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_16),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetImageRecipeInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetImageRecipeInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetImageRecipe::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetImageRecipe",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_image_recipe_input::Builder {
crate::input::get_image_recipe_input::Builder::default()
}
}
pub mod get_image_recipe_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetImageRecipePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetImageRecipePolicyInput {
image_recipe_arn: self.image_recipe_arn,
})
}
}
}
#[doc(hidden)]
pub type GetImageRecipePolicyInputOperationOutputAlias = crate::operation::GetImageRecipePolicy;
#[doc(hidden)]
pub type GetImageRecipePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetImageRecipePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetImageRecipePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetImageRecipePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetImageRecipePolicy").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetImageRecipePolicyInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_17) = &_input.image_recipe_arn {
query.push_kv(
"imageRecipeArn",
&aws_smithy_http::query::fmt_string(&inner_17),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetImageRecipePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetImageRecipePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetImageRecipePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetImageRecipePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_image_recipe_policy_input::Builder {
crate::input::get_image_recipe_policy_input::Builder::default()
}
}
pub mod get_infrastructure_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::GetInfrastructureConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::GetInfrastructureConfigurationInput {
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
})
}
}
}
#[doc(hidden)]
pub type GetInfrastructureConfigurationInputOperationOutputAlias =
crate::operation::GetInfrastructureConfiguration;
#[doc(hidden)]
pub type GetInfrastructureConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl GetInfrastructureConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetInfrastructureConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::GetInfrastructureConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/GetInfrastructureConfiguration").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetInfrastructureConfigurationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_18) = &_input.infrastructure_configuration_arn {
query.push_kv(
"infrastructureConfigurationArn",
&aws_smithy_http::query::fmt_string(&inner_18),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetInfrastructureConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::GetInfrastructureConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::GetInfrastructureConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetInfrastructureConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::get_infrastructure_configuration_input::Builder {
crate::input::get_infrastructure_configuration_input::Builder::default()
}
}
pub mod import_component_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) semantic_version: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) change_description: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::ComponentType>,
pub(crate) format: std::option::Option<crate::model::ComponentFormat>,
pub(crate) platform: std::option::Option<crate::model::Platform>,
pub(crate) data: std::option::Option<std::string::String>,
pub(crate) uri: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn semantic_version(mut self, input: impl Into<std::string::String>) -> Self {
self.semantic_version = Some(input.into());
self
}
pub fn set_semantic_version(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.semantic_version = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn change_description(mut self, input: impl Into<std::string::String>) -> Self {
self.change_description = Some(input.into());
self
}
pub fn set_change_description(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.change_description = input;
self
}
pub fn r#type(mut self, input: crate::model::ComponentType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ComponentType>) -> Self {
self.r#type = input;
self
}
pub fn format(mut self, input: crate::model::ComponentFormat) -> Self {
self.format = Some(input);
self
}
pub fn set_format(
mut self,
input: std::option::Option<crate::model::ComponentFormat>,
) -> Self {
self.format = input;
self
}
pub fn platform(mut self, input: crate::model::Platform) -> Self {
self.platform = Some(input);
self
}
pub fn set_platform(mut self, input: std::option::Option<crate::model::Platform>) -> Self {
self.platform = input;
self
}
pub fn data(mut self, input: impl Into<std::string::String>) -> Self {
self.data = Some(input.into());
self
}
pub fn set_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.data = input;
self
}
pub fn uri(mut self, input: impl Into<std::string::String>) -> Self {
self.uri = Some(input.into());
self
}
pub fn set_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.uri = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ImportComponentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ImportComponentInput {
name: self.name,
semantic_version: self.semantic_version,
description: self.description,
change_description: self.change_description,
r#type: self.r#type,
format: self.format,
platform: self.platform,
data: self.data,
uri: self.uri,
kms_key_id: self.kms_key_id,
tags: self.tags,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type ImportComponentInputOperationOutputAlias = crate::operation::ImportComponent;
#[doc(hidden)]
pub type ImportComponentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ImportComponentInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ImportComponent,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ImportComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ImportComponent").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ImportComponentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ImportComponentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_import_component(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ImportComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ImportComponent",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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::import_component_input::Builder {
crate::input::import_component_input::Builder::default()
}
}
pub mod list_component_build_versions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_version_arn: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_version_arn = Some(input.into());
self
}
pub fn set_component_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_version_arn = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListComponentBuildVersionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListComponentBuildVersionsInput {
component_version_arn: self.component_version_arn,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListComponentBuildVersionsInputOperationOutputAlias =
crate::operation::ListComponentBuildVersions;
#[doc(hidden)]
pub type ListComponentBuildVersionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListComponentBuildVersionsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListComponentBuildVersions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListComponentBuildVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListComponentBuildVersions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListComponentBuildVersionsInput,
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::ListComponentBuildVersionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_component_build_versions(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListComponentBuildVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListComponentBuildVersions",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_component_build_versions_input::Builder {
crate::input::list_component_build_versions_input::Builder::default()
}
}
pub mod list_components_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::Ownership>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) by_name: std::option::Option<bool>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::Ownership) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Ownership>) -> Self {
self.owner = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn by_name(mut self, input: bool) -> Self {
self.by_name = Some(input);
self
}
pub fn set_by_name(mut self, input: std::option::Option<bool>) -> Self {
self.by_name = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn 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::ListComponentsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListComponentsInput {
owner: self.owner,
filters: self.filters,
by_name: self.by_name.unwrap_or_default(),
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListComponentsInputOperationOutputAlias = crate::operation::ListComponents;
#[doc(hidden)]
pub type ListComponentsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListComponentsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListComponents,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListComponentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListComponents").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListComponentsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::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::ListComponentsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_components(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListComponents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListComponents",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_components_input::Builder {
crate::input::list_components_input::Builder::default()
}
}
pub mod list_container_recipes_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::Ownership>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::Ownership) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Ownership>) -> Self {
self.owner = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListContainerRecipesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListContainerRecipesInput {
owner: self.owner,
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListContainerRecipesInputOperationOutputAlias = crate::operation::ListContainerRecipes;
#[doc(hidden)]
pub type ListContainerRecipesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListContainerRecipesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListContainerRecipes,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListContainerRecipesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListContainerRecipes").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListContainerRecipesInput,
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::ListContainerRecipesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_container_recipes(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListContainerRecipes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListContainerRecipes",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_container_recipes_input::Builder {
crate::input::list_container_recipes_input::Builder::default()
}
}
pub mod list_distribution_configurations_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListDistributionConfigurationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDistributionConfigurationsInput {
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListDistributionConfigurationsInputOperationOutputAlias =
crate::operation::ListDistributionConfigurations;
#[doc(hidden)]
pub type ListDistributionConfigurationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDistributionConfigurationsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListDistributionConfigurations,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDistributionConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListDistributionConfigurations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDistributionConfigurationsInput,
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::ListDistributionConfigurationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_distribution_configurations(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListDistributionConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDistributionConfigurations",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_distribution_configurations_input::Builder {
crate::input::list_distribution_configurations_input::Builder::default()
}
}
pub mod list_image_build_versions_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_version_arn: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_version_arn = Some(input.into());
self
}
pub fn set_image_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_version_arn = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImageBuildVersionsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImageBuildVersionsInput {
image_version_arn: self.image_version_arn,
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListImageBuildVersionsInputOperationOutputAlias = crate::operation::ListImageBuildVersions;
#[doc(hidden)]
pub type ListImageBuildVersionsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImageBuildVersionsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImageBuildVersions,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImageBuildVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImageBuildVersions").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImageBuildVersionsInput,
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::ListImageBuildVersionsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_build_versions(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImageBuildVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImageBuildVersions",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_build_versions_input::Builder {
crate::input::list_image_build_versions_input::Builder::default()
}
}
pub mod list_image_packages_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_build_version_arn: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_build_version_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_build_version_arn = Some(input.into());
self
}
pub fn set_image_build_version_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_build_version_arn = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImagePackagesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImagePackagesInput {
image_build_version_arn: self.image_build_version_arn,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListImagePackagesInputOperationOutputAlias = crate::operation::ListImagePackages;
#[doc(hidden)]
pub type ListImagePackagesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImagePackagesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImagePackages,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImagePackagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImagePackages").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImagePackagesInput,
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::ListImagePackagesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_packages(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImagePackages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImagePackages",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_packages_input::Builder {
crate::input::list_image_packages_input::Builder::default()
}
}
pub mod list_image_pipeline_images_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_pipeline_arn: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_pipeline_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_pipeline_arn = Some(input.into());
self
}
pub fn set_image_pipeline_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_pipeline_arn = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImagePipelineImagesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImagePipelineImagesInput {
image_pipeline_arn: self.image_pipeline_arn,
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListImagePipelineImagesInputOperationOutputAlias =
crate::operation::ListImagePipelineImages;
#[doc(hidden)]
pub type ListImagePipelineImagesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImagePipelineImagesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImagePipelineImages,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImagePipelineImagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImagePipelineImages").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImagePipelineImagesInput,
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::ListImagePipelineImagesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_pipeline_images(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImagePipelineImages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImagePipelineImages",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_pipeline_images_input::Builder {
crate::input::list_image_pipeline_images_input::Builder::default()
}
}
pub mod list_image_pipelines_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImagePipelinesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImagePipelinesInput {
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListImagePipelinesInputOperationOutputAlias = crate::operation::ListImagePipelines;
#[doc(hidden)]
pub type ListImagePipelinesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImagePipelinesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImagePipelines,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImagePipelinesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImagePipelines").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImagePipelinesInput,
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::ListImagePipelinesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_pipelines(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImagePipelines::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImagePipelines",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_pipelines_input::Builder {
crate::input::list_image_pipelines_input::Builder::default()
}
}
pub mod list_image_recipes_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::Ownership>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::Ownership) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Ownership>) -> Self {
self.owner = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImageRecipesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImageRecipesInput {
owner: self.owner,
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListImageRecipesInputOperationOutputAlias = crate::operation::ListImageRecipes;
#[doc(hidden)]
pub type ListImageRecipesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImageRecipesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImageRecipes,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImageRecipesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImageRecipes").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImageRecipesInput,
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::ListImageRecipesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_recipes(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImageRecipes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImageRecipes",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_recipes_input::Builder {
crate::input::list_image_recipes_input::Builder::default()
}
}
pub mod list_images_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) owner: std::option::Option<crate::model::Ownership>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) by_name: std::option::Option<bool>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) include_deprecated: std::option::Option<bool>,
}
impl Builder {
pub fn owner(mut self, input: crate::model::Ownership) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Ownership>) -> Self {
self.owner = input;
self
}
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn by_name(mut self, input: bool) -> Self {
self.by_name = Some(input);
self
}
pub fn set_by_name(mut self, input: std::option::Option<bool>) -> Self {
self.by_name = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn 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 include_deprecated(mut self, input: bool) -> Self {
self.include_deprecated = Some(input);
self
}
pub fn set_include_deprecated(mut self, input: std::option::Option<bool>) -> Self {
self.include_deprecated = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListImagesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListImagesInput {
owner: self.owner,
filters: self.filters,
by_name: self.by_name.unwrap_or_default(),
max_results: self.max_results,
next_token: self.next_token,
include_deprecated: self.include_deprecated,
})
}
}
}
#[doc(hidden)]
pub type ListImagesInputOperationOutputAlias = crate::operation::ListImages;
#[doc(hidden)]
pub type ListImagesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListImagesInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListImages,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListImagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListImages").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListImagesInput,
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::ListImagesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_images(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListImages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListImages",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_images_input::Builder {
crate::input::list_images_input::Builder::default()
}
}
pub mod list_infrastructure_configurations_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn filters(mut self, input: impl Into<crate::model::Filter>) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input.into());
self.filters = Some(v);
self
}
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListInfrastructureConfigurationsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListInfrastructureConfigurationsInput {
filters: self.filters,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListInfrastructureConfigurationsInputOperationOutputAlias =
crate::operation::ListInfrastructureConfigurations;
#[doc(hidden)]
pub type ListInfrastructureConfigurationsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListInfrastructureConfigurationsInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListInfrastructureConfigurations,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListInfrastructureConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/ListInfrastructureConfigurations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListInfrastructureConfigurationsInput,
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::ListInfrastructureConfigurationsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_infrastructure_configurations(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::ListInfrastructureConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListInfrastructureConfigurations",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_infrastructure_configurations_input::Builder {
crate::input::list_infrastructure_configurations_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTagsForResourceInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_19 = &_input.resource_arn;
let input_19 =
input_19
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_19, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListTagsForResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
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_component_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) component_arn: std::option::Option<std::string::String>,
pub(crate) policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn component_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.component_arn = Some(input.into());
self
}
pub fn set_component_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.component_arn = input;
self
}
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutComponentPolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutComponentPolicyInput {
component_arn: self.component_arn,
policy: self.policy,
})
}
}
}
#[doc(hidden)]
pub type PutComponentPolicyInputOperationOutputAlias = crate::operation::PutComponentPolicy;
#[doc(hidden)]
pub type PutComponentPolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutComponentPolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutComponentPolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutComponentPolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/PutComponentPolicy").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutComponentPolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutComponentPolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_component_policy(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutComponentPolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutComponentPolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_component_policy_input::Builder {
crate::input::put_component_policy_input::Builder::default()
}
}
pub mod put_container_recipe_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
pub(crate) policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutContainerRecipePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutContainerRecipePolicyInput {
container_recipe_arn: self.container_recipe_arn,
policy: self.policy,
})
}
}
}
#[doc(hidden)]
pub type PutContainerRecipePolicyInputOperationOutputAlias =
crate::operation::PutContainerRecipePolicy;
#[doc(hidden)]
pub type PutContainerRecipePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutContainerRecipePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutContainerRecipePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutContainerRecipePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/PutContainerRecipePolicy").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutContainerRecipePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutContainerRecipePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_container_recipe_policy(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutContainerRecipePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutContainerRecipePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_container_recipe_policy_input::Builder {
crate::input::put_container_recipe_policy_input::Builder::default()
}
}
pub mod put_image_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_arn: std::option::Option<std::string::String>,
pub(crate) policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_arn = Some(input.into());
self
}
pub fn set_image_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.image_arn = input;
self
}
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutImagePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutImagePolicyInput {
image_arn: self.image_arn,
policy: self.policy,
})
}
}
}
#[doc(hidden)]
pub type PutImagePolicyInputOperationOutputAlias = crate::operation::PutImagePolicy;
#[doc(hidden)]
pub type PutImagePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutImagePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutImagePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutImagePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/PutImagePolicy").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutImagePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutImagePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_policy(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutImagePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutImagePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_policy_input::Builder {
crate::input::put_image_policy_input::Builder::default()
}
}
pub mod put_image_recipe_policy_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
pub(crate) policy: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::PutImageRecipePolicyInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::PutImageRecipePolicyInput {
image_recipe_arn: self.image_recipe_arn,
policy: self.policy,
})
}
}
}
#[doc(hidden)]
pub type PutImageRecipePolicyInputOperationOutputAlias = crate::operation::PutImageRecipePolicy;
#[doc(hidden)]
pub type PutImageRecipePolicyInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl PutImageRecipePolicyInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutImageRecipePolicy,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::PutImageRecipePolicyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/PutImageRecipePolicy").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutImageRecipePolicyInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::PutImageRecipePolicyInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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_image_recipe_policy(
&self,
)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::PutImageRecipePolicy::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutImageRecipePolicy",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_recipe_policy_input::Builder {
crate::input::put_image_recipe_policy_input::Builder::default()
}
}
pub mod start_image_pipeline_execution_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_pipeline_arn: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_pipeline_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_pipeline_arn = Some(input.into());
self
}
pub fn set_image_pipeline_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_pipeline_arn = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartImagePipelineExecutionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartImagePipelineExecutionInput {
image_pipeline_arn: self.image_pipeline_arn,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type StartImagePipelineExecutionInputOperationOutputAlias =
crate::operation::StartImagePipelineExecution;
#[doc(hidden)]
pub type StartImagePipelineExecutionInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartImagePipelineExecutionInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartImagePipelineExecution,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartImagePipelineExecutionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/StartImagePipelineExecution").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartImagePipelineExecutionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartImagePipelineExecutionInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_image_pipeline_execution(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::StartImagePipelineExecution::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartImagePipelineExecution",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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::start_image_pipeline_execution_input::Builder {
crate::input::start_image_pipeline_execution_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TagResourceInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_20 = &_input.resource_arn;
let input_20 =
input_20
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_20, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::TagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
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)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let input_21 = &_input.resource_arn;
let input_21 =
input_21
.as_ref()
.ok_or(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
})?;
let resource_arn = aws_smithy_http::label::fmt_string(input_21, false);
if resource_arn.is_empty() {
return Err(aws_smithy_http::operation::BuildError::MissingField {
field: "resource_arn",
details: "cannot be empty or unset",
});
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_22) = &_input.tag_keys {
for inner_23 in inner_22 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_23));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UntagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = aws_smithy_http::body::SdkBody::from("");
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
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_distribution_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) distributions: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = 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 distributions(mut self, input: impl Into<crate::model::Distribution>) -> Self {
let mut v = self.distributions.unwrap_or_default();
v.push(input.into());
self.distributions = Some(v);
self
}
pub fn set_distributions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
) -> Self {
self.distributions = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateDistributionConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateDistributionConfigurationInput {
distribution_configuration_arn: self.distribution_configuration_arn,
description: self.description,
distributions: self.distributions,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type UpdateDistributionConfigurationInputOperationOutputAlias =
crate::operation::UpdateDistributionConfiguration;
#[doc(hidden)]
pub type UpdateDistributionConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateDistributionConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDistributionConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateDistributionConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/UpdateDistributionConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDistributionConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateDistributionConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_distribution_configuration(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::UpdateDistributionConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDistributionConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_distribution_configuration_input::Builder {
crate::input::update_distribution_configuration_input::Builder::default()
}
}
pub mod update_image_pipeline_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) image_pipeline_arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) image_recipe_arn: std::option::Option<std::string::String>,
pub(crate) container_recipe_arn: std::option::Option<std::string::String>,
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub(crate) distribution_configuration_arn: std::option::Option<std::string::String>,
pub(crate) image_tests_configuration:
std::option::Option<crate::model::ImageTestsConfiguration>,
pub(crate) enhanced_image_metadata_enabled: std::option::Option<bool>,
pub(crate) schedule: std::option::Option<crate::model::Schedule>,
pub(crate) status: std::option::Option<crate::model::PipelineStatus>,
pub(crate) client_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn image_pipeline_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_pipeline_arn = Some(input.into());
self
}
pub fn set_image_pipeline_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_pipeline_arn = 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 image_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.image_recipe_arn = Some(input.into());
self
}
pub fn set_image_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.image_recipe_arn = input;
self
}
pub fn container_recipe_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.container_recipe_arn = Some(input.into());
self
}
pub fn set_container_recipe_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.container_recipe_arn = input;
self
}
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = input;
self
}
pub fn distribution_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.distribution_configuration_arn = Some(input.into());
self
}
pub fn set_distribution_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.distribution_configuration_arn = input;
self
}
pub fn image_tests_configuration(
mut self,
input: crate::model::ImageTestsConfiguration,
) -> Self {
self.image_tests_configuration = Some(input);
self
}
pub fn set_image_tests_configuration(
mut self,
input: std::option::Option<crate::model::ImageTestsConfiguration>,
) -> Self {
self.image_tests_configuration = input;
self
}
pub fn enhanced_image_metadata_enabled(mut self, input: bool) -> Self {
self.enhanced_image_metadata_enabled = Some(input);
self
}
pub fn set_enhanced_image_metadata_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.enhanced_image_metadata_enabled = input;
self
}
pub fn schedule(mut self, input: crate::model::Schedule) -> Self {
self.schedule = Some(input);
self
}
pub fn set_schedule(mut self, input: std::option::Option<crate::model::Schedule>) -> Self {
self.schedule = input;
self
}
pub fn status(mut self, input: crate::model::PipelineStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PipelineStatus>,
) -> Self {
self.status = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateImagePipelineInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateImagePipelineInput {
image_pipeline_arn: self.image_pipeline_arn,
description: self.description,
image_recipe_arn: self.image_recipe_arn,
container_recipe_arn: self.container_recipe_arn,
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
distribution_configuration_arn: self.distribution_configuration_arn,
image_tests_configuration: self.image_tests_configuration,
enhanced_image_metadata_enabled: self.enhanced_image_metadata_enabled,
schedule: self.schedule,
status: self.status,
client_token: self.client_token,
})
}
}
}
#[doc(hidden)]
pub type UpdateImagePipelineInputOperationOutputAlias = crate::operation::UpdateImagePipeline;
#[doc(hidden)]
pub type UpdateImagePipelineInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateImagePipelineInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateImagePipeline,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateImagePipelineInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/UpdateImagePipeline").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateImagePipelineInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateImagePipelineInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_image_pipeline(&self)?;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::UpdateImagePipeline::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateImagePipeline",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_image_pipeline_input::Builder {
crate::input::update_image_pipeline_input::Builder::default()
}
}
pub mod update_infrastructure_configuration_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) instance_profile_name: std::option::Option<std::string::String>,
pub(crate) security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) subnet_id: std::option::Option<std::string::String>,
pub(crate) logging: std::option::Option<crate::model::Logging>,
pub(crate) key_pair: std::option::Option<std::string::String>,
pub(crate) terminate_instance_on_failure: std::option::Option<bool>,
pub(crate) sns_topic_arn: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) resource_tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) instance_metadata_options:
std::option::Option<crate::model::InstanceMetadataOptions>,
}
impl Builder {
pub fn infrastructure_configuration_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = Some(input.into());
self
}
pub fn set_infrastructure_configuration_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.infrastructure_configuration_arn = 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 instance_types(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.instance_types.unwrap_or_default();
v.push(input.into());
self.instance_types = Some(v);
self
}
pub fn set_instance_types(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.instance_types = input;
self
}
pub fn instance_profile_name(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_profile_name = Some(input.into());
self
}
pub fn set_instance_profile_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.instance_profile_name = input;
self
}
pub fn security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.security_group_ids.unwrap_or_default();
v.push(input.into());
self.security_group_ids = Some(v);
self
}
pub fn set_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.security_group_ids = input;
self
}
pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subnet_id = Some(input.into());
self
}
pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.subnet_id = input;
self
}
pub fn logging(mut self, input: crate::model::Logging) -> Self {
self.logging = Some(input);
self
}
pub fn set_logging(mut self, input: std::option::Option<crate::model::Logging>) -> Self {
self.logging = input;
self
}
pub fn key_pair(mut self, input: impl Into<std::string::String>) -> Self {
self.key_pair = Some(input.into());
self
}
pub fn set_key_pair(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key_pair = input;
self
}
pub fn terminate_instance_on_failure(mut self, input: bool) -> Self {
self.terminate_instance_on_failure = Some(input);
self
}
pub fn set_terminate_instance_on_failure(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.terminate_instance_on_failure = input;
self
}
pub fn sns_topic_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.sns_topic_arn = Some(input.into());
self
}
pub fn set_sns_topic_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.sns_topic_arn = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn resource_tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.resource_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.resource_tags = Some(hash_map);
self
}
pub fn set_resource_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.resource_tags = input;
self
}
pub fn instance_metadata_options(
mut self,
input: crate::model::InstanceMetadataOptions,
) -> Self {
self.instance_metadata_options = Some(input);
self
}
pub fn set_instance_metadata_options(
mut self,
input: std::option::Option<crate::model::InstanceMetadataOptions>,
) -> Self {
self.instance_metadata_options = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateInfrastructureConfigurationInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateInfrastructureConfigurationInput {
infrastructure_configuration_arn: self.infrastructure_configuration_arn,
description: self.description,
instance_types: self.instance_types,
instance_profile_name: self.instance_profile_name,
security_group_ids: self.security_group_ids,
subnet_id: self.subnet_id,
logging: self.logging,
key_pair: self.key_pair,
terminate_instance_on_failure: self.terminate_instance_on_failure,
sns_topic_arn: self.sns_topic_arn,
client_token: self.client_token,
resource_tags: self.resource_tags,
instance_metadata_options: self.instance_metadata_options,
})
}
}
}
#[doc(hidden)]
pub type UpdateInfrastructureConfigurationInputOperationOutputAlias =
crate::operation::UpdateInfrastructureConfiguration;
#[doc(hidden)]
pub type UpdateInfrastructureConfigurationInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateInfrastructureConfigurationInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateInfrastructureConfiguration,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateInfrastructureConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/UpdateInfrastructureConfiguration")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateInfrastructureConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateInfrastructureConfigurationInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
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/json",
);
Ok(builder)
}
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
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_infrastructure_configuration(&self)?
;
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,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[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::UpdateInfrastructureConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateInfrastructureConfiguration",
"imagebuilder",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
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_infrastructure_configuration_input::Builder {
crate::input::update_infrastructure_configuration_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateInfrastructureConfigurationInput {
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub instance_profile_name: std::option::Option<std::string::String>,
pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub subnet_id: std::option::Option<std::string::String>,
pub logging: std::option::Option<crate::model::Logging>,
pub key_pair: std::option::Option<std::string::String>,
pub terminate_instance_on_failure: std::option::Option<bool>,
pub sns_topic_arn: std::option::Option<std::string::String>,
pub client_token: std::option::Option<std::string::String>,
pub resource_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub instance_metadata_options: std::option::Option<crate::model::InstanceMetadataOptions>,
}
impl UpdateInfrastructureConfigurationInput {
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn instance_types(&self) -> std::option::Option<&[std::string::String]> {
self.instance_types.as_deref()
}
pub fn instance_profile_name(&self) -> std::option::Option<&str> {
self.instance_profile_name.as_deref()
}
pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
self.security_group_ids.as_deref()
}
pub fn subnet_id(&self) -> std::option::Option<&str> {
self.subnet_id.as_deref()
}
pub fn logging(&self) -> std::option::Option<&crate::model::Logging> {
self.logging.as_ref()
}
pub fn key_pair(&self) -> std::option::Option<&str> {
self.key_pair.as_deref()
}
pub fn terminate_instance_on_failure(&self) -> std::option::Option<bool> {
self.terminate_instance_on_failure
}
pub fn sns_topic_arn(&self) -> std::option::Option<&str> {
self.sns_topic_arn.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn resource_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.resource_tags.as_ref()
}
pub fn instance_metadata_options(
&self,
) -> std::option::Option<&crate::model::InstanceMetadataOptions> {
self.instance_metadata_options.as_ref()
}
}
impl std::fmt::Debug for UpdateInfrastructureConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateInfrastructureConfigurationInput");
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.field("description", &self.description);
formatter.field("instance_types", &self.instance_types);
formatter.field("instance_profile_name", &self.instance_profile_name);
formatter.field("security_group_ids", &self.security_group_ids);
formatter.field("subnet_id", &self.subnet_id);
formatter.field("logging", &self.logging);
formatter.field("key_pair", &self.key_pair);
formatter.field(
"terminate_instance_on_failure",
&self.terminate_instance_on_failure,
);
formatter.field("sns_topic_arn", &self.sns_topic_arn);
formatter.field("client_token", &self.client_token);
formatter.field("resource_tags", &self.resource_tags);
formatter.field("instance_metadata_options", &self.instance_metadata_options);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateImagePipelineInput {
pub image_pipeline_arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub image_recipe_arn: std::option::Option<std::string::String>,
pub container_recipe_arn: std::option::Option<std::string::String>,
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub distribution_configuration_arn: std::option::Option<std::string::String>,
pub image_tests_configuration: std::option::Option<crate::model::ImageTestsConfiguration>,
pub enhanced_image_metadata_enabled: std::option::Option<bool>,
pub schedule: std::option::Option<crate::model::Schedule>,
pub status: std::option::Option<crate::model::PipelineStatus>,
pub client_token: std::option::Option<std::string::String>,
}
impl UpdateImagePipelineInput {
pub fn image_pipeline_arn(&self) -> std::option::Option<&str> {
self.image_pipeline_arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
pub fn image_tests_configuration(
&self,
) -> std::option::Option<&crate::model::ImageTestsConfiguration> {
self.image_tests_configuration.as_ref()
}
pub fn enhanced_image_metadata_enabled(&self) -> std::option::Option<bool> {
self.enhanced_image_metadata_enabled
}
pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
self.schedule.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PipelineStatus> {
self.status.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for UpdateImagePipelineInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateImagePipelineInput");
formatter.field("image_pipeline_arn", &self.image_pipeline_arn);
formatter.field("description", &self.description);
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.field("image_tests_configuration", &self.image_tests_configuration);
formatter.field(
"enhanced_image_metadata_enabled",
&self.enhanced_image_metadata_enabled,
);
formatter.field("schedule", &self.schedule);
formatter.field("status", &self.status);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateDistributionConfigurationInput {
pub distribution_configuration_arn: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub distributions: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
pub client_token: std::option::Option<std::string::String>,
}
impl UpdateDistributionConfigurationInput {
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn distributions(&self) -> std::option::Option<&[crate::model::Distribution]> {
self.distributions.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for UpdateDistributionConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDistributionConfigurationInput");
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.field("description", &self.description);
formatter.field("distributions", &self.distributions);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &self.tag_keys);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartImagePipelineExecutionInput {
pub image_pipeline_arn: std::option::Option<std::string::String>,
pub client_token: std::option::Option<std::string::String>,
}
impl StartImagePipelineExecutionInput {
pub fn image_pipeline_arn(&self) -> std::option::Option<&str> {
self.image_pipeline_arn.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for StartImagePipelineExecutionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartImagePipelineExecutionInput");
formatter.field("image_pipeline_arn", &self.image_pipeline_arn);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutImageRecipePolicyInput {
pub image_recipe_arn: std::option::Option<std::string::String>,
pub policy: std::option::Option<std::string::String>,
}
impl PutImageRecipePolicyInput {
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
}
impl std::fmt::Debug for PutImageRecipePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutImageRecipePolicyInput");
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.field("policy", &self.policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutImagePolicyInput {
pub image_arn: std::option::Option<std::string::String>,
pub policy: std::option::Option<std::string::String>,
}
impl PutImagePolicyInput {
pub fn image_arn(&self) -> std::option::Option<&str> {
self.image_arn.as_deref()
}
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
}
impl std::fmt::Debug for PutImagePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutImagePolicyInput");
formatter.field("image_arn", &self.image_arn);
formatter.field("policy", &self.policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutContainerRecipePolicyInput {
pub container_recipe_arn: std::option::Option<std::string::String>,
pub policy: std::option::Option<std::string::String>,
}
impl PutContainerRecipePolicyInput {
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
}
impl std::fmt::Debug for PutContainerRecipePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutContainerRecipePolicyInput");
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.field("policy", &self.policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutComponentPolicyInput {
pub component_arn: std::option::Option<std::string::String>,
pub policy: std::option::Option<std::string::String>,
}
impl PutComponentPolicyInput {
pub fn component_arn(&self) -> std::option::Option<&str> {
self.component_arn.as_deref()
}
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
}
impl std::fmt::Debug for PutComponentPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutComponentPolicyInput");
formatter.field("component_arn", &self.component_arn);
formatter.field("policy", &self.policy);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsForResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl std::fmt::Debug for ListTagsForResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsForResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListInfrastructureConfigurationsInput {
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListInfrastructureConfigurationsInput {
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListInfrastructureConfigurationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListInfrastructureConfigurationsInput");
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImagesInput {
pub owner: std::option::Option<crate::model::Ownership>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub by_name: bool,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
pub include_deprecated: std::option::Option<bool>,
}
impl ListImagesInput {
pub fn owner(&self) -> std::option::Option<&crate::model::Ownership> {
self.owner.as_ref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn by_name(&self) -> bool {
self.by_name
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn include_deprecated(&self) -> std::option::Option<bool> {
self.include_deprecated
}
}
impl std::fmt::Debug for ListImagesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImagesInput");
formatter.field("owner", &self.owner);
formatter.field("filters", &self.filters);
formatter.field("by_name", &self.by_name);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.field("include_deprecated", &self.include_deprecated);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImageRecipesInput {
pub owner: std::option::Option<crate::model::Ownership>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListImageRecipesInput {
pub fn owner(&self) -> std::option::Option<&crate::model::Ownership> {
self.owner.as_ref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListImageRecipesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImageRecipesInput");
formatter.field("owner", &self.owner);
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImagePipelinesInput {
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListImagePipelinesInput {
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListImagePipelinesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImagePipelinesInput");
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImagePipelineImagesInput {
pub image_pipeline_arn: std::option::Option<std::string::String>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListImagePipelineImagesInput {
pub fn image_pipeline_arn(&self) -> std::option::Option<&str> {
self.image_pipeline_arn.as_deref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListImagePipelineImagesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImagePipelineImagesInput");
formatter.field("image_pipeline_arn", &self.image_pipeline_arn);
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImagePackagesInput {
pub image_build_version_arn: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListImagePackagesInput {
pub fn image_build_version_arn(&self) -> std::option::Option<&str> {
self.image_build_version_arn.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListImagePackagesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImagePackagesInput");
formatter.field("image_build_version_arn", &self.image_build_version_arn);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListImageBuildVersionsInput {
pub image_version_arn: std::option::Option<std::string::String>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListImageBuildVersionsInput {
pub fn image_version_arn(&self) -> std::option::Option<&str> {
self.image_version_arn.as_deref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListImageBuildVersionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListImageBuildVersionsInput");
formatter.field("image_version_arn", &self.image_version_arn);
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDistributionConfigurationsInput {
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListDistributionConfigurationsInput {
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListDistributionConfigurationsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDistributionConfigurationsInput");
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListContainerRecipesInput {
pub owner: std::option::Option<crate::model::Ownership>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListContainerRecipesInput {
pub fn owner(&self) -> std::option::Option<&crate::model::Ownership> {
self.owner.as_ref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListContainerRecipesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListContainerRecipesInput");
formatter.field("owner", &self.owner);
formatter.field("filters", &self.filters);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListComponentsInput {
pub owner: std::option::Option<crate::model::Ownership>,
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
pub by_name: bool,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListComponentsInput {
pub fn owner(&self) -> std::option::Option<&crate::model::Ownership> {
self.owner.as_ref()
}
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
pub fn by_name(&self) -> bool {
self.by_name
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListComponentsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListComponentsInput");
formatter.field("owner", &self.owner);
formatter.field("filters", &self.filters);
formatter.field("by_name", &self.by_name);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListComponentBuildVersionsInput {
pub component_version_arn: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListComponentBuildVersionsInput {
pub fn component_version_arn(&self) -> std::option::Option<&str> {
self.component_version_arn.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListComponentBuildVersionsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListComponentBuildVersionsInput");
formatter.field("component_version_arn", &self.component_version_arn);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ImportComponentInput {
pub name: std::option::Option<std::string::String>,
pub semantic_version: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub change_description: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::ComponentType>,
pub format: std::option::Option<crate::model::ComponentFormat>,
pub platform: std::option::Option<crate::model::Platform>,
pub data: std::option::Option<std::string::String>,
pub uri: std::option::Option<std::string::String>,
pub kms_key_id: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl ImportComponentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn semantic_version(&self) -> std::option::Option<&str> {
self.semantic_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn change_description(&self) -> std::option::Option<&str> {
self.change_description.as_deref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::ComponentType> {
self.r#type.as_ref()
}
pub fn format(&self) -> std::option::Option<&crate::model::ComponentFormat> {
self.format.as_ref()
}
pub fn platform(&self) -> std::option::Option<&crate::model::Platform> {
self.platform.as_ref()
}
pub fn data(&self) -> std::option::Option<&str> {
self.data.as_deref()
}
pub fn uri(&self) -> std::option::Option<&str> {
self.uri.as_deref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for ImportComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ImportComponentInput");
formatter.field("name", &self.name);
formatter.field("semantic_version", &self.semantic_version);
formatter.field("description", &self.description);
formatter.field("change_description", &self.change_description);
formatter.field("r#type", &self.r#type);
formatter.field("format", &self.format);
formatter.field("platform", &self.platform);
formatter.field("data", &self.data);
formatter.field("uri", &self.uri);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetInfrastructureConfigurationInput {
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
}
impl GetInfrastructureConfigurationInput {
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
}
impl std::fmt::Debug for GetInfrastructureConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetInfrastructureConfigurationInput");
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetImageRecipePolicyInput {
pub image_recipe_arn: std::option::Option<std::string::String>,
}
impl GetImageRecipePolicyInput {
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for GetImageRecipePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetImageRecipePolicyInput");
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetImageRecipeInput {
pub image_recipe_arn: std::option::Option<std::string::String>,
}
impl GetImageRecipeInput {
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for GetImageRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetImageRecipeInput");
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetImagePolicyInput {
pub image_arn: std::option::Option<std::string::String>,
}
impl GetImagePolicyInput {
pub fn image_arn(&self) -> std::option::Option<&str> {
self.image_arn.as_deref()
}
}
impl std::fmt::Debug for GetImagePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetImagePolicyInput");
formatter.field("image_arn", &self.image_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetImagePipelineInput {
pub image_pipeline_arn: std::option::Option<std::string::String>,
}
impl GetImagePipelineInput {
pub fn image_pipeline_arn(&self) -> std::option::Option<&str> {
self.image_pipeline_arn.as_deref()
}
}
impl std::fmt::Debug for GetImagePipelineInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetImagePipelineInput");
formatter.field("image_pipeline_arn", &self.image_pipeline_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetImageInput {
pub image_build_version_arn: std::option::Option<std::string::String>,
}
impl GetImageInput {
pub fn image_build_version_arn(&self) -> std::option::Option<&str> {
self.image_build_version_arn.as_deref()
}
}
impl std::fmt::Debug for GetImageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetImageInput");
formatter.field("image_build_version_arn", &self.image_build_version_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDistributionConfigurationInput {
pub distribution_configuration_arn: std::option::Option<std::string::String>,
}
impl GetDistributionConfigurationInput {
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
}
impl std::fmt::Debug for GetDistributionConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDistributionConfigurationInput");
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetContainerRecipePolicyInput {
pub container_recipe_arn: std::option::Option<std::string::String>,
}
impl GetContainerRecipePolicyInput {
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for GetContainerRecipePolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetContainerRecipePolicyInput");
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetContainerRecipeInput {
pub container_recipe_arn: std::option::Option<std::string::String>,
}
impl GetContainerRecipeInput {
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for GetContainerRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetContainerRecipeInput");
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetComponentPolicyInput {
pub component_arn: std::option::Option<std::string::String>,
}
impl GetComponentPolicyInput {
pub fn component_arn(&self) -> std::option::Option<&str> {
self.component_arn.as_deref()
}
}
impl std::fmt::Debug for GetComponentPolicyInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetComponentPolicyInput");
formatter.field("component_arn", &self.component_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetComponentInput {
pub component_build_version_arn: std::option::Option<std::string::String>,
}
impl GetComponentInput {
pub fn component_build_version_arn(&self) -> std::option::Option<&str> {
self.component_build_version_arn.as_deref()
}
}
impl std::fmt::Debug for GetComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetComponentInput");
formatter.field(
"component_build_version_arn",
&self.component_build_version_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteInfrastructureConfigurationInput {
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
}
impl DeleteInfrastructureConfigurationInput {
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteInfrastructureConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteInfrastructureConfigurationInput");
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteImageRecipeInput {
pub image_recipe_arn: std::option::Option<std::string::String>,
}
impl DeleteImageRecipeInput {
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteImageRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteImageRecipeInput");
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteImagePipelineInput {
pub image_pipeline_arn: std::option::Option<std::string::String>,
}
impl DeleteImagePipelineInput {
pub fn image_pipeline_arn(&self) -> std::option::Option<&str> {
self.image_pipeline_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteImagePipelineInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteImagePipelineInput");
formatter.field("image_pipeline_arn", &self.image_pipeline_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteImageInput {
pub image_build_version_arn: std::option::Option<std::string::String>,
}
impl DeleteImageInput {
pub fn image_build_version_arn(&self) -> std::option::Option<&str> {
self.image_build_version_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteImageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteImageInput");
formatter.field("image_build_version_arn", &self.image_build_version_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDistributionConfigurationInput {
pub distribution_configuration_arn: std::option::Option<std::string::String>,
}
impl DeleteDistributionConfigurationInput {
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteDistributionConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDistributionConfigurationInput");
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteContainerRecipeInput {
pub container_recipe_arn: std::option::Option<std::string::String>,
}
impl DeleteContainerRecipeInput {
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteContainerRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteContainerRecipeInput");
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteComponentInput {
pub component_build_version_arn: std::option::Option<std::string::String>,
}
impl DeleteComponentInput {
pub fn component_build_version_arn(&self) -> std::option::Option<&str> {
self.component_build_version_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteComponentInput");
formatter.field(
"component_build_version_arn",
&self.component_build_version_arn,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateInfrastructureConfigurationInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub instance_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub instance_profile_name: std::option::Option<std::string::String>,
pub security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub subnet_id: std::option::Option<std::string::String>,
pub logging: std::option::Option<crate::model::Logging>,
pub key_pair: std::option::Option<std::string::String>,
pub terminate_instance_on_failure: std::option::Option<bool>,
pub sns_topic_arn: std::option::Option<std::string::String>,
pub resource_tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub instance_metadata_options: std::option::Option<crate::model::InstanceMetadataOptions>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateInfrastructureConfigurationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn instance_types(&self) -> std::option::Option<&[std::string::String]> {
self.instance_types.as_deref()
}
pub fn instance_profile_name(&self) -> std::option::Option<&str> {
self.instance_profile_name.as_deref()
}
pub fn security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
self.security_group_ids.as_deref()
}
pub fn subnet_id(&self) -> std::option::Option<&str> {
self.subnet_id.as_deref()
}
pub fn logging(&self) -> std::option::Option<&crate::model::Logging> {
self.logging.as_ref()
}
pub fn key_pair(&self) -> std::option::Option<&str> {
self.key_pair.as_deref()
}
pub fn terminate_instance_on_failure(&self) -> std::option::Option<bool> {
self.terminate_instance_on_failure
}
pub fn sns_topic_arn(&self) -> std::option::Option<&str> {
self.sns_topic_arn.as_deref()
}
pub fn resource_tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.resource_tags.as_ref()
}
pub fn instance_metadata_options(
&self,
) -> std::option::Option<&crate::model::InstanceMetadataOptions> {
self.instance_metadata_options.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateInfrastructureConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateInfrastructureConfigurationInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("instance_types", &self.instance_types);
formatter.field("instance_profile_name", &self.instance_profile_name);
formatter.field("security_group_ids", &self.security_group_ids);
formatter.field("subnet_id", &self.subnet_id);
formatter.field("logging", &self.logging);
formatter.field("key_pair", &self.key_pair);
formatter.field(
"terminate_instance_on_failure",
&self.terminate_instance_on_failure,
);
formatter.field("sns_topic_arn", &self.sns_topic_arn);
formatter.field("resource_tags", &self.resource_tags);
formatter.field("instance_metadata_options", &self.instance_metadata_options);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateImageRecipeInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub semantic_version: std::option::Option<std::string::String>,
pub components: std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
pub parent_image: std::option::Option<std::string::String>,
pub block_device_mappings:
std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub working_directory: std::option::Option<std::string::String>,
pub additional_instance_configuration:
std::option::Option<crate::model::AdditionalInstanceConfiguration>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateImageRecipeInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn semantic_version(&self) -> std::option::Option<&str> {
self.semantic_version.as_deref()
}
pub fn components(&self) -> std::option::Option<&[crate::model::ComponentConfiguration]> {
self.components.as_deref()
}
pub fn parent_image(&self) -> std::option::Option<&str> {
self.parent_image.as_deref()
}
pub fn block_device_mappings(
&self,
) -> std::option::Option<&[crate::model::InstanceBlockDeviceMapping]> {
self.block_device_mappings.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn working_directory(&self) -> std::option::Option<&str> {
self.working_directory.as_deref()
}
pub fn additional_instance_configuration(
&self,
) -> std::option::Option<&crate::model::AdditionalInstanceConfiguration> {
self.additional_instance_configuration.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateImageRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateImageRecipeInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("semantic_version", &self.semantic_version);
formatter.field("components", &self.components);
formatter.field("parent_image", &self.parent_image);
formatter.field("block_device_mappings", &self.block_device_mappings);
formatter.field("tags", &self.tags);
formatter.field("working_directory", &self.working_directory);
formatter.field(
"additional_instance_configuration",
&self.additional_instance_configuration,
);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateImagePipelineInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub image_recipe_arn: std::option::Option<std::string::String>,
pub container_recipe_arn: std::option::Option<std::string::String>,
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub distribution_configuration_arn: std::option::Option<std::string::String>,
pub image_tests_configuration: std::option::Option<crate::model::ImageTestsConfiguration>,
pub enhanced_image_metadata_enabled: std::option::Option<bool>,
pub schedule: std::option::Option<crate::model::Schedule>,
pub status: std::option::Option<crate::model::PipelineStatus>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateImagePipelineInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
pub fn image_tests_configuration(
&self,
) -> std::option::Option<&crate::model::ImageTestsConfiguration> {
self.image_tests_configuration.as_ref()
}
pub fn enhanced_image_metadata_enabled(&self) -> std::option::Option<bool> {
self.enhanced_image_metadata_enabled
}
pub fn schedule(&self) -> std::option::Option<&crate::model::Schedule> {
self.schedule.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PipelineStatus> {
self.status.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateImagePipelineInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateImagePipelineInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.field("image_tests_configuration", &self.image_tests_configuration);
formatter.field(
"enhanced_image_metadata_enabled",
&self.enhanced_image_metadata_enabled,
);
formatter.field("schedule", &self.schedule);
formatter.field("status", &self.status);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateImageInput {
pub image_recipe_arn: std::option::Option<std::string::String>,
pub container_recipe_arn: std::option::Option<std::string::String>,
pub distribution_configuration_arn: std::option::Option<std::string::String>,
pub infrastructure_configuration_arn: std::option::Option<std::string::String>,
pub image_tests_configuration: std::option::Option<crate::model::ImageTestsConfiguration>,
pub enhanced_image_metadata_enabled: std::option::Option<bool>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateImageInput {
pub fn image_recipe_arn(&self) -> std::option::Option<&str> {
self.image_recipe_arn.as_deref()
}
pub fn container_recipe_arn(&self) -> std::option::Option<&str> {
self.container_recipe_arn.as_deref()
}
pub fn distribution_configuration_arn(&self) -> std::option::Option<&str> {
self.distribution_configuration_arn.as_deref()
}
pub fn infrastructure_configuration_arn(&self) -> std::option::Option<&str> {
self.infrastructure_configuration_arn.as_deref()
}
pub fn image_tests_configuration(
&self,
) -> std::option::Option<&crate::model::ImageTestsConfiguration> {
self.image_tests_configuration.as_ref()
}
pub fn enhanced_image_metadata_enabled(&self) -> std::option::Option<bool> {
self.enhanced_image_metadata_enabled
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateImageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateImageInput");
formatter.field("image_recipe_arn", &self.image_recipe_arn);
formatter.field("container_recipe_arn", &self.container_recipe_arn);
formatter.field(
"distribution_configuration_arn",
&self.distribution_configuration_arn,
);
formatter.field(
"infrastructure_configuration_arn",
&self.infrastructure_configuration_arn,
);
formatter.field("image_tests_configuration", &self.image_tests_configuration);
formatter.field(
"enhanced_image_metadata_enabled",
&self.enhanced_image_metadata_enabled,
);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDistributionConfigurationInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub distributions: std::option::Option<std::vec::Vec<crate::model::Distribution>>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateDistributionConfigurationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn distributions(&self) -> std::option::Option<&[crate::model::Distribution]> {
self.distributions.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateDistributionConfigurationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDistributionConfigurationInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("distributions", &self.distributions);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateContainerRecipeInput {
pub container_type: std::option::Option<crate::model::ContainerType>,
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub semantic_version: std::option::Option<std::string::String>,
pub components: std::option::Option<std::vec::Vec<crate::model::ComponentConfiguration>>,
pub instance_configuration: std::option::Option<crate::model::InstanceConfiguration>,
pub dockerfile_template_data: std::option::Option<std::string::String>,
pub dockerfile_template_uri: std::option::Option<std::string::String>,
pub platform_override: std::option::Option<crate::model::Platform>,
pub image_os_version_override: std::option::Option<std::string::String>,
pub parent_image: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub working_directory: std::option::Option<std::string::String>,
pub target_repository: std::option::Option<crate::model::TargetContainerRepository>,
pub kms_key_id: std::option::Option<std::string::String>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateContainerRecipeInput {
pub fn container_type(&self) -> std::option::Option<&crate::model::ContainerType> {
self.container_type.as_ref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn semantic_version(&self) -> std::option::Option<&str> {
self.semantic_version.as_deref()
}
pub fn components(&self) -> std::option::Option<&[crate::model::ComponentConfiguration]> {
self.components.as_deref()
}
pub fn instance_configuration(
&self,
) -> std::option::Option<&crate::model::InstanceConfiguration> {
self.instance_configuration.as_ref()
}
pub fn dockerfile_template_data(&self) -> std::option::Option<&str> {
self.dockerfile_template_data.as_deref()
}
pub fn dockerfile_template_uri(&self) -> std::option::Option<&str> {
self.dockerfile_template_uri.as_deref()
}
pub fn platform_override(&self) -> std::option::Option<&crate::model::Platform> {
self.platform_override.as_ref()
}
pub fn image_os_version_override(&self) -> std::option::Option<&str> {
self.image_os_version_override.as_deref()
}
pub fn parent_image(&self) -> std::option::Option<&str> {
self.parent_image.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn working_directory(&self) -> std::option::Option<&str> {
self.working_directory.as_deref()
}
pub fn target_repository(
&self,
) -> std::option::Option<&crate::model::TargetContainerRepository> {
self.target_repository.as_ref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateContainerRecipeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateContainerRecipeInput");
formatter.field("container_type", &self.container_type);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("semantic_version", &self.semantic_version);
formatter.field("components", &self.components);
formatter.field("instance_configuration", &self.instance_configuration);
formatter.field("dockerfile_template_data", &self.dockerfile_template_data);
formatter.field("dockerfile_template_uri", &self.dockerfile_template_uri);
formatter.field("platform_override", &self.platform_override);
formatter.field("image_os_version_override", &self.image_os_version_override);
formatter.field("parent_image", &self.parent_image);
formatter.field("tags", &self.tags);
formatter.field("working_directory", &self.working_directory);
formatter.field("target_repository", &self.target_repository);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateComponentInput {
pub name: std::option::Option<std::string::String>,
pub semantic_version: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub change_description: std::option::Option<std::string::String>,
pub platform: std::option::Option<crate::model::Platform>,
pub supported_os_versions: std::option::Option<std::vec::Vec<std::string::String>>,
pub data: std::option::Option<std::string::String>,
pub uri: std::option::Option<std::string::String>,
pub kms_key_id: std::option::Option<std::string::String>,
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub client_token: std::option::Option<std::string::String>,
}
impl CreateComponentInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn semantic_version(&self) -> std::option::Option<&str> {
self.semantic_version.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn change_description(&self) -> std::option::Option<&str> {
self.change_description.as_deref()
}
pub fn platform(&self) -> std::option::Option<&crate::model::Platform> {
self.platform.as_ref()
}
pub fn supported_os_versions(&self) -> std::option::Option<&[std::string::String]> {
self.supported_os_versions.as_deref()
}
pub fn data(&self) -> std::option::Option<&str> {
self.data.as_deref()
}
pub fn uri(&self) -> std::option::Option<&str> {
self.uri.as_deref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CreateComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateComponentInput");
formatter.field("name", &self.name);
formatter.field("semantic_version", &self.semantic_version);
formatter.field("description", &self.description);
formatter.field("change_description", &self.change_description);
formatter.field("platform", &self.platform);
formatter.field("supported_os_versions", &self.supported_os_versions);
formatter.field("data", &self.data);
formatter.field("uri", &self.uri);
formatter.field("kms_key_id", &self.kms_key_id);
formatter.field("tags", &self.tags);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CancelImageCreationInput {
pub image_build_version_arn: std::option::Option<std::string::String>,
pub client_token: std::option::Option<std::string::String>,
}
impl CancelImageCreationInput {
pub fn image_build_version_arn(&self) -> std::option::Option<&str> {
self.image_build_version_arn.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl std::fmt::Debug for CancelImageCreationInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CancelImageCreationInput");
formatter.field("image_build_version_arn", &self.image_build_version_arn);
formatter.field("client_token", &self.client_token);
formatter.finish()
}
}