use std::fmt::Write;
pub mod create_configuration_set_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConfigurationSetInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConfigurationSetInput {
configuration_set_name: self.configuration_set_name,
})
}
}
}
impl CreateConfigurationSetInput {
#[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::CreateConfigurationSet,
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::CreateConfigurationSetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/sms-voice/configuration-sets")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConfigurationSetInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_configuration_set(
&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::CreateConfigurationSet::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConfigurationSet",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_configuration_set_input::Builder {
crate::input::create_configuration_set_input::Builder::default()
}
}
pub mod create_configuration_set_event_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
pub(crate) event_destination: std::option::Option<crate::model::EventDestinationDefinition>,
pub(crate) event_destination_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn event_destination(
mut self,
input: crate::model::EventDestinationDefinition,
) -> Self {
self.event_destination = Some(input);
self
}
pub fn set_event_destination(
mut self,
input: std::option::Option<crate::model::EventDestinationDefinition>,
) -> Self {
self.event_destination = input;
self
}
pub fn event_destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.event_destination_name = Some(input.into());
self
}
pub fn set_event_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.event_destination_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateConfigurationSetEventDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateConfigurationSetEventDestinationInput {
configuration_set_name: self.configuration_set_name,
event_destination: self.event_destination,
event_destination_name: self.event_destination_name,
})
}
}
}
impl CreateConfigurationSetEventDestinationInput {
#[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::CreateConfigurationSetEventDestination,
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::CreateConfigurationSetEventDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.configuration_set_name;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
)
})?;
let configuration_set_name = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_set_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations",
ConfigurationSetName = configuration_set_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateConfigurationSetEventDestinationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_configuration_set_event_destination(&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::CreateConfigurationSetEventDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateConfigurationSetEventDestination",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_configuration_set_event_destination_input::Builder {
crate::input::create_configuration_set_event_destination_input::Builder::default()
}
}
pub mod delete_configuration_set_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfigurationSetInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfigurationSetInput {
configuration_set_name: self.configuration_set_name,
})
}
}
}
impl DeleteConfigurationSetInput {
#[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::DeleteConfigurationSet,
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::DeleteConfigurationSetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.configuration_set_name;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
)
})?;
let configuration_set_name = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_set_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/sms-voice/configuration-sets/{ConfigurationSetName}",
ConfigurationSetName = configuration_set_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfigurationSetInput,
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("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConfigurationSet::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfigurationSet",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configuration_set_input::Builder {
crate::input::delete_configuration_set_input::Builder::default()
}
}
pub mod delete_configuration_set_event_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
pub(crate) event_destination_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn event_destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.event_destination_name = Some(input.into());
self
}
pub fn set_event_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.event_destination_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteConfigurationSetEventDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteConfigurationSetEventDestinationInput {
configuration_set_name: self.configuration_set_name,
event_destination_name: self.event_destination_name,
})
}
}
}
impl DeleteConfigurationSetEventDestinationInput {
#[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::DeleteConfigurationSetEventDestination,
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::DeleteConfigurationSetEventDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.configuration_set_name;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
)
})?;
let configuration_set_name = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_set_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
),
);
}
let input_4 = &_input.event_destination_name;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"event_destination_name",
"cannot be empty or unset",
)
})?;
let event_destination_name = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if event_destination_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"event_destination_name",
"cannot be empty or unset",
),
);
}
write!(output, "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", ConfigurationSetName = configuration_set_name, EventDestinationName = event_destination_name).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteConfigurationSetEventDestinationInput,
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("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteConfigurationSetEventDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteConfigurationSetEventDestination",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_configuration_set_event_destination_input::Builder {
crate::input::delete_configuration_set_event_destination_input::Builder::default()
}
}
pub mod get_configuration_set_event_destinations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetConfigurationSetEventDestinationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetConfigurationSetEventDestinationsInput {
configuration_set_name: self.configuration_set_name,
})
}
}
}
impl GetConfigurationSetEventDestinationsInput {
#[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::GetConfigurationSetEventDestinations,
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::GetConfigurationSetEventDestinationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.configuration_set_name;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
)
})?;
let configuration_set_name = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_set_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
),
);
}
write!(
output,
"/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations",
ConfigurationSetName = configuration_set_name
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetConfigurationSetEventDestinationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetConfigurationSetEventDestinations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetConfigurationSetEventDestinations",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_configuration_set_event_destinations_input::Builder {
crate::input::get_configuration_set_event_destinations_input::Builder::default()
}
}
pub mod list_configuration_sets_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) page_size: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn page_size(mut self, input: impl Into<std::string::String>) -> Self {
self.page_size = Some(input.into());
self
}
pub fn set_page_size(mut self, input: std::option::Option<std::string::String>) -> Self {
self.page_size = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListConfigurationSetsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListConfigurationSetsInput {
next_token: self.next_token,
page_size: self.page_size,
})
}
}
}
impl ListConfigurationSetsInput {
#[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::ListConfigurationSets,
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::ListConfigurationSetsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/sms-voice/configuration-sets")
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListConfigurationSetsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_6) = &_input.next_token {
{
query.push_kv("NextToken", &aws_smithy_http::query::fmt_string(&inner_6));
}
}
if let Some(inner_7) = &_input.page_size {
{
query.push_kv("PageSize", &aws_smithy_http::query::fmt_string(&inner_7));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListConfigurationSetsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListConfigurationSets::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListConfigurationSets",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_configuration_sets_input::Builder {
crate::input::list_configuration_sets_input::Builder::default()
}
}
pub mod send_voice_message_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) caller_id: std::option::Option<std::string::String>,
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
pub(crate) content: std::option::Option<crate::model::VoiceMessageContent>,
pub(crate) destination_phone_number: std::option::Option<std::string::String>,
pub(crate) origination_phone_number: std::option::Option<std::string::String>,
}
impl Builder {
pub fn caller_id(mut self, input: impl Into<std::string::String>) -> Self {
self.caller_id = Some(input.into());
self
}
pub fn set_caller_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.caller_id = input;
self
}
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn content(mut self, input: crate::model::VoiceMessageContent) -> Self {
self.content = Some(input);
self
}
pub fn set_content(
mut self,
input: std::option::Option<crate::model::VoiceMessageContent>,
) -> Self {
self.content = input;
self
}
pub fn destination_phone_number(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_phone_number = Some(input.into());
self
}
pub fn set_destination_phone_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.destination_phone_number = input;
self
}
pub fn origination_phone_number(mut self, input: impl Into<std::string::String>) -> Self {
self.origination_phone_number = Some(input.into());
self
}
pub fn set_origination_phone_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.origination_phone_number = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::SendVoiceMessageInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::SendVoiceMessageInput {
caller_id: self.caller_id,
configuration_set_name: self.configuration_set_name,
content: self.content,
destination_phone_number: self.destination_phone_number,
origination_phone_number: self.origination_phone_number,
})
}
}
}
impl SendVoiceMessageInput {
#[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::SendVoiceMessage,
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::SendVoiceMessageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/v1/sms-voice/voice/message").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SendVoiceMessageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_send_voice_message(&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::SendVoiceMessage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SendVoiceMessage",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::send_voice_message_input::Builder {
crate::input::send_voice_message_input::Builder::default()
}
}
pub mod update_configuration_set_event_destination_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) configuration_set_name: std::option::Option<std::string::String>,
pub(crate) event_destination: std::option::Option<crate::model::EventDestinationDefinition>,
pub(crate) event_destination_name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn configuration_set_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_set_name = Some(input.into());
self
}
pub fn set_configuration_set_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_set_name = input;
self
}
pub fn event_destination(
mut self,
input: crate::model::EventDestinationDefinition,
) -> Self {
self.event_destination = Some(input);
self
}
pub fn set_event_destination(
mut self,
input: std::option::Option<crate::model::EventDestinationDefinition>,
) -> Self {
self.event_destination = input;
self
}
pub fn event_destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.event_destination_name = Some(input.into());
self
}
pub fn set_event_destination_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.event_destination_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateConfigurationSetEventDestinationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateConfigurationSetEventDestinationInput {
configuration_set_name: self.configuration_set_name,
event_destination: self.event_destination,
event_destination_name: self.event_destination_name,
})
}
}
}
impl UpdateConfigurationSetEventDestinationInput {
#[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::UpdateConfigurationSetEventDestination,
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::UpdateConfigurationSetEventDestinationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_8 = &_input.configuration_set_name;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
)
})?;
let configuration_set_name = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if configuration_set_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"configuration_set_name",
"cannot be empty or unset",
),
);
}
let input_9 = &_input.event_destination_name;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"event_destination_name",
"cannot be empty or unset",
)
})?;
let event_destination_name = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if event_destination_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"event_destination_name",
"cannot be empty or unset",
),
);
}
write!(output, "/v1/sms-voice/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}", ConfigurationSetName = configuration_set_name, EventDestinationName = event_destination_name).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateConfigurationSetEventDestinationInput,
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("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_configuration_set_event_destination(&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::UpdateConfigurationSetEventDestination::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateConfigurationSetEventDestination",
"pinpointsmsvoice",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_configuration_set_event_destination_input::Builder {
crate::input::update_configuration_set_event_destination_input::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateConfigurationSetEventDestinationInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_destination: std::option::Option<crate::model::EventDestinationDefinition>,
#[doc(hidden)]
pub event_destination_name: std::option::Option<std::string::String>,
}
impl UpdateConfigurationSetEventDestinationInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
pub fn event_destination(
&self,
) -> std::option::Option<&crate::model::EventDestinationDefinition> {
self.event_destination.as_ref()
}
pub fn event_destination_name(&self) -> std::option::Option<&str> {
self.event_destination_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendVoiceMessageInput {
#[doc(hidden)]
pub caller_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub content: std::option::Option<crate::model::VoiceMessageContent>,
#[doc(hidden)]
pub destination_phone_number: std::option::Option<std::string::String>,
#[doc(hidden)]
pub origination_phone_number: std::option::Option<std::string::String>,
}
impl SendVoiceMessageInput {
pub fn caller_id(&self) -> std::option::Option<&str> {
self.caller_id.as_deref()
}
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
pub fn content(&self) -> std::option::Option<&crate::model::VoiceMessageContent> {
self.content.as_ref()
}
pub fn destination_phone_number(&self) -> std::option::Option<&str> {
self.destination_phone_number.as_deref()
}
pub fn origination_phone_number(&self) -> std::option::Option<&str> {
self.origination_phone_number.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListConfigurationSetsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub page_size: std::option::Option<std::string::String>,
}
impl ListConfigurationSetsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn page_size(&self) -> std::option::Option<&str> {
self.page_size.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetConfigurationSetEventDestinationsInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
}
impl GetConfigurationSetEventDestinationsInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfigurationSetEventDestinationInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_destination_name: std::option::Option<std::string::String>,
}
impl DeleteConfigurationSetEventDestinationInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
pub fn event_destination_name(&self) -> std::option::Option<&str> {
self.event_destination_name.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteConfigurationSetInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
}
impl DeleteConfigurationSetInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConfigurationSetEventDestinationInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_destination: std::option::Option<crate::model::EventDestinationDefinition>,
#[doc(hidden)]
pub event_destination_name: std::option::Option<std::string::String>,
}
impl CreateConfigurationSetEventDestinationInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
pub fn event_destination(
&self,
) -> std::option::Option<&crate::model::EventDestinationDefinition> {
self.event_destination.as_ref()
}
pub fn event_destination_name(&self) -> std::option::Option<&str> {
self.event_destination_name.as_deref()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateConfigurationSetInput {
#[doc(hidden)]
pub configuration_set_name: std::option::Option<std::string::String>,
}
impl CreateConfigurationSetInput {
pub fn configuration_set_name(&self) -> std::option::Option<&str> {
self.configuration_set_name.as_deref()
}
}