use std::fmt::Write;
pub mod accept_direct_connect_gateway_association_proposal_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) proposal_id: std::option::Option<std::string::String>,
pub(crate) associated_gateway_owner_account: std::option::Option<std::string::String>,
pub(crate) override_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn proposal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.proposal_id = Some(input.into());
self
}
pub fn set_proposal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.proposal_id = input;
self
}
pub fn associated_gateway_owner_account(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.associated_gateway_owner_account = Some(input.into());
self
}
pub fn set_associated_gateway_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.associated_gateway_owner_account = input;
self
}
pub fn override_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.override_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.override_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_override_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.override_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AcceptDirectConnectGatewayAssociationProposalInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::AcceptDirectConnectGatewayAssociationProposalInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
proposal_id: self.proposal_id,
associated_gateway_owner_account: self.associated_gateway_owner_account,
override_allowed_prefixes_to_direct_connect_gateway: self
.override_allowed_prefixes_to_direct_connect_gateway,
},
)
}
}
}
impl AcceptDirectConnectGatewayAssociationProposalInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AcceptDirectConnectGatewayAssociationProposal,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AcceptDirectConnectGatewayAssociationProposalInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AcceptDirectConnectGatewayAssociationProposalInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AcceptDirectConnectGatewayAssociationProposal",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_accept_direct_connect_gateway_association_proposal(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AcceptDirectConnectGatewayAssociationProposal::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AcceptDirectConnectGatewayAssociationProposal",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::accept_direct_connect_gateway_association_proposal_input::Builder {
crate::input::accept_direct_connect_gateway_association_proposal_input::Builder::default()
}
}
pub mod allocate_connection_on_interconnect_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) bandwidth: std::option::Option<std::string::String>,
pub(crate) connection_name: std::option::Option<std::string::String>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) interconnect_id: std::option::Option<std::string::String>,
pub(crate) vlan: std::option::Option<i32>,
}
impl Builder {
pub fn bandwidth(mut self, input: impl Into<std::string::String>) -> Self {
self.bandwidth = Some(input.into());
self
}
pub fn set_bandwidth(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bandwidth = input;
self
}
pub fn connection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_name = Some(input.into());
self
}
pub fn set_connection_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_name = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = input;
self
}
pub fn interconnect_id(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_id = Some(input.into());
self
}
pub fn set_interconnect_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_id = input;
self
}
pub fn vlan(mut self, input: i32) -> Self {
self.vlan = Some(input);
self
}
pub fn set_vlan(mut self, input: std::option::Option<i32>) -> Self {
self.vlan = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AllocateConnectionOnInterconnectInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AllocateConnectionOnInterconnectInput {
bandwidth: self.bandwidth,
connection_name: self.connection_name,
owner_account: self.owner_account,
interconnect_id: self.interconnect_id,
vlan: self.vlan.unwrap_or_default(),
})
}
}
}
impl AllocateConnectionOnInterconnectInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AllocateConnectionOnInterconnect,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AllocateConnectionOnInterconnectInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AllocateConnectionOnInterconnectInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AllocateConnectionOnInterconnect",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_allocate_connection_on_interconnect(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AllocateConnectionOnInterconnect::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AllocateConnectionOnInterconnect",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::allocate_connection_on_interconnect_input::Builder {
crate::input::allocate_connection_on_interconnect_input::Builder::default()
}
}
pub mod allocate_hosted_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) bandwidth: std::option::Option<std::string::String>,
pub(crate) connection_name: std::option::Option<std::string::String>,
pub(crate) vlan: std::option::Option<i32>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = input;
self
}
pub fn bandwidth(mut self, input: impl Into<std::string::String>) -> Self {
self.bandwidth = Some(input.into());
self
}
pub fn set_bandwidth(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bandwidth = input;
self
}
pub fn connection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_name = Some(input.into());
self
}
pub fn set_connection_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_name = input;
self
}
pub fn vlan(mut self, input: i32) -> Self {
self.vlan = Some(input);
self
}
pub fn set_vlan(mut self, input: std::option::Option<i32>) -> Self {
self.vlan = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AllocateHostedConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AllocateHostedConnectionInput {
connection_id: self.connection_id,
owner_account: self.owner_account,
bandwidth: self.bandwidth,
connection_name: self.connection_name,
vlan: self.vlan.unwrap_or_default(),
tags: self.tags,
})
}
}
}
impl AllocateHostedConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AllocateHostedConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AllocateHostedConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AllocateHostedConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AllocateHostedConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_allocate_hosted_connection(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AllocateHostedConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AllocateHostedConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::allocate_hosted_connection_input::Builder {
crate::input::allocate_hosted_connection_input::Builder::default()
}
}
pub mod allocate_private_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) new_private_virtual_interface_allocation:
std::option::Option<crate::model::NewPrivateVirtualInterfaceAllocation>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = input;
self
}
pub fn new_private_virtual_interface_allocation(
mut self,
input: crate::model::NewPrivateVirtualInterfaceAllocation,
) -> Self {
self.new_private_virtual_interface_allocation = Some(input);
self
}
pub fn set_new_private_virtual_interface_allocation(
mut self,
input: std::option::Option<crate::model::NewPrivateVirtualInterfaceAllocation>,
) -> Self {
self.new_private_virtual_interface_allocation = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AllocatePrivateVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AllocatePrivateVirtualInterfaceInput {
connection_id: self.connection_id,
owner_account: self.owner_account,
new_private_virtual_interface_allocation: self
.new_private_virtual_interface_allocation,
})
}
}
}
impl AllocatePrivateVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AllocatePrivateVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AllocatePrivateVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AllocatePrivateVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AllocatePrivateVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_allocate_private_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AllocatePrivateVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AllocatePrivateVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::allocate_private_virtual_interface_input::Builder {
crate::input::allocate_private_virtual_interface_input::Builder::default()
}
}
pub mod allocate_public_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) new_public_virtual_interface_allocation:
std::option::Option<crate::model::NewPublicVirtualInterfaceAllocation>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = input;
self
}
pub fn new_public_virtual_interface_allocation(
mut self,
input: crate::model::NewPublicVirtualInterfaceAllocation,
) -> Self {
self.new_public_virtual_interface_allocation = Some(input);
self
}
pub fn set_new_public_virtual_interface_allocation(
mut self,
input: std::option::Option<crate::model::NewPublicVirtualInterfaceAllocation>,
) -> Self {
self.new_public_virtual_interface_allocation = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AllocatePublicVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AllocatePublicVirtualInterfaceInput {
connection_id: self.connection_id,
owner_account: self.owner_account,
new_public_virtual_interface_allocation: self
.new_public_virtual_interface_allocation,
})
}
}
}
impl AllocatePublicVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AllocatePublicVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AllocatePublicVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AllocatePublicVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AllocatePublicVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_allocate_public_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AllocatePublicVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AllocatePublicVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::allocate_public_virtual_interface_input::Builder {
crate::input::allocate_public_virtual_interface_input::Builder::default()
}
}
pub mod allocate_transit_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) owner_account: std::option::Option<std::string::String>,
pub(crate) new_transit_virtual_interface_allocation:
std::option::Option<crate::model::NewTransitVirtualInterfaceAllocation>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn owner_account(mut self, input: impl Into<std::string::String>) -> Self {
self.owner_account = Some(input.into());
self
}
pub fn set_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.owner_account = input;
self
}
pub fn new_transit_virtual_interface_allocation(
mut self,
input: crate::model::NewTransitVirtualInterfaceAllocation,
) -> Self {
self.new_transit_virtual_interface_allocation = Some(input);
self
}
pub fn set_new_transit_virtual_interface_allocation(
mut self,
input: std::option::Option<crate::model::NewTransitVirtualInterfaceAllocation>,
) -> Self {
self.new_transit_virtual_interface_allocation = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AllocateTransitVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AllocateTransitVirtualInterfaceInput {
connection_id: self.connection_id,
owner_account: self.owner_account,
new_transit_virtual_interface_allocation: self
.new_transit_virtual_interface_allocation,
})
}
}
}
impl AllocateTransitVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AllocateTransitVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AllocateTransitVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AllocateTransitVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AllocateTransitVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_allocate_transit_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AllocateTransitVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AllocateTransitVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::allocate_transit_virtual_interface_input::Builder {
crate::input::allocate_transit_virtual_interface_input::Builder::default()
}
}
pub mod associate_connection_with_lag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) lag_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateConnectionWithLagInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateConnectionWithLagInput {
connection_id: self.connection_id,
lag_id: self.lag_id,
})
}
}
}
impl AssociateConnectionWithLagInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateConnectionWithLag,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateConnectionWithLagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateConnectionWithLagInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AssociateConnectionWithLag",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_connection_with_lag(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateConnectionWithLag::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateConnectionWithLag",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_connection_with_lag_input::Builder {
crate::input::associate_connection_with_lag_input::Builder::default()
}
}
pub mod associate_hosted_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) parent_connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn parent_connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_connection_id = Some(input.into());
self
}
pub fn set_parent_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateHostedConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateHostedConnectionInput {
connection_id: self.connection_id,
parent_connection_id: self.parent_connection_id,
})
}
}
}
impl AssociateHostedConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateHostedConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateHostedConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateHostedConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AssociateHostedConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_hosted_connection(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateHostedConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateHostedConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_hosted_connection_input::Builder {
crate::input::associate_hosted_connection_input::Builder::default()
}
}
pub mod associate_mac_sec_key_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) secret_arn: std::option::Option<std::string::String>,
pub(crate) ckn: std::option::Option<std::string::String>,
pub(crate) cak: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn secret_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.secret_arn = Some(input.into());
self
}
pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.secret_arn = input;
self
}
pub fn ckn(mut self, input: impl Into<std::string::String>) -> Self {
self.ckn = Some(input.into());
self
}
pub fn set_ckn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ckn = input;
self
}
pub fn cak(mut self, input: impl Into<std::string::String>) -> Self {
self.cak = Some(input.into());
self
}
pub fn set_cak(mut self, input: std::option::Option<std::string::String>) -> Self {
self.cak = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateMacSecKeyInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateMacSecKeyInput {
connection_id: self.connection_id,
secret_arn: self.secret_arn,
ckn: self.ckn,
cak: self.cak,
})
}
}
}
impl AssociateMacSecKeyInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateMacSecKey,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateMacSecKeyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateMacSecKeyInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AssociateMacSecKey",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_mac_sec_key(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateMacSecKey::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateMacSecKey",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_mac_sec_key_input::Builder {
crate::input::associate_mac_sec_key_input::Builder::default()
}
}
pub mod associate_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::AssociateVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::AssociateVirtualInterfaceInput {
virtual_interface_id: self.virtual_interface_id,
connection_id: self.connection_id,
})
}
}
}
impl AssociateVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AssociateVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::AssociateVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AssociateVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.AssociateVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_associate_virtual_interface(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::AssociateVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AssociateVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::associate_virtual_interface_input::Builder {
crate::input::associate_virtual_interface_input::Builder::default()
}
}
pub mod confirm_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ConfirmConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ConfirmConnectionInput {
connection_id: self.connection_id,
})
}
}
}
impl ConfirmConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ConfirmConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ConfirmConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ConfirmConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ConfirmConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_confirm_connection(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ConfirmConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ConfirmConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::confirm_connection_input::Builder {
crate::input::confirm_connection_input::Builder::default()
}
}
pub mod confirm_customer_agreement_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) agreement_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn agreement_name(mut self, input: impl Into<std::string::String>) -> Self {
self.agreement_name = Some(input.into());
self
}
pub fn set_agreement_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.agreement_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ConfirmCustomerAgreementInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ConfirmCustomerAgreementInput {
agreement_name: self.agreement_name,
})
}
}
}
impl ConfirmCustomerAgreementInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ConfirmCustomerAgreement,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ConfirmCustomerAgreementInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ConfirmCustomerAgreementInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ConfirmCustomerAgreement",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_confirm_customer_agreement(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ConfirmCustomerAgreement::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ConfirmCustomerAgreement",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::confirm_customer_agreement_input::Builder {
crate::input::confirm_customer_agreement_input::Builder::default()
}
}
pub mod confirm_private_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) virtual_gateway_id: std::option::Option<std::string::String>,
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn virtual_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_gateway_id = Some(input.into());
self
}
pub fn set_virtual_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_gateway_id = input;
self
}
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ConfirmPrivateVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ConfirmPrivateVirtualInterfaceInput {
virtual_interface_id: self.virtual_interface_id,
virtual_gateway_id: self.virtual_gateway_id,
direct_connect_gateway_id: self.direct_connect_gateway_id,
})
}
}
}
impl ConfirmPrivateVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ConfirmPrivateVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ConfirmPrivateVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ConfirmPrivateVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ConfirmPrivateVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_confirm_private_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ConfirmPrivateVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ConfirmPrivateVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::confirm_private_virtual_interface_input::Builder {
crate::input::confirm_private_virtual_interface_input::Builder::default()
}
}
pub mod confirm_public_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ConfirmPublicVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ConfirmPublicVirtualInterfaceInput {
virtual_interface_id: self.virtual_interface_id,
})
}
}
}
impl ConfirmPublicVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ConfirmPublicVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ConfirmPublicVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ConfirmPublicVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ConfirmPublicVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_confirm_public_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ConfirmPublicVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ConfirmPublicVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::confirm_public_virtual_interface_input::Builder {
crate::input::confirm_public_virtual_interface_input::Builder::default()
}
}
pub mod confirm_transit_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ConfirmTransitVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ConfirmTransitVirtualInterfaceInput {
virtual_interface_id: self.virtual_interface_id,
direct_connect_gateway_id: self.direct_connect_gateway_id,
})
}
}
}
impl ConfirmTransitVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ConfirmTransitVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ConfirmTransitVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ConfirmTransitVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ConfirmTransitVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_confirm_transit_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ConfirmTransitVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ConfirmTransitVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::confirm_transit_virtual_interface_input::Builder {
crate::input::confirm_transit_virtual_interface_input::Builder::default()
}
}
pub mod create_bgp_peer_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) new_bgp_peer: std::option::Option<crate::model::NewBgpPeer>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn new_bgp_peer(mut self, input: crate::model::NewBgpPeer) -> Self {
self.new_bgp_peer = Some(input);
self
}
pub fn set_new_bgp_peer(
mut self,
input: std::option::Option<crate::model::NewBgpPeer>,
) -> Self {
self.new_bgp_peer = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateBgpPeerInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateBgpPeerInput {
virtual_interface_id: self.virtual_interface_id,
new_bgp_peer: self.new_bgp_peer,
})
}
}
}
impl CreateBgpPeerInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateBGPPeer,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateBgpPeerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateBgpPeerInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateBGPPeer",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_bgp_peer(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateBGPPeer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateBGPPeer",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_bgp_peer_input::Builder {
crate::input::create_bgp_peer_input::Builder::default()
}
}
pub mod create_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) location: std::option::Option<std::string::String>,
pub(crate) bandwidth: std::option::Option<std::string::String>,
pub(crate) connection_name: std::option::Option<std::string::String>,
pub(crate) lag_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) provider_name: std::option::Option<std::string::String>,
pub(crate) request_mac_sec: std::option::Option<bool>,
}
impl Builder {
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
pub fn bandwidth(mut self, input: impl Into<std::string::String>) -> Self {
self.bandwidth = Some(input.into());
self
}
pub fn set_bandwidth(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bandwidth = input;
self
}
pub fn connection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_name = Some(input.into());
self
}
pub fn set_connection_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_name = input;
self
}
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn request_mac_sec(mut self, input: bool) -> Self {
self.request_mac_sec = Some(input);
self
}
pub fn set_request_mac_sec(mut self, input: std::option::Option<bool>) -> Self {
self.request_mac_sec = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConnectionInput {
location: self.location,
bandwidth: self.bandwidth,
connection_name: self.connection_name,
lag_id: self.lag_id,
tags: self.tags,
provider_name: self.provider_name,
request_mac_sec: self.request_mac_sec,
})
}
}
}
impl CreateConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_connection(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_connection_input::Builder {
crate::input::create_connection_input::Builder::default()
}
}
pub mod create_direct_connect_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_name: std::option::Option<std::string::String>,
pub(crate) amazon_side_asn: std::option::Option<i64>,
}
impl Builder {
pub fn direct_connect_gateway_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.direct_connect_gateway_name = Some(input.into());
self
}
pub fn set_direct_connect_gateway_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_name = input;
self
}
pub fn amazon_side_asn(mut self, input: i64) -> Self {
self.amazon_side_asn = Some(input);
self
}
pub fn set_amazon_side_asn(mut self, input: std::option::Option<i64>) -> Self {
self.amazon_side_asn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDirectConnectGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateDirectConnectGatewayInput {
direct_connect_gateway_name: self.direct_connect_gateway_name,
amazon_side_asn: self.amazon_side_asn,
})
}
}
}
impl CreateDirectConnectGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDirectConnectGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateDirectConnectGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDirectConnectGatewayInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateDirectConnectGateway",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_direct_connect_gateway(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDirectConnectGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDirectConnectGateway",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_direct_connect_gateway_input::Builder {
crate::input::create_direct_connect_gateway_input::Builder::default()
}
}
pub mod create_direct_connect_gateway_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) gateway_id: std::option::Option<std::string::String>,
pub(crate) add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
pub(crate) virtual_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.gateway_id = Some(input.into());
self
}
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.gateway_id = input;
self
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.add_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.add_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.add_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn virtual_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_gateway_id = Some(input.into());
self
}
pub fn set_virtual_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDirectConnectGatewayAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateDirectConnectGatewayAssociationInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
gateway_id: self.gateway_id,
add_allowed_prefixes_to_direct_connect_gateway: self
.add_allowed_prefixes_to_direct_connect_gateway,
virtual_gateway_id: self.virtual_gateway_id,
})
}
}
}
impl CreateDirectConnectGatewayAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDirectConnectGatewayAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateDirectConnectGatewayAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDirectConnectGatewayAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateDirectConnectGatewayAssociation",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_direct_connect_gateway_association(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDirectConnectGatewayAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDirectConnectGatewayAssociation",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_direct_connect_gateway_association_input::Builder {
crate::input::create_direct_connect_gateway_association_input::Builder::default()
}
}
pub mod create_direct_connect_gateway_association_proposal_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) direct_connect_gateway_owner_account: std::option::Option<std::string::String>,
pub(crate) gateway_id: std::option::Option<std::string::String>,
pub(crate) add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
pub(crate) remove_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn direct_connect_gateway_owner_account(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.direct_connect_gateway_owner_account = Some(input.into());
self
}
pub fn set_direct_connect_gateway_owner_account(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_owner_account = input;
self
}
pub fn gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.gateway_id = Some(input.into());
self
}
pub fn set_gateway_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.gateway_id = input;
self
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.add_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.add_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.add_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn remove_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.remove_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.remove_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_remove_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.remove_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateDirectConnectGatewayAssociationProposalInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::CreateDirectConnectGatewayAssociationProposalInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
direct_connect_gateway_owner_account: self.direct_connect_gateway_owner_account,
gateway_id: self.gateway_id,
add_allowed_prefixes_to_direct_connect_gateway: self
.add_allowed_prefixes_to_direct_connect_gateway,
remove_allowed_prefixes_to_direct_connect_gateway: self
.remove_allowed_prefixes_to_direct_connect_gateway,
},
)
}
}
}
impl CreateDirectConnectGatewayAssociationProposalInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDirectConnectGatewayAssociationProposal,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateDirectConnectGatewayAssociationProposalInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDirectConnectGatewayAssociationProposalInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateDirectConnectGatewayAssociationProposal",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_direct_connect_gateway_association_proposal(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDirectConnectGatewayAssociationProposal::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDirectConnectGatewayAssociationProposal",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::create_direct_connect_gateway_association_proposal_input::Builder {
crate::input::create_direct_connect_gateway_association_proposal_input::Builder::default()
}
}
pub mod create_interconnect_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) interconnect_name: std::option::Option<std::string::String>,
pub(crate) bandwidth: std::option::Option<std::string::String>,
pub(crate) location: std::option::Option<std::string::String>,
pub(crate) lag_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) provider_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn interconnect_name(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_name = Some(input.into());
self
}
pub fn set_interconnect_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_name = input;
self
}
pub fn bandwidth(mut self, input: impl Into<std::string::String>) -> Self {
self.bandwidth = Some(input.into());
self
}
pub fn set_bandwidth(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bandwidth = input;
self
}
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateInterconnectInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateInterconnectInput {
interconnect_name: self.interconnect_name,
bandwidth: self.bandwidth,
location: self.location,
lag_id: self.lag_id,
tags: self.tags,
provider_name: self.provider_name,
})
}
}
}
impl CreateInterconnectInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateInterconnect,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateInterconnectInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateInterconnectInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateInterconnect",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_interconnect(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateInterconnect::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateInterconnect",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_interconnect_input::Builder {
crate::input::create_interconnect_input::Builder::default()
}
}
pub mod create_lag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) number_of_connections: std::option::Option<i32>,
pub(crate) location: std::option::Option<std::string::String>,
pub(crate) connections_bandwidth: std::option::Option<std::string::String>,
pub(crate) lag_name: std::option::Option<std::string::String>,
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) child_connection_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) provider_name: std::option::Option<std::string::String>,
pub(crate) request_mac_sec: std::option::Option<bool>,
}
impl Builder {
pub fn number_of_connections(mut self, input: i32) -> Self {
self.number_of_connections = Some(input);
self
}
pub fn set_number_of_connections(mut self, input: std::option::Option<i32>) -> Self {
self.number_of_connections = input;
self
}
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
pub fn connections_bandwidth(mut self, input: impl Into<std::string::String>) -> Self {
self.connections_bandwidth = Some(input.into());
self
}
pub fn set_connections_bandwidth(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connections_bandwidth = input;
self
}
pub fn lag_name(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_name = Some(input.into());
self
}
pub fn set_lag_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_name = input;
self
}
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn child_connection_tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.child_connection_tags.unwrap_or_default();
v.push(input);
self.child_connection_tags = Some(v);
self
}
pub fn set_child_connection_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.child_connection_tags = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn request_mac_sec(mut self, input: bool) -> Self {
self.request_mac_sec = Some(input);
self
}
pub fn set_request_mac_sec(mut self, input: std::option::Option<bool>) -> Self {
self.request_mac_sec = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateLagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateLagInput {
number_of_connections: self.number_of_connections.unwrap_or_default(),
location: self.location,
connections_bandwidth: self.connections_bandwidth,
lag_name: self.lag_name,
connection_id: self.connection_id,
tags: self.tags,
child_connection_tags: self.child_connection_tags,
provider_name: self.provider_name,
request_mac_sec: self.request_mac_sec,
})
}
}
}
impl CreateLagInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateLag,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateLagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateLagInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateLag",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_lag(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::CreateLag::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLag",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_lag_input::Builder {
crate::input::create_lag_input::Builder::default()
}
}
pub mod create_private_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) new_private_virtual_interface:
std::option::Option<crate::model::NewPrivateVirtualInterface>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn new_private_virtual_interface(
mut self,
input: crate::model::NewPrivateVirtualInterface,
) -> Self {
self.new_private_virtual_interface = Some(input);
self
}
pub fn set_new_private_virtual_interface(
mut self,
input: std::option::Option<crate::model::NewPrivateVirtualInterface>,
) -> Self {
self.new_private_virtual_interface = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreatePrivateVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreatePrivateVirtualInterfaceInput {
connection_id: self.connection_id,
new_private_virtual_interface: self.new_private_virtual_interface,
})
}
}
}
impl CreatePrivateVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreatePrivateVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreatePrivateVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreatePrivateVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreatePrivateVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_private_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreatePrivateVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreatePrivateVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_private_virtual_interface_input::Builder {
crate::input::create_private_virtual_interface_input::Builder::default()
}
}
pub mod create_public_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) new_public_virtual_interface:
std::option::Option<crate::model::NewPublicVirtualInterface>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn new_public_virtual_interface(
mut self,
input: crate::model::NewPublicVirtualInterface,
) -> Self {
self.new_public_virtual_interface = Some(input);
self
}
pub fn set_new_public_virtual_interface(
mut self,
input: std::option::Option<crate::model::NewPublicVirtualInterface>,
) -> Self {
self.new_public_virtual_interface = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreatePublicVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreatePublicVirtualInterfaceInput {
connection_id: self.connection_id,
new_public_virtual_interface: self.new_public_virtual_interface,
})
}
}
}
impl CreatePublicVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreatePublicVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreatePublicVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreatePublicVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreatePublicVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_public_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreatePublicVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreatePublicVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_public_virtual_interface_input::Builder {
crate::input::create_public_virtual_interface_input::Builder::default()
}
}
pub mod create_transit_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) new_transit_virtual_interface:
std::option::Option<crate::model::NewTransitVirtualInterface>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn new_transit_virtual_interface(
mut self,
input: crate::model::NewTransitVirtualInterface,
) -> Self {
self.new_transit_virtual_interface = Some(input);
self
}
pub fn set_new_transit_virtual_interface(
mut self,
input: std::option::Option<crate::model::NewTransitVirtualInterface>,
) -> Self {
self.new_transit_virtual_interface = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateTransitVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateTransitVirtualInterfaceInput {
connection_id: self.connection_id,
new_transit_virtual_interface: self.new_transit_virtual_interface,
})
}
}
}
impl CreateTransitVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateTransitVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateTransitVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateTransitVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.CreateTransitVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_transit_virtual_interface(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateTransitVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateTransitVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_transit_virtual_interface_input::Builder {
crate::input::create_transit_virtual_interface_input::Builder::default()
}
}
pub mod delete_bgp_peer_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) asn: std::option::Option<i32>,
pub(crate) customer_address: std::option::Option<std::string::String>,
pub(crate) bgp_peer_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn asn(mut self, input: i32) -> Self {
self.asn = Some(input);
self
}
pub fn set_asn(mut self, input: std::option::Option<i32>) -> Self {
self.asn = input;
self
}
pub fn customer_address(mut self, input: impl Into<std::string::String>) -> Self {
self.customer_address = Some(input.into());
self
}
pub fn set_customer_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.customer_address = input;
self
}
pub fn bgp_peer_id(mut self, input: impl Into<std::string::String>) -> Self {
self.bgp_peer_id = Some(input.into());
self
}
pub fn set_bgp_peer_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bgp_peer_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteBgpPeerInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteBgpPeerInput {
virtual_interface_id: self.virtual_interface_id,
asn: self.asn.unwrap_or_default(),
customer_address: self.customer_address,
bgp_peer_id: self.bgp_peer_id,
})
}
}
}
impl DeleteBgpPeerInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteBGPPeer,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteBgpPeerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBgpPeerInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteBGPPeer",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_bgp_peer(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBGPPeer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBGPPeer",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_bgp_peer_input::Builder {
crate::input::delete_bgp_peer_input::Builder::default()
}
}
pub mod delete_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConnectionInput {
connection_id: self.connection_id,
})
}
}
}
impl DeleteConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_connection(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_connection_input::Builder {
crate::input::delete_connection_input::Builder::default()
}
}
pub mod delete_direct_connect_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDirectConnectGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDirectConnectGatewayInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
})
}
}
}
impl DeleteDirectConnectGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDirectConnectGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDirectConnectGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDirectConnectGatewayInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteDirectConnectGateway",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_direct_connect_gateway(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDirectConnectGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDirectConnectGateway",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_direct_connect_gateway_input::Builder {
crate::input::delete_direct_connect_gateway_input::Builder::default()
}
}
pub mod delete_direct_connect_gateway_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) association_id: std::option::Option<std::string::String>,
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) virtual_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
self.association_id = Some(input.into());
self
}
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.association_id = input;
self
}
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn virtual_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_gateway_id = Some(input.into());
self
}
pub fn set_virtual_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDirectConnectGatewayAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteDirectConnectGatewayAssociationInput {
association_id: self.association_id,
direct_connect_gateway_id: self.direct_connect_gateway_id,
virtual_gateway_id: self.virtual_gateway_id,
})
}
}
}
impl DeleteDirectConnectGatewayAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDirectConnectGatewayAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDirectConnectGatewayAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDirectConnectGatewayAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteDirectConnectGatewayAssociation",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_direct_connect_gateway_association(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDirectConnectGatewayAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDirectConnectGatewayAssociation",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_direct_connect_gateway_association_input::Builder {
crate::input::delete_direct_connect_gateway_association_input::Builder::default()
}
}
pub mod delete_direct_connect_gateway_association_proposal_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) proposal_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn proposal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.proposal_id = Some(input.into());
self
}
pub fn set_proposal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.proposal_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteDirectConnectGatewayAssociationProposalInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DeleteDirectConnectGatewayAssociationProposalInput {
proposal_id: self.proposal_id,
},
)
}
}
}
impl DeleteDirectConnectGatewayAssociationProposalInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteDirectConnectGatewayAssociationProposal,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDirectConnectGatewayAssociationProposalInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDirectConnectGatewayAssociationProposalInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteDirectConnectGatewayAssociationProposal",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_direct_connect_gateway_association_proposal(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDirectConnectGatewayAssociationProposal::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDirectConnectGatewayAssociationProposal",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::delete_direct_connect_gateway_association_proposal_input::Builder {
crate::input::delete_direct_connect_gateway_association_proposal_input::Builder::default()
}
}
pub mod delete_interconnect_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) interconnect_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn interconnect_id(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_id = Some(input.into());
self
}
pub fn set_interconnect_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteInterconnectInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteInterconnectInput {
interconnect_id: self.interconnect_id,
})
}
}
}
impl DeleteInterconnectInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteInterconnect,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteInterconnectInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteInterconnectInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteInterconnect",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_interconnect(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteInterconnect::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteInterconnect",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_interconnect_input::Builder {
crate::input::delete_interconnect_input::Builder::default()
}
}
pub mod delete_lag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) lag_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteLagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteLagInput {
lag_id: self.lag_id,
})
}
}
}
impl DeleteLagInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteLag,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteLagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLagInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteLag",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_lag(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::DeleteLag::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLag",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_lag_input::Builder {
crate::input::delete_lag_input::Builder::default()
}
}
pub mod delete_virtual_interface_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteVirtualInterfaceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteVirtualInterfaceInput {
virtual_interface_id: self.virtual_interface_id,
})
}
}
}
impl DeleteVirtualInterfaceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteVirtualInterface,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DeleteVirtualInterfaceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteVirtualInterfaceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DeleteVirtualInterface",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_virtual_interface(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteVirtualInterface::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteVirtualInterface",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_virtual_interface_input::Builder {
crate::input::delete_virtual_interface_input::Builder::default()
}
}
pub mod describe_connection_loa_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) provider_name: std::option::Option<std::string::String>,
pub(crate) loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn loa_content_type(mut self, input: crate::model::LoaContentType) -> Self {
self.loa_content_type = Some(input);
self
}
pub fn set_loa_content_type(
mut self,
input: std::option::Option<crate::model::LoaContentType>,
) -> Self {
self.loa_content_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConnectionLoaInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConnectionLoaInput {
connection_id: self.connection_id,
provider_name: self.provider_name,
loa_content_type: self.loa_content_type,
})
}
}
}
impl DescribeConnectionLoaInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeConnectionLoa,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeConnectionLoaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConnectionLoaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeConnectionLoa",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_connection_loa(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeConnectionLoa::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConnectionLoa",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_connection_loa_input::Builder {
crate::input::describe_connection_loa_input::Builder::default()
}
}
pub mod describe_connections_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConnectionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConnectionsInput {
connection_id: self.connection_id,
})
}
}
}
impl DescribeConnectionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeConnections,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeConnectionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConnectionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeConnections",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_connections(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeConnections::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConnections",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_connections_input::Builder {
crate::input::describe_connections_input::Builder::default()
}
}
pub mod describe_connections_on_interconnect_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) interconnect_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn interconnect_id(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_id = Some(input.into());
self
}
pub fn set_interconnect_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeConnectionsOnInterconnectInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeConnectionsOnInterconnectInput {
interconnect_id: self.interconnect_id,
})
}
}
}
impl DescribeConnectionsOnInterconnectInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeConnectionsOnInterconnect,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeConnectionsOnInterconnectInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeConnectionsOnInterconnectInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeConnectionsOnInterconnect",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_connections_on_interconnect(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeConnectionsOnInterconnect::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeConnectionsOnInterconnect",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_connections_on_interconnect_input::Builder {
crate::input::describe_connections_on_interconnect_input::Builder::default()
}
}
pub mod describe_customer_metadata_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::DescribeCustomerMetadataInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeCustomerMetadataInput {})
}
}
}
impl DescribeCustomerMetadataInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeCustomerMetadata,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeCustomerMetadataInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeCustomerMetadataInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeCustomerMetadata",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_customer_metadata(
&self,
)?,
);
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeCustomerMetadata::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeCustomerMetadata",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_customer_metadata_input::Builder {
crate::input::describe_customer_metadata_input::Builder::default()
}
}
pub mod describe_direct_connect_gateway_association_proposals_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) proposal_id: std::option::Option<std::string::String>,
pub(crate) associated_gateway_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn proposal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.proposal_id = Some(input.into());
self
}
pub fn set_proposal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.proposal_id = input;
self
}
pub fn associated_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.associated_gateway_id = Some(input.into());
self
}
pub fn set_associated_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.associated_gateway_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDirectConnectGatewayAssociationProposalsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeDirectConnectGatewayAssociationProposalsInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
proposal_id: self.proposal_id,
associated_gateway_id: self.associated_gateway_id,
max_results: self.max_results,
next_token: self.next_token,
},
)
}
}
}
impl DescribeDirectConnectGatewayAssociationProposalsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeDirectConnectGatewayAssociationProposals,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeDirectConnectGatewayAssociationProposalsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDirectConnectGatewayAssociationProposalsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeDirectConnectGatewayAssociationProposals",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_direct_connect_gateway_association_proposals(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDirectConnectGatewayAssociationProposals::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDirectConnectGatewayAssociationProposals",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder(
) -> crate::input::describe_direct_connect_gateway_association_proposals_input::Builder {
crate::input::describe_direct_connect_gateway_association_proposals_input::Builder::default(
)
}
}
pub mod describe_direct_connect_gateway_associations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) association_id: std::option::Option<std::string::String>,
pub(crate) associated_gateway_id: std::option::Option<std::string::String>,
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) virtual_gateway_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
self.association_id = Some(input.into());
self
}
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.association_id = input;
self
}
pub fn associated_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.associated_gateway_id = Some(input.into());
self
}
pub fn set_associated_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.associated_gateway_id = input;
self
}
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn virtual_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_gateway_id = Some(input.into());
self
}
pub fn set_virtual_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_gateway_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDirectConnectGatewayAssociationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::input::DescribeDirectConnectGatewayAssociationsInput {
association_id: self.association_id,
associated_gateway_id: self.associated_gateway_id,
direct_connect_gateway_id: self.direct_connect_gateway_id,
max_results: self.max_results,
next_token: self.next_token,
virtual_gateway_id: self.virtual_gateway_id,
},
)
}
}
}
impl DescribeDirectConnectGatewayAssociationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeDirectConnectGatewayAssociations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeDirectConnectGatewayAssociationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDirectConnectGatewayAssociationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeDirectConnectGatewayAssociations",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_direct_connect_gateway_associations(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDirectConnectGatewayAssociations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDirectConnectGatewayAssociations",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_direct_connect_gateway_associations_input::Builder {
crate::input::describe_direct_connect_gateway_associations_input::Builder::default()
}
}
pub mod describe_direct_connect_gateway_attachments_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDirectConnectGatewayAttachmentsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeDirectConnectGatewayAttachmentsInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
virtual_interface_id: self.virtual_interface_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl DescribeDirectConnectGatewayAttachmentsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeDirectConnectGatewayAttachments,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeDirectConnectGatewayAttachmentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDirectConnectGatewayAttachmentsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeDirectConnectGatewayAttachments",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_direct_connect_gateway_attachments(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDirectConnectGatewayAttachments::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDirectConnectGatewayAttachments",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_direct_connect_gateway_attachments_input::Builder {
crate::input::describe_direct_connect_gateway_attachments_input::Builder::default()
}
}
pub mod describe_direct_connect_gateways_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeDirectConnectGatewaysInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeDirectConnectGatewaysInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl DescribeDirectConnectGatewaysInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeDirectConnectGateways,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeDirectConnectGatewaysInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDirectConnectGatewaysInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeDirectConnectGateways",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_direct_connect_gateways(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDirectConnectGateways::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDirectConnectGateways",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_direct_connect_gateways_input::Builder {
crate::input::describe_direct_connect_gateways_input::Builder::default()
}
}
pub mod describe_hosted_connections_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeHostedConnectionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeHostedConnectionsInput {
connection_id: self.connection_id,
})
}
}
}
impl DescribeHostedConnectionsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeHostedConnections,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeHostedConnectionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeHostedConnectionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeHostedConnections",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_hosted_connections(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeHostedConnections::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeHostedConnections",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_hosted_connections_input::Builder {
crate::input::describe_hosted_connections_input::Builder::default()
}
}
pub mod describe_interconnect_loa_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) interconnect_id: std::option::Option<std::string::String>,
pub(crate) provider_name: std::option::Option<std::string::String>,
pub(crate) loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl Builder {
pub fn interconnect_id(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_id = Some(input.into());
self
}
pub fn set_interconnect_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_id = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn loa_content_type(mut self, input: crate::model::LoaContentType) -> Self {
self.loa_content_type = Some(input);
self
}
pub fn set_loa_content_type(
mut self,
input: std::option::Option<crate::model::LoaContentType>,
) -> Self {
self.loa_content_type = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeInterconnectLoaInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeInterconnectLoaInput {
interconnect_id: self.interconnect_id,
provider_name: self.provider_name,
loa_content_type: self.loa_content_type,
})
}
}
}
impl DescribeInterconnectLoaInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeInterconnectLoa,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeInterconnectLoaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeInterconnectLoaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeInterconnectLoa",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_interconnect_loa(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeInterconnectLoa::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeInterconnectLoa",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_interconnect_loa_input::Builder {
crate::input::describe_interconnect_loa_input::Builder::default()
}
}
pub mod describe_interconnects_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) interconnect_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn interconnect_id(mut self, input: impl Into<std::string::String>) -> Self {
self.interconnect_id = Some(input.into());
self
}
pub fn set_interconnect_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.interconnect_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeInterconnectsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeInterconnectsInput {
interconnect_id: self.interconnect_id,
})
}
}
}
impl DescribeInterconnectsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeInterconnects,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeInterconnectsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeInterconnectsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeInterconnects",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_interconnects(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeInterconnects::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeInterconnects",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_interconnects_input::Builder {
crate::input::describe_interconnects_input::Builder::default()
}
}
pub mod describe_lags_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) lag_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeLagsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeLagsInput {
lag_id: self.lag_id,
})
}
}
}
impl DescribeLagsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeLags,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeLagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeLagsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeLags",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_lags(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeLags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLags",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_lags_input::Builder {
crate::input::describe_lags_input::Builder::default()
}
}
pub mod describe_loa_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) provider_name: std::option::Option<std::string::String>,
pub(crate) loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn provider_name(mut self, input: impl Into<std::string::String>) -> Self {
self.provider_name = Some(input.into());
self
}
pub fn set_provider_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.provider_name = input;
self
}
pub fn loa_content_type(mut self, input: crate::model::LoaContentType) -> Self {
self.loa_content_type = Some(input);
self
}
pub fn set_loa_content_type(
mut self,
input: std::option::Option<crate::model::LoaContentType>,
) -> Self {
self.loa_content_type = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeLoaInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeLoaInput {
connection_id: self.connection_id,
provider_name: self.provider_name,
loa_content_type: self.loa_content_type,
})
}
}
}
impl DescribeLoaInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeLoa,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeLoaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeLoaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeLoa",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_loa(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeLoa::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLoa",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_loa_input::Builder {
crate::input::describe_loa_input::Builder::default()
}
}
pub mod describe_locations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::DescribeLocationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeLocationsInput {})
}
}
}
impl DescribeLocationsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeLocations,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeLocationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeLocationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeLocations",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_locations(&self)?,
);
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeLocations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeLocations",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_locations_input::Builder {
crate::input::describe_locations_input::Builder::default()
}
}
pub mod describe_router_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) router_type_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn router_type_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.router_type_identifier = Some(input.into());
self
}
pub fn set_router_type_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.router_type_identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeRouterConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeRouterConfigurationInput {
virtual_interface_id: self.virtual_interface_id,
router_type_identifier: self.router_type_identifier,
})
}
}
}
impl DescribeRouterConfigurationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeRouterConfiguration,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeRouterConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeRouterConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeRouterConfiguration",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_router_configuration(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeRouterConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeRouterConfiguration",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_router_configuration_input::Builder {
crate::input::describe_router_configuration_input::Builder::default()
}
}
pub mod describe_tags_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arns: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.resource_arns.unwrap_or_default();
v.push(input.into());
self.resource_arns = Some(v);
self
}
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.resource_arns = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeTagsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeTagsInput {
resource_arns: self.resource_arns,
})
}
}
}
impl DescribeTagsInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeTags,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeTagsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeTagsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeTags",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_tags(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeTags::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeTags",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_tags_input::Builder {
crate::input::describe_tags_input::Builder::default()
}
}
pub mod describe_virtual_gateways_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {}
impl Builder {
pub fn build(
self,
) -> Result<
crate::input::DescribeVirtualGatewaysInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeVirtualGatewaysInput {})
}
}
}
impl DescribeVirtualGatewaysInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeVirtualGateways,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeVirtualGatewaysInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeVirtualGatewaysInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeVirtualGateways",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_virtual_gateways(
&self,
)?,
);
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeVirtualGateways::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeVirtualGateways",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_virtual_gateways_input::Builder {
crate::input::describe_virtual_gateways_input::Builder::default()
}
}
pub mod describe_virtual_interfaces_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeVirtualInterfacesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeVirtualInterfacesInput {
connection_id: self.connection_id,
virtual_interface_id: self.virtual_interface_id,
})
}
}
}
impl DescribeVirtualInterfacesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeVirtualInterfaces,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DescribeVirtualInterfacesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeVirtualInterfacesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DescribeVirtualInterfaces",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_virtual_interfaces(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeVirtualInterfaces::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeVirtualInterfaces",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_virtual_interfaces_input::Builder {
crate::input::describe_virtual_interfaces_input::Builder::default()
}
}
pub mod disassociate_connection_from_lag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) lag_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateConnectionFromLagInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateConnectionFromLagInput {
connection_id: self.connection_id,
lag_id: self.lag_id,
})
}
}
}
impl DisassociateConnectionFromLagInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateConnectionFromLag,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateConnectionFromLagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateConnectionFromLagInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DisassociateConnectionFromLag",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_connection_from_lag(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateConnectionFromLag::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateConnectionFromLag",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_connection_from_lag_input::Builder {
crate::input::disassociate_connection_from_lag_input::Builder::default()
}
}
pub mod disassociate_mac_sec_key_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) secret_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn secret_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.secret_arn = Some(input.into());
self
}
pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.secret_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisassociateMacSecKeyInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisassociateMacSecKeyInput {
connection_id: self.connection_id,
secret_arn: self.secret_arn,
})
}
}
}
impl DisassociateMacSecKeyInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisassociateMacSecKey,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::DisassociateMacSecKeyInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisassociateMacSecKeyInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.DisassociateMacSecKey",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disassociate_mac_sec_key(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisassociateMacSecKey::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisassociateMacSecKey",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disassociate_mac_sec_key_input::Builder {
crate::input::disassociate_mac_sec_key_input::Builder::default()
}
}
pub mod list_virtual_interface_test_history_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) test_id: std::option::Option<std::string::String>,
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) bgp_peers: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) status: 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 test_id(mut self, input: impl Into<std::string::String>) -> Self {
self.test_id = Some(input.into());
self
}
pub fn set_test_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.test_id = input;
self
}
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn bgp_peers(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.bgp_peers.unwrap_or_default();
v.push(input.into());
self.bgp_peers = Some(v);
self
}
pub fn set_bgp_peers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.bgp_peers = input;
self
}
pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
self.status = Some(input.into());
self
}
pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.status = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListVirtualInterfaceTestHistoryInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListVirtualInterfaceTestHistoryInput {
test_id: self.test_id,
virtual_interface_id: self.virtual_interface_id,
bgp_peers: self.bgp_peers,
status: self.status,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListVirtualInterfaceTestHistoryInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListVirtualInterfaceTestHistory,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListVirtualInterfaceTestHistoryInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListVirtualInterfaceTestHistoryInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.ListVirtualInterfaceTestHistory",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_virtual_interface_test_history(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListVirtualInterfaceTestHistory::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListVirtualInterfaceTestHistory",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_virtual_interface_test_history_input::Builder {
crate::input::list_virtual_interface_test_history_input::Builder::default()
}
}
pub mod start_bgp_failover_test_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) bgp_peers: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) test_duration_in_minutes: std::option::Option<i32>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn bgp_peers(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.bgp_peers.unwrap_or_default();
v.push(input.into());
self.bgp_peers = Some(v);
self
}
pub fn set_bgp_peers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.bgp_peers = input;
self
}
pub fn test_duration_in_minutes(mut self, input: i32) -> Self {
self.test_duration_in_minutes = Some(input);
self
}
pub fn set_test_duration_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.test_duration_in_minutes = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartBgpFailoverTestInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartBgpFailoverTestInput {
virtual_interface_id: self.virtual_interface_id,
bgp_peers: self.bgp_peers,
test_duration_in_minutes: self.test_duration_in_minutes,
})
}
}
}
impl StartBgpFailoverTestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartBgpFailoverTest,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StartBgpFailoverTestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartBgpFailoverTestInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.StartBgpFailoverTest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_bgp_failover_test(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartBgpFailoverTest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartBgpFailoverTest",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_bgp_failover_test_input::Builder {
crate::input::start_bgp_failover_test_input::Builder::default()
}
}
pub mod stop_bgp_failover_test_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StopBgpFailoverTestInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StopBgpFailoverTestInput {
virtual_interface_id: self.virtual_interface_id,
})
}
}
}
impl StopBgpFailoverTestInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StopBgpFailoverTest,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::StopBgpFailoverTestInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopBgpFailoverTestInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.StopBgpFailoverTest",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_stop_bgp_failover_test(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopBgpFailoverTest::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopBgpFailoverTest",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::stop_bgp_failover_test_input::Builder {
crate::input::stop_bgp_failover_test_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.TagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UntagResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) connection_id: std::option::Option<std::string::String>,
pub(crate) connection_name: std::option::Option<std::string::String>,
pub(crate) encryption_mode: std::option::Option<std::string::String>,
}
impl Builder {
pub fn connection_id(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_id = Some(input.into());
self
}
pub fn set_connection_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_id = input;
self
}
pub fn connection_name(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_name = Some(input.into());
self
}
pub fn set_connection_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_name = input;
self
}
pub fn encryption_mode(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_mode = Some(input.into());
self
}
pub fn set_encryption_mode(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_mode = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateConnectionInput {
connection_id: self.connection_id,
connection_name: self.connection_name,
encryption_mode: self.encryption_mode,
})
}
}
}
impl UpdateConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UpdateConnection",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_connection(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConnection",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_connection_input::Builder {
crate::input::update_connection_input::Builder::default()
}
}
pub mod update_direct_connect_gateway_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) direct_connect_gateway_id: std::option::Option<std::string::String>,
pub(crate) new_direct_connect_gateway_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn direct_connect_gateway_id(mut self, input: impl Into<std::string::String>) -> Self {
self.direct_connect_gateway_id = Some(input.into());
self
}
pub fn set_direct_connect_gateway_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.direct_connect_gateway_id = input;
self
}
pub fn new_direct_connect_gateway_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.new_direct_connect_gateway_name = Some(input.into());
self
}
pub fn set_new_direct_connect_gateway_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.new_direct_connect_gateway_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateDirectConnectGatewayInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateDirectConnectGatewayInput {
direct_connect_gateway_id: self.direct_connect_gateway_id,
new_direct_connect_gateway_name: self.new_direct_connect_gateway_name,
})
}
}
}
impl UpdateDirectConnectGatewayInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDirectConnectGateway,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateDirectConnectGatewayInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDirectConnectGatewayInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UpdateDirectConnectGateway",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_direct_connect_gateway(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDirectConnectGateway::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDirectConnectGateway",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_direct_connect_gateway_input::Builder {
crate::input::update_direct_connect_gateway_input::Builder::default()
}
}
pub mod update_direct_connect_gateway_association_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) association_id: std::option::Option<std::string::String>,
pub(crate) add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
pub(crate) remove_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl Builder {
pub fn association_id(mut self, input: impl Into<std::string::String>) -> Self {
self.association_id = Some(input.into());
self
}
pub fn set_association_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.association_id = input;
self
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.add_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.add_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_add_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.add_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn remove_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: crate::model::RouteFilterPrefix,
) -> Self {
let mut v = self
.remove_allowed_prefixes_to_direct_connect_gateway
.unwrap_or_default();
v.push(input);
self.remove_allowed_prefixes_to_direct_connect_gateway = Some(v);
self
}
pub fn set_remove_allowed_prefixes_to_direct_connect_gateway(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
) -> Self {
self.remove_allowed_prefixes_to_direct_connect_gateway = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateDirectConnectGatewayAssociationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateDirectConnectGatewayAssociationInput {
association_id: self.association_id,
add_allowed_prefixes_to_direct_connect_gateway: self
.add_allowed_prefixes_to_direct_connect_gateway,
remove_allowed_prefixes_to_direct_connect_gateway: self
.remove_allowed_prefixes_to_direct_connect_gateway,
})
}
}
}
impl UpdateDirectConnectGatewayAssociationInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateDirectConnectGatewayAssociation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateDirectConnectGatewayAssociationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDirectConnectGatewayAssociationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UpdateDirectConnectGatewayAssociation",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_direct_connect_gateway_association(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDirectConnectGatewayAssociation::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDirectConnectGatewayAssociation",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_direct_connect_gateway_association_input::Builder {
crate::input::update_direct_connect_gateway_association_input::Builder::default()
}
}
pub mod update_lag_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) lag_id: std::option::Option<std::string::String>,
pub(crate) lag_name: std::option::Option<std::string::String>,
pub(crate) minimum_links: std::option::Option<i32>,
pub(crate) encryption_mode: std::option::Option<std::string::String>,
}
impl Builder {
pub fn lag_id(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_id = Some(input.into());
self
}
pub fn set_lag_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_id = input;
self
}
pub fn lag_name(mut self, input: impl Into<std::string::String>) -> Self {
self.lag_name = Some(input.into());
self
}
pub fn set_lag_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.lag_name = input;
self
}
pub fn minimum_links(mut self, input: i32) -> Self {
self.minimum_links = Some(input);
self
}
pub fn set_minimum_links(mut self, input: std::option::Option<i32>) -> Self {
self.minimum_links = input;
self
}
pub fn encryption_mode(mut self, input: impl Into<std::string::String>) -> Self {
self.encryption_mode = Some(input.into());
self
}
pub fn set_encryption_mode(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.encryption_mode = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateLagInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateLagInput {
lag_id: self.lag_id,
lag_name: self.lag_name,
minimum_links: self.minimum_links.unwrap_or_default(),
encryption_mode: self.encryption_mode,
})
}
}
}
impl UpdateLagInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateLag,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLagInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLagInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UpdateLag",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_lag(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::UpdateLag::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLag",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_lag_input::Builder {
crate::input::update_lag_input::Builder::default()
}
}
pub mod update_virtual_interface_attributes_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) virtual_interface_id: std::option::Option<std::string::String>,
pub(crate) mtu: std::option::Option<i32>,
pub(crate) enable_site_link: std::option::Option<bool>,
pub(crate) virtual_interface_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn virtual_interface_id(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_id = Some(input.into());
self
}
pub fn set_virtual_interface_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_id = input;
self
}
pub fn mtu(mut self, input: i32) -> Self {
self.mtu = Some(input);
self
}
pub fn set_mtu(mut self, input: std::option::Option<i32>) -> Self {
self.mtu = input;
self
}
pub fn enable_site_link(mut self, input: bool) -> Self {
self.enable_site_link = Some(input);
self
}
pub fn set_enable_site_link(mut self, input: std::option::Option<bool>) -> Self {
self.enable_site_link = input;
self
}
pub fn virtual_interface_name(mut self, input: impl Into<std::string::String>) -> Self {
self.virtual_interface_name = Some(input.into());
self
}
pub fn set_virtual_interface_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.virtual_interface_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateVirtualInterfaceAttributesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateVirtualInterfaceAttributesInput {
virtual_interface_id: self.virtual_interface_id,
mtu: self.mtu,
enable_site_link: self.enable_site_link,
virtual_interface_name: self.virtual_interface_name,
})
}
}
}
impl UpdateVirtualInterfaceAttributesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateVirtualInterfaceAttributes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UpdateVirtualInterfaceAttributesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateVirtualInterfaceAttributesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"OvertureService.UpdateVirtualInterfaceAttributes",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_virtual_interface_attributes(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateVirtualInterfaceAttributes::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateVirtualInterfaceAttributes",
"directconnect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_virtual_interface_attributes_input::Builder {
crate::input::update_virtual_interface_attributes_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateVirtualInterfaceAttributesInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub mtu: std::option::Option<i32>,
#[doc(hidden)]
pub enable_site_link: std::option::Option<bool>,
#[doc(hidden)]
pub virtual_interface_name: std::option::Option<std::string::String>,
}
impl UpdateVirtualInterfaceAttributesInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn mtu(&self) -> std::option::Option<i32> {
self.mtu
}
pub fn enable_site_link(&self) -> std::option::Option<bool> {
self.enable_site_link
}
pub fn virtual_interface_name(&self) -> std::option::Option<&str> {
self.virtual_interface_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLagInput {
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub minimum_links: i32,
#[doc(hidden)]
pub encryption_mode: std::option::Option<std::string::String>,
}
impl UpdateLagInput {
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
pub fn lag_name(&self) -> std::option::Option<&str> {
self.lag_name.as_deref()
}
pub fn minimum_links(&self) -> i32 {
self.minimum_links
}
pub fn encryption_mode(&self) -> std::option::Option<&str> {
self.encryption_mode.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateDirectConnectGatewayAssociationInput {
#[doc(hidden)]
pub association_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
#[doc(hidden)]
pub remove_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl UpdateDirectConnectGatewayAssociationInput {
pub fn association_id(&self) -> std::option::Option<&str> {
self.association_id.as_deref()
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.add_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
pub fn remove_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.remove_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateDirectConnectGatewayInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_direct_connect_gateway_name: std::option::Option<std::string::String>,
}
impl UpdateDirectConnectGatewayInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn new_direct_connect_gateway_name(&self) -> std::option::Option<&str> {
self.new_direct_connect_gateway_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConnectionInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub encryption_mode: std::option::Option<std::string::String>,
}
impl UpdateConnectionInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn connection_name(&self) -> std::option::Option<&str> {
self.connection_name.as_deref()
}
pub fn encryption_mode(&self) -> std::option::Option<&str> {
self.encryption_mode.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StopBgpFailoverTestInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
}
impl StopBgpFailoverTestInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartBgpFailoverTestInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bgp_peers: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub test_duration_in_minutes: std::option::Option<i32>,
}
impl StartBgpFailoverTestInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn bgp_peers(&self) -> std::option::Option<&[std::string::String]> {
self.bgp_peers.as_deref()
}
pub fn test_duration_in_minutes(&self) -> std::option::Option<i32> {
self.test_duration_in_minutes
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListVirtualInterfaceTestHistoryInput {
#[doc(hidden)]
pub test_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bgp_peers: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub status: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListVirtualInterfaceTestHistoryInput {
pub fn test_id(&self) -> std::option::Option<&str> {
self.test_id.as_deref()
}
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn bgp_peers(&self) -> std::option::Option<&[std::string::String]> {
self.bgp_peers.as_deref()
}
pub fn status(&self) -> std::option::Option<&str> {
self.status.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateMacSecKeyInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub secret_arn: std::option::Option<std::string::String>,
}
impl DisassociateMacSecKeyInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn secret_arn(&self) -> std::option::Option<&str> {
self.secret_arn.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisassociateConnectionFromLagInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
}
impl DisassociateConnectionFromLagInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeVirtualInterfacesInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
}
impl DescribeVirtualInterfacesInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeVirtualGatewaysInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeTagsInput {
#[doc(hidden)]
pub resource_arns: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeTagsInput {
pub fn resource_arns(&self) -> std::option::Option<&[std::string::String]> {
self.resource_arns.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeRouterConfigurationInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub router_type_identifier: std::option::Option<std::string::String>,
}
impl DescribeRouterConfigurationInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn router_type_identifier(&self) -> std::option::Option<&str> {
self.router_type_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeLocationsInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeLoaInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl DescribeLoaInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
pub fn loa_content_type(&self) -> std::option::Option<&crate::model::LoaContentType> {
self.loa_content_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeLagsInput {
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
}
impl DescribeLagsInput {
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeInterconnectsInput {
#[doc(hidden)]
pub interconnect_id: std::option::Option<std::string::String>,
}
impl DescribeInterconnectsInput {
pub fn interconnect_id(&self) -> std::option::Option<&str> {
self.interconnect_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeInterconnectLoaInput {
#[doc(hidden)]
pub interconnect_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl DescribeInterconnectLoaInput {
pub fn interconnect_id(&self) -> std::option::Option<&str> {
self.interconnect_id.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
pub fn loa_content_type(&self) -> std::option::Option<&crate::model::LoaContentType> {
self.loa_content_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeHostedConnectionsInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
}
impl DescribeHostedConnectionsInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDirectConnectGatewaysInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeDirectConnectGatewaysInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDirectConnectGatewayAttachmentsInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeDirectConnectGatewayAttachmentsInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDirectConnectGatewayAssociationsInput {
#[doc(hidden)]
pub association_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associated_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_gateway_id: std::option::Option<std::string::String>,
}
impl DescribeDirectConnectGatewayAssociationsInput {
pub fn association_id(&self) -> std::option::Option<&str> {
self.association_id.as_deref()
}
pub fn associated_gateway_id(&self) -> std::option::Option<&str> {
self.associated_gateway_id.as_deref()
}
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.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()
}
pub fn virtual_gateway_id(&self) -> std::option::Option<&str> {
self.virtual_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDirectConnectGatewayAssociationProposalsInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub proposal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associated_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeDirectConnectGatewayAssociationProposalsInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn proposal_id(&self) -> std::option::Option<&str> {
self.proposal_id.as_deref()
}
pub fn associated_gateway_id(&self) -> std::option::Option<&str> {
self.associated_gateway_id.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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeCustomerMetadataInput {}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConnectionsOnInterconnectInput {
#[doc(hidden)]
pub interconnect_id: std::option::Option<std::string::String>,
}
impl DescribeConnectionsOnInterconnectInput {
pub fn interconnect_id(&self) -> std::option::Option<&str> {
self.interconnect_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConnectionsInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
}
impl DescribeConnectionsInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeConnectionLoaInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub loa_content_type: std::option::Option<crate::model::LoaContentType>,
}
impl DescribeConnectionLoaInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
pub fn loa_content_type(&self) -> std::option::Option<&crate::model::LoaContentType> {
self.loa_content_type.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteVirtualInterfaceInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
}
impl DeleteVirtualInterfaceInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLagInput {
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
}
impl DeleteLagInput {
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteInterconnectInput {
#[doc(hidden)]
pub interconnect_id: std::option::Option<std::string::String>,
}
impl DeleteInterconnectInput {
pub fn interconnect_id(&self) -> std::option::Option<&str> {
self.interconnect_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDirectConnectGatewayAssociationProposalInput {
#[doc(hidden)]
pub proposal_id: std::option::Option<std::string::String>,
}
impl DeleteDirectConnectGatewayAssociationProposalInput {
pub fn proposal_id(&self) -> std::option::Option<&str> {
self.proposal_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDirectConnectGatewayAssociationInput {
#[doc(hidden)]
pub association_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_gateway_id: std::option::Option<std::string::String>,
}
impl DeleteDirectConnectGatewayAssociationInput {
pub fn association_id(&self) -> std::option::Option<&str> {
self.association_id.as_deref()
}
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn virtual_gateway_id(&self) -> std::option::Option<&str> {
self.virtual_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteDirectConnectGatewayInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl DeleteDirectConnectGatewayInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConnectionInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
}
impl DeleteConnectionInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteBgpPeerInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub asn: i32,
#[doc(hidden)]
pub customer_address: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bgp_peer_id: std::option::Option<std::string::String>,
}
impl DeleteBgpPeerInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn asn(&self) -> i32 {
self.asn
}
pub fn customer_address(&self) -> std::option::Option<&str> {
self.customer_address.as_deref()
}
pub fn bgp_peer_id(&self) -> std::option::Option<&str> {
self.bgp_peer_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateTransitVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_transit_virtual_interface:
std::option::Option<crate::model::NewTransitVirtualInterface>,
}
impl CreateTransitVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn new_transit_virtual_interface(
&self,
) -> std::option::Option<&crate::model::NewTransitVirtualInterface> {
self.new_transit_virtual_interface.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePublicVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_public_virtual_interface: std::option::Option<crate::model::NewPublicVirtualInterface>,
}
impl CreatePublicVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn new_public_virtual_interface(
&self,
) -> std::option::Option<&crate::model::NewPublicVirtualInterface> {
self.new_public_virtual_interface.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePrivateVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_private_virtual_interface:
std::option::Option<crate::model::NewPrivateVirtualInterface>,
}
impl CreatePrivateVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn new_private_virtual_interface(
&self,
) -> std::option::Option<&crate::model::NewPrivateVirtualInterface> {
self.new_private_virtual_interface.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateLagInput {
#[doc(hidden)]
pub number_of_connections: i32,
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connections_bandwidth: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub child_connection_tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_mac_sec: std::option::Option<bool>,
}
impl CreateLagInput {
pub fn number_of_connections(&self) -> i32 {
self.number_of_connections
}
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
pub fn connections_bandwidth(&self) -> std::option::Option<&str> {
self.connections_bandwidth.as_deref()
}
pub fn lag_name(&self) -> std::option::Option<&str> {
self.lag_name.as_deref()
}
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn child_connection_tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.child_connection_tags.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
pub fn request_mac_sec(&self) -> std::option::Option<bool> {
self.request_mac_sec
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateInterconnectInput {
#[doc(hidden)]
pub interconnect_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth: std::option::Option<std::string::String>,
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
}
impl CreateInterconnectInput {
pub fn interconnect_name(&self) -> std::option::Option<&str> {
self.interconnect_name.as_deref()
}
pub fn bandwidth(&self) -> std::option::Option<&str> {
self.bandwidth.as_deref()
}
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDirectConnectGatewayAssociationProposalInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub direct_connect_gateway_owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
#[doc(hidden)]
pub remove_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl CreateDirectConnectGatewayAssociationProposalInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn direct_connect_gateway_owner_account(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_owner_account.as_deref()
}
pub fn gateway_id(&self) -> std::option::Option<&str> {
self.gateway_id.as_deref()
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.add_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
pub fn remove_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.remove_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDirectConnectGatewayAssociationInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub add_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
#[doc(hidden)]
pub virtual_gateway_id: std::option::Option<std::string::String>,
}
impl CreateDirectConnectGatewayAssociationInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn gateway_id(&self) -> std::option::Option<&str> {
self.gateway_id.as_deref()
}
pub fn add_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.add_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
pub fn virtual_gateway_id(&self) -> std::option::Option<&str> {
self.virtual_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateDirectConnectGatewayInput {
#[doc(hidden)]
pub direct_connect_gateway_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub amazon_side_asn: std::option::Option<i64>,
}
impl CreateDirectConnectGatewayInput {
pub fn direct_connect_gateway_name(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_name.as_deref()
}
pub fn amazon_side_asn(&self) -> std::option::Option<i64> {
self.amazon_side_asn
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConnectionInput {
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
#[doc(hidden)]
pub provider_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_mac_sec: std::option::Option<bool>,
}
impl CreateConnectionInput {
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
pub fn bandwidth(&self) -> std::option::Option<&str> {
self.bandwidth.as_deref()
}
pub fn connection_name(&self) -> std::option::Option<&str> {
self.connection_name.as_deref()
}
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn provider_name(&self) -> std::option::Option<&str> {
self.provider_name.as_deref()
}
pub fn request_mac_sec(&self) -> std::option::Option<bool> {
self.request_mac_sec
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateBgpPeerInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_bgp_peer: std::option::Option<crate::model::NewBgpPeer>,
}
impl CreateBgpPeerInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn new_bgp_peer(&self) -> std::option::Option<&crate::model::NewBgpPeer> {
self.new_bgp_peer.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfirmTransitVirtualInterfaceInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl ConfirmTransitVirtualInterfaceInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfirmPublicVirtualInterfaceInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
}
impl ConfirmPublicVirtualInterfaceInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfirmPrivateVirtualInterfaceInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub virtual_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
}
impl ConfirmPrivateVirtualInterfaceInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn virtual_gateway_id(&self) -> std::option::Option<&str> {
self.virtual_gateway_id.as_deref()
}
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfirmCustomerAgreementInput {
#[doc(hidden)]
pub agreement_name: std::option::Option<std::string::String>,
}
impl ConfirmCustomerAgreementInput {
pub fn agreement_name(&self) -> std::option::Option<&str> {
self.agreement_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConfirmConnectionInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
}
impl ConfirmConnectionInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateVirtualInterfaceInput {
#[doc(hidden)]
pub virtual_interface_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
}
impl AssociateVirtualInterfaceInput {
pub fn virtual_interface_id(&self) -> std::option::Option<&str> {
self.virtual_interface_id.as_deref()
}
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateMacSecKeyInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub secret_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ckn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub cak: std::option::Option<std::string::String>,
}
impl AssociateMacSecKeyInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn secret_arn(&self) -> std::option::Option<&str> {
self.secret_arn.as_deref()
}
pub fn ckn(&self) -> std::option::Option<&str> {
self.ckn.as_deref()
}
pub fn cak(&self) -> std::option::Option<&str> {
self.cak.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateHostedConnectionInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub parent_connection_id: std::option::Option<std::string::String>,
}
impl AssociateHostedConnectionInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn parent_connection_id(&self) -> std::option::Option<&str> {
self.parent_connection_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociateConnectionWithLagInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub lag_id: std::option::Option<std::string::String>,
}
impl AssociateConnectionWithLagInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn lag_id(&self) -> std::option::Option<&str> {
self.lag_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocateTransitVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_transit_virtual_interface_allocation:
std::option::Option<crate::model::NewTransitVirtualInterfaceAllocation>,
}
impl AllocateTransitVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn new_transit_virtual_interface_allocation(
&self,
) -> std::option::Option<&crate::model::NewTransitVirtualInterfaceAllocation> {
self.new_transit_virtual_interface_allocation.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocatePublicVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_public_virtual_interface_allocation:
std::option::Option<crate::model::NewPublicVirtualInterfaceAllocation>,
}
impl AllocatePublicVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn new_public_virtual_interface_allocation(
&self,
) -> std::option::Option<&crate::model::NewPublicVirtualInterfaceAllocation> {
self.new_public_virtual_interface_allocation.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocatePrivateVirtualInterfaceInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub new_private_virtual_interface_allocation:
std::option::Option<crate::model::NewPrivateVirtualInterfaceAllocation>,
}
impl AllocatePrivateVirtualInterfaceInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn new_private_virtual_interface_allocation(
&self,
) -> std::option::Option<&crate::model::NewPrivateVirtualInterfaceAllocation> {
self.new_private_virtual_interface_allocation.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocateHostedConnectionInput {
#[doc(hidden)]
pub connection_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub bandwidth: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub vlan: i32,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl AllocateHostedConnectionInput {
pub fn connection_id(&self) -> std::option::Option<&str> {
self.connection_id.as_deref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn bandwidth(&self) -> std::option::Option<&str> {
self.bandwidth.as_deref()
}
pub fn connection_name(&self) -> std::option::Option<&str> {
self.connection_name.as_deref()
}
pub fn vlan(&self) -> i32 {
self.vlan
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocateConnectionOnInterconnectInput {
#[doc(hidden)]
pub bandwidth: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub interconnect_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub vlan: i32,
}
impl AllocateConnectionOnInterconnectInput {
pub fn bandwidth(&self) -> std::option::Option<&str> {
self.bandwidth.as_deref()
}
pub fn connection_name(&self) -> std::option::Option<&str> {
self.connection_name.as_deref()
}
pub fn owner_account(&self) -> std::option::Option<&str> {
self.owner_account.as_deref()
}
pub fn interconnect_id(&self) -> std::option::Option<&str> {
self.interconnect_id.as_deref()
}
pub fn vlan(&self) -> i32 {
self.vlan
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceptDirectConnectGatewayAssociationProposalInput {
#[doc(hidden)]
pub direct_connect_gateway_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub proposal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub associated_gateway_owner_account: std::option::Option<std::string::String>,
#[doc(hidden)]
pub override_allowed_prefixes_to_direct_connect_gateway:
std::option::Option<std::vec::Vec<crate::model::RouteFilterPrefix>>,
}
impl AcceptDirectConnectGatewayAssociationProposalInput {
pub fn direct_connect_gateway_id(&self) -> std::option::Option<&str> {
self.direct_connect_gateway_id.as_deref()
}
pub fn proposal_id(&self) -> std::option::Option<&str> {
self.proposal_id.as_deref()
}
pub fn associated_gateway_owner_account(&self) -> std::option::Option<&str> {
self.associated_gateway_owner_account.as_deref()
}
pub fn override_allowed_prefixes_to_direct_connect_gateway(
&self,
) -> std::option::Option<&[crate::model::RouteFilterPrefix]> {
self.override_allowed_prefixes_to_direct_connect_gateway
.as_deref()
}
}