use std::fmt::Write;
pub mod create_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) server_side_encryption_configuration:
std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn server_side_encryption_configuration(
mut self,
input: crate::model::ServerSideEncryptionConfiguration,
) -> Self {
self.server_side_encryption_configuration = Some(input);
self
}
pub fn set_server_side_encryption_configuration(
mut self,
input: std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
) -> Self {
self.server_side_encryption_configuration = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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,
) -> std::result::Result<
crate::input::CreateDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDomainInput {
name: self.name,
description: self.description,
server_side_encryption_configuration: self.server_side_encryption_configuration,
client_token: self.client_token,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type CreateDomainInputOperationOutputAlias = crate::operation::CreateDomain;
#[doc(hidden)]
pub type CreateDomainInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl CreateDomainInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.CreateDomain",
);
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_domain(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDomain",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::create_domain_input::Builder {
crate::input::create_domain_input::Builder::default()
}
}
pub mod delete_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDomainInput {
domain_id: self.domain_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteDomainInputOperationOutputAlias = crate::operation::DeleteDomain;
#[doc(hidden)]
pub type DeleteDomainInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteDomainInput {
#[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::DeleteDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DeleteDomain",
);
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_domain(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDomain",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_domain_input::Builder {
crate::input::delete_domain_input::Builder::default()
}
}
pub mod delete_fraudster_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) fraudster_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn fraudster_id(mut self, input: impl Into<std::string::String>) -> Self {
self.fraudster_id = Some(input.into());
self
}
pub fn set_fraudster_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fraudster_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteFraudsterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteFraudsterInput {
domain_id: self.domain_id,
fraudster_id: self.fraudster_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteFraudsterInputOperationOutputAlias = crate::operation::DeleteFraudster;
#[doc(hidden)]
pub type DeleteFraudsterInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteFraudsterInput {
#[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::DeleteFraudster,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteFraudsterInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteFraudsterInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DeleteFraudster",
);
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_fraudster(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteFraudster::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteFraudster",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_fraudster_input::Builder {
crate::input::delete_fraudster_input::Builder::default()
}
}
pub mod delete_speaker_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) speaker_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn speaker_id(mut self, input: impl Into<std::string::String>) -> Self {
self.speaker_id = Some(input.into());
self
}
pub fn set_speaker_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.speaker_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteSpeakerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteSpeakerInput {
domain_id: self.domain_id,
speaker_id: self.speaker_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteSpeakerInputOperationOutputAlias = crate::operation::DeleteSpeaker;
#[doc(hidden)]
pub type DeleteSpeakerInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DeleteSpeakerInput {
#[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::DeleteSpeaker,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteSpeakerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteSpeakerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DeleteSpeaker",
);
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_speaker(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteSpeaker::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteSpeaker",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_speaker_input::Builder {
crate::input::delete_speaker_input::Builder::default()
}
}
pub mod describe_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeDomainInput {
domain_id: self.domain_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeDomainInputOperationOutputAlias = crate::operation::DescribeDomain;
#[doc(hidden)]
pub type DescribeDomainInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DescribeDomainInput {
#[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::DescribeDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DescribeDomain",
);
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_domain(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDomain",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_domain_input::Builder {
crate::input::describe_domain_input::Builder::default()
}
}
pub mod describe_fraudster_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) fraudster_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn fraudster_id(mut self, input: impl Into<std::string::String>) -> Self {
self.fraudster_id = Some(input.into());
self
}
pub fn set_fraudster_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fraudster_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeFraudsterInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeFraudsterInput {
domain_id: self.domain_id,
fraudster_id: self.fraudster_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeFraudsterInputOperationOutputAlias = crate::operation::DescribeFraudster;
#[doc(hidden)]
pub type DescribeFraudsterInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DescribeFraudsterInput {
#[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::DescribeFraudster,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeFraudsterInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeFraudsterInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DescribeFraudster",
);
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_fraudster(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeFraudster::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeFraudster",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_fraudster_input::Builder {
crate::input::describe_fraudster_input::Builder::default()
}
}
pub mod describe_fraudster_registration_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeFraudsterRegistrationJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeFraudsterRegistrationJobInput {
domain_id: self.domain_id,
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeFraudsterRegistrationJobInputOperationOutputAlias =
crate::operation::DescribeFraudsterRegistrationJob;
#[doc(hidden)]
pub type DescribeFraudsterRegistrationJobInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DescribeFraudsterRegistrationJobInput {
#[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::DescribeFraudsterRegistrationJob,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeFraudsterRegistrationJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeFraudsterRegistrationJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DescribeFraudsterRegistrationJob",
);
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_fraudster_registration_job(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeFraudsterRegistrationJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeFraudsterRegistrationJob",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_fraudster_registration_job_input::Builder {
crate::input::describe_fraudster_registration_job_input::Builder::default()
}
}
pub mod describe_speaker_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) speaker_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn speaker_id(mut self, input: impl Into<std::string::String>) -> Self {
self.speaker_id = Some(input.into());
self
}
pub fn set_speaker_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.speaker_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeSpeakerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeSpeakerInput {
domain_id: self.domain_id,
speaker_id: self.speaker_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeSpeakerInputOperationOutputAlias = crate::operation::DescribeSpeaker;
#[doc(hidden)]
pub type DescribeSpeakerInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl DescribeSpeakerInput {
#[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::DescribeSpeaker,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeSpeakerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeSpeakerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DescribeSpeaker",
);
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_speaker(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeSpeaker::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSpeaker",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_speaker_input::Builder {
crate::input::describe_speaker_input::Builder::default()
}
}
pub mod describe_speaker_enrollment_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn job_id(mut self, input: impl Into<std::string::String>) -> Self {
self.job_id = Some(input.into());
self
}
pub fn set_job_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeSpeakerEnrollmentJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeSpeakerEnrollmentJobInput {
domain_id: self.domain_id,
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeSpeakerEnrollmentJobInputOperationOutputAlias =
crate::operation::DescribeSpeakerEnrollmentJob;
#[doc(hidden)]
pub type DescribeSpeakerEnrollmentJobInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl DescribeSpeakerEnrollmentJobInput {
#[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::DescribeSpeakerEnrollmentJob,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeSpeakerEnrollmentJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeSpeakerEnrollmentJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.DescribeSpeakerEnrollmentJob",
);
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_speaker_enrollment_job(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeSpeakerEnrollmentJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSpeakerEnrollmentJob",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_speaker_enrollment_job_input::Builder {
crate::input::describe_speaker_enrollment_job_input::Builder::default()
}
}
pub mod evaluate_session_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) session_name_or_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn session_name_or_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_name_or_id = Some(input.into());
self
}
pub fn set_session_name_or_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.session_name_or_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::EvaluateSessionInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::EvaluateSessionInput {
domain_id: self.domain_id,
session_name_or_id: self.session_name_or_id,
})
}
}
}
#[doc(hidden)]
pub type EvaluateSessionInputOperationOutputAlias = crate::operation::EvaluateSession;
#[doc(hidden)]
pub type EvaluateSessionInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl EvaluateSessionInput {
#[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::EvaluateSession,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::EvaluateSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::EvaluateSessionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_1) = &_input.domain_id {
query.push_kv("domainId", &aws_smithy_http::query::fmt_string(&inner_1));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::EvaluateSessionInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.EvaluateSession",
);
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_evaluate_session(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::EvaluateSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"EvaluateSession",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::evaluate_session_input::Builder {
crate::input::evaluate_session_input::Builder::default()
}
}
pub mod list_domains_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListDomainsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDomainsInput {
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListDomainsInputOperationOutputAlias = crate::operation::ListDomains;
#[doc(hidden)]
pub type ListDomainsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListDomainsInput {
#[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::ListDomains,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListDomainsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListDomainsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_2) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_2).encode(),
);
}
if let Some(inner_3) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_3));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListDomainsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.ListDomains",
);
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_domains(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDomains::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDomains",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_domains_input::Builder {
crate::input::list_domains_input::Builder::default()
}
}
pub mod list_fraudster_registration_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) job_status: std::option::Option<crate::model::FraudsterRegistrationJobStatus>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn job_status(mut self, input: crate::model::FraudsterRegistrationJobStatus) -> Self {
self.job_status = Some(input);
self
}
pub fn set_job_status(
mut self,
input: std::option::Option<crate::model::FraudsterRegistrationJobStatus>,
) -> Self {
self.job_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,
) -> std::result::Result<
crate::input::ListFraudsterRegistrationJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListFraudsterRegistrationJobsInput {
domain_id: self.domain_id,
job_status: self.job_status,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListFraudsterRegistrationJobsInputOperationOutputAlias =
crate::operation::ListFraudsterRegistrationJobs;
#[doc(hidden)]
pub type ListFraudsterRegistrationJobsInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl ListFraudsterRegistrationJobsInput {
#[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::ListFraudsterRegistrationJobs,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListFraudsterRegistrationJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListFraudsterRegistrationJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_4) = &_input.job_status {
query.push_kv("jobStatus", &aws_smithy_http::query::fmt_string(&inner_4));
}
if let Some(inner_5) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_5).encode(),
);
}
if let Some(inner_6) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_6));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListFraudsterRegistrationJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.ListFraudsterRegistrationJobs",
);
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_fraudster_registration_jobs(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListFraudsterRegistrationJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListFraudsterRegistrationJobs",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_fraudster_registration_jobs_input::Builder {
crate::input::list_fraudster_registration_jobs_input::Builder::default()
}
}
pub mod list_speaker_enrollment_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) job_status: std::option::Option<crate::model::SpeakerEnrollmentJobStatus>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn job_status(mut self, input: crate::model::SpeakerEnrollmentJobStatus) -> Self {
self.job_status = Some(input);
self
}
pub fn set_job_status(
mut self,
input: std::option::Option<crate::model::SpeakerEnrollmentJobStatus>,
) -> Self {
self.job_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,
) -> std::result::Result<
crate::input::ListSpeakerEnrollmentJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListSpeakerEnrollmentJobsInput {
domain_id: self.domain_id,
job_status: self.job_status,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListSpeakerEnrollmentJobsInputOperationOutputAlias =
crate::operation::ListSpeakerEnrollmentJobs;
#[doc(hidden)]
pub type ListSpeakerEnrollmentJobsInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListSpeakerEnrollmentJobsInput {
#[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::ListSpeakerEnrollmentJobs,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListSpeakerEnrollmentJobsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListSpeakerEnrollmentJobsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_7) = &_input.job_status {
query.push_kv("jobStatus", &aws_smithy_http::query::fmt_string(&inner_7));
}
if let Some(inner_8) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_8).encode(),
);
}
if let Some(inner_9) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_9));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListSpeakerEnrollmentJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.ListSpeakerEnrollmentJobs",
);
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_speaker_enrollment_jobs(
&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSpeakerEnrollmentJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSpeakerEnrollmentJobs",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_speaker_enrollment_jobs_input::Builder {
crate::input::list_speaker_enrollment_jobs_input::Builder::default()
}
}
pub mod list_speakers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_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 domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_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,
) -> std::result::Result<
crate::input::ListSpeakersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListSpeakersInput {
domain_id: self.domain_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
#[doc(hidden)]
pub type ListSpeakersInputOperationOutputAlias = crate::operation::ListSpeakers;
#[doc(hidden)]
pub type ListSpeakersInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListSpeakersInput {
#[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::ListSpeakers,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListSpeakersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListSpeakersInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_10) = &_input.max_results {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_10).encode(),
);
}
if let Some(inner_11) = &_input.next_token {
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_11));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListSpeakersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.ListSpeakers",
);
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_speakers(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSpeakers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSpeakers",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_speakers_input::Builder {
crate::input::list_speakers_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.ListTagsForResource",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_tags_for_resource(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod opt_out_speaker_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) speaker_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn speaker_id(mut self, input: impl Into<std::string::String>) -> Self {
self.speaker_id = Some(input.into());
self
}
pub fn set_speaker_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.speaker_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::OptOutSpeakerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::OptOutSpeakerInput {
domain_id: self.domain_id,
speaker_id: self.speaker_id,
})
}
}
}
#[doc(hidden)]
pub type OptOutSpeakerInputOperationOutputAlias = crate::operation::OptOutSpeaker;
#[doc(hidden)]
pub type OptOutSpeakerInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl OptOutSpeakerInput {
#[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::OptOutSpeaker,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::OptOutSpeakerInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::OptOutSpeakerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.OptOutSpeaker",
);
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_opt_out_speaker(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::OptOutSpeaker::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"OptOutSpeaker",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::opt_out_speaker_input::Builder {
crate::input::opt_out_speaker_input::Builder::default()
}
}
pub mod start_fraudster_registration_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) registration_config: std::option::Option<crate::model::RegistrationConfig>,
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn job_name(mut self, input: impl Into<std::string::String>) -> Self {
self.job_name = Some(input.into());
self
}
pub fn set_job_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_name = input;
self
}
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn data_access_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.data_access_role_arn = Some(input.into());
self
}
pub fn set_data_access_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.data_access_role_arn = input;
self
}
pub fn registration_config(mut self, input: crate::model::RegistrationConfig) -> Self {
self.registration_config = Some(input);
self
}
pub fn set_registration_config(
mut self,
input: std::option::Option<crate::model::RegistrationConfig>,
) -> Self {
self.registration_config = input;
self
}
pub fn input_data_config(mut self, input: crate::model::InputDataConfig) -> Self {
self.input_data_config = Some(input);
self
}
pub fn set_input_data_config(
mut self,
input: std::option::Option<crate::model::InputDataConfig>,
) -> Self {
self.input_data_config = input;
self
}
pub fn output_data_config(mut self, input: crate::model::OutputDataConfig) -> Self {
self.output_data_config = Some(input);
self
}
pub fn set_output_data_config(
mut self,
input: std::option::Option<crate::model::OutputDataConfig>,
) -> Self {
self.output_data_config = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartFraudsterRegistrationJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartFraudsterRegistrationJobInput {
client_token: self.client_token,
job_name: self.job_name,
domain_id: self.domain_id,
data_access_role_arn: self.data_access_role_arn,
registration_config: self.registration_config,
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
})
}
}
}
#[doc(hidden)]
pub type StartFraudsterRegistrationJobInputOperationOutputAlias =
crate::operation::StartFraudsterRegistrationJob;
#[doc(hidden)]
pub type StartFraudsterRegistrationJobInputOperationRetryAlias =
aws_http::retry::AwsErrorRetryPolicy;
impl StartFraudsterRegistrationJobInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartFraudsterRegistrationJob,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StartFraudsterRegistrationJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartFraudsterRegistrationJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.StartFraudsterRegistrationJob",
);
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_fraudster_registration_job(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartFraudsterRegistrationJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartFraudsterRegistrationJob",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::start_fraudster_registration_job_input::Builder {
crate::input::start_fraudster_registration_job_input::Builder::default()
}
}
pub mod start_speaker_enrollment_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) enrollment_config: std::option::Option<crate::model::EnrollmentConfig>,
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn job_name(mut self, input: impl Into<std::string::String>) -> Self {
self.job_name = Some(input.into());
self
}
pub fn set_job_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.job_name = input;
self
}
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn data_access_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.data_access_role_arn = Some(input.into());
self
}
pub fn set_data_access_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.data_access_role_arn = input;
self
}
pub fn enrollment_config(mut self, input: crate::model::EnrollmentConfig) -> Self {
self.enrollment_config = Some(input);
self
}
pub fn set_enrollment_config(
mut self,
input: std::option::Option<crate::model::EnrollmentConfig>,
) -> Self {
self.enrollment_config = input;
self
}
pub fn input_data_config(mut self, input: crate::model::InputDataConfig) -> Self {
self.input_data_config = Some(input);
self
}
pub fn set_input_data_config(
mut self,
input: std::option::Option<crate::model::InputDataConfig>,
) -> Self {
self.input_data_config = input;
self
}
pub fn output_data_config(mut self, input: crate::model::OutputDataConfig) -> Self {
self.output_data_config = Some(input);
self
}
pub fn set_output_data_config(
mut self,
input: std::option::Option<crate::model::OutputDataConfig>,
) -> Self {
self.output_data_config = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartSpeakerEnrollmentJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartSpeakerEnrollmentJobInput {
client_token: self.client_token,
job_name: self.job_name,
domain_id: self.domain_id,
data_access_role_arn: self.data_access_role_arn,
enrollment_config: self.enrollment_config,
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
})
}
}
}
#[doc(hidden)]
pub type StartSpeakerEnrollmentJobInputOperationOutputAlias =
crate::operation::StartSpeakerEnrollmentJob;
#[doc(hidden)]
pub type StartSpeakerEnrollmentJobInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl StartSpeakerEnrollmentJobInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartSpeakerEnrollmentJob,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StartSpeakerEnrollmentJobInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartSpeakerEnrollmentJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.StartSpeakerEnrollmentJob",
);
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_speaker_enrollment_job(
&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartSpeakerEnrollmentJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartSpeakerEnrollmentJob",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::start_speaker_enrollment_job_input::Builder {
crate::input::start_speaker_enrollment_job_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: 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,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
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::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
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::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_12) = &_input.tag_keys {
for inner_13 in inner_12 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_13));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_domain_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) domain_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) server_side_encryption_configuration:
std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
}
impl Builder {
pub fn domain_id(mut self, input: impl Into<std::string::String>) -> Self {
self.domain_id = Some(input.into());
self
}
pub fn set_domain_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn server_side_encryption_configuration(
mut self,
input: crate::model::ServerSideEncryptionConfiguration,
) -> Self {
self.server_side_encryption_configuration = Some(input);
self
}
pub fn set_server_side_encryption_configuration(
mut self,
input: std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
) -> Self {
self.server_side_encryption_configuration = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateDomainInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateDomainInput {
domain_id: self.domain_id,
name: self.name,
description: self.description,
server_side_encryption_configuration: self.server_side_encryption_configuration,
})
}
}
}
#[doc(hidden)]
pub type UpdateDomainInputOperationOutputAlias = crate::operation::UpdateDomain;
#[doc(hidden)]
pub type UpdateDomainInputOperationRetryAlias = aws_http::retry::AwsErrorRetryPolicy;
impl UpdateDomainInput {
#[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::UpdateDomain,
aws_http::retry::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::UpdateDomainInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateDomainInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/x-amz-json-1.0",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"VoiceID.UpdateDomain",
);
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_domain(&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(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(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateDomain::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateDomain",
"voiceid",
));
let op = op.with_retry_policy(aws_http::retry::AwsErrorRetryPolicy::new());
Ok(op)
}
pub fn builder() -> crate::input::update_domain_input::Builder {
crate::input::update_domain_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateDomainInput {
pub domain_id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub server_side_encryption_configuration:
std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
}
impl UpdateDomainInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn server_side_encryption_configuration(
&self,
) -> std::option::Option<&crate::model::ServerSideEncryptionConfiguration> {
self.server_side_encryption_configuration.as_ref()
}
}
impl std::fmt::Debug for UpdateDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDomainInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field(
"server_side_encryption_configuration",
&self.server_side_encryption_configuration,
);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UntagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
impl std::fmt::Debug for UntagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UntagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tag_keys", &self.tag_keys);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TagResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::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()
}
}
impl std::fmt::Debug for TagResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("TagResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartSpeakerEnrollmentJobInput {
pub client_token: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub domain_id: std::option::Option<std::string::String>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub enrollment_config: std::option::Option<crate::model::EnrollmentConfig>,
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
}
impl StartSpeakerEnrollmentJobInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn enrollment_config(&self) -> std::option::Option<&crate::model::EnrollmentConfig> {
self.enrollment_config.as_ref()
}
pub fn input_data_config(&self) -> std::option::Option<&crate::model::InputDataConfig> {
self.input_data_config.as_ref()
}
pub fn output_data_config(&self) -> std::option::Option<&crate::model::OutputDataConfig> {
self.output_data_config.as_ref()
}
}
impl std::fmt::Debug for StartSpeakerEnrollmentJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartSpeakerEnrollmentJobInput");
formatter.field("client_token", &self.client_token);
formatter.field("job_name", &"*** Sensitive Data Redacted ***");
formatter.field("domain_id", &self.domain_id);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("enrollment_config", &self.enrollment_config);
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartFraudsterRegistrationJobInput {
pub client_token: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub domain_id: std::option::Option<std::string::String>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub registration_config: std::option::Option<crate::model::RegistrationConfig>,
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
}
impl StartFraudsterRegistrationJobInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn registration_config(&self) -> std::option::Option<&crate::model::RegistrationConfig> {
self.registration_config.as_ref()
}
pub fn input_data_config(&self) -> std::option::Option<&crate::model::InputDataConfig> {
self.input_data_config.as_ref()
}
pub fn output_data_config(&self) -> std::option::Option<&crate::model::OutputDataConfig> {
self.output_data_config.as_ref()
}
}
impl std::fmt::Debug for StartFraudsterRegistrationJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartFraudsterRegistrationJobInput");
formatter.field("client_token", &self.client_token);
formatter.field("job_name", &"*** Sensitive Data Redacted ***");
formatter.field("domain_id", &self.domain_id);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("registration_config", &self.registration_config);
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OptOutSpeakerInput {
pub domain_id: std::option::Option<std::string::String>,
pub speaker_id: std::option::Option<std::string::String>,
}
impl OptOutSpeakerInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn speaker_id(&self) -> std::option::Option<&str> {
self.speaker_id.as_deref()
}
}
impl std::fmt::Debug for OptOutSpeakerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("OptOutSpeakerInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("speaker_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTagsForResourceInput {
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}
impl std::fmt::Debug for ListTagsForResourceInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTagsForResourceInput");
formatter.field("resource_arn", &self.resource_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListSpeakersInput {
pub domain_id: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListSpeakersInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_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()
}
}
impl std::fmt::Debug for ListSpeakersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSpeakersInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListSpeakerEnrollmentJobsInput {
pub domain_id: std::option::Option<std::string::String>,
pub job_status: std::option::Option<crate::model::SpeakerEnrollmentJobStatus>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListSpeakerEnrollmentJobsInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn job_status(&self) -> std::option::Option<&crate::model::SpeakerEnrollmentJobStatus> {
self.job_status.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListSpeakerEnrollmentJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSpeakerEnrollmentJobsInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("job_status", &self.job_status);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListFraudsterRegistrationJobsInput {
pub domain_id: std::option::Option<std::string::String>,
pub job_status: std::option::Option<crate::model::FraudsterRegistrationJobStatus>,
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListFraudsterRegistrationJobsInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn job_status(&self) -> std::option::Option<&crate::model::FraudsterRegistrationJobStatus> {
self.job_status.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListFraudsterRegistrationJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListFraudsterRegistrationJobsInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("job_status", &self.job_status);
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDomainsInput {
pub max_results: std::option::Option<i32>,
pub next_token: std::option::Option<std::string::String>,
}
impl ListDomainsInput {
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for ListDomainsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDomainsInput");
formatter.field("max_results", &self.max_results);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EvaluateSessionInput {
pub domain_id: std::option::Option<std::string::String>,
pub session_name_or_id: std::option::Option<std::string::String>,
}
impl EvaluateSessionInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn session_name_or_id(&self) -> std::option::Option<&str> {
self.session_name_or_id.as_deref()
}
}
impl std::fmt::Debug for EvaluateSessionInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("EvaluateSessionInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("session_name_or_id", &self.session_name_or_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSpeakerEnrollmentJobInput {
pub domain_id: std::option::Option<std::string::String>,
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeSpeakerEnrollmentJobInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeSpeakerEnrollmentJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSpeakerEnrollmentJobInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSpeakerInput {
pub domain_id: std::option::Option<std::string::String>,
pub speaker_id: std::option::Option<std::string::String>,
}
impl DescribeSpeakerInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn speaker_id(&self) -> std::option::Option<&str> {
self.speaker_id.as_deref()
}
}
impl std::fmt::Debug for DescribeSpeakerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSpeakerInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("speaker_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeFraudsterRegistrationJobInput {
pub domain_id: std::option::Option<std::string::String>,
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeFraudsterRegistrationJobInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeFraudsterRegistrationJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeFraudsterRegistrationJobInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeFraudsterInput {
pub domain_id: std::option::Option<std::string::String>,
pub fraudster_id: std::option::Option<std::string::String>,
}
impl DescribeFraudsterInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn fraudster_id(&self) -> std::option::Option<&str> {
self.fraudster_id.as_deref()
}
}
impl std::fmt::Debug for DescribeFraudsterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeFraudsterInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("fraudster_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDomainInput {
pub domain_id: std::option::Option<std::string::String>,
}
impl DescribeDomainInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
}
impl std::fmt::Debug for DescribeDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDomainInput");
formatter.field("domain_id", &self.domain_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteSpeakerInput {
pub domain_id: std::option::Option<std::string::String>,
pub speaker_id: std::option::Option<std::string::String>,
}
impl DeleteSpeakerInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn speaker_id(&self) -> std::option::Option<&str> {
self.speaker_id.as_deref()
}
}
impl std::fmt::Debug for DeleteSpeakerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteSpeakerInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("speaker_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteFraudsterInput {
pub domain_id: std::option::Option<std::string::String>,
pub fraudster_id: std::option::Option<std::string::String>,
}
impl DeleteFraudsterInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn fraudster_id(&self) -> std::option::Option<&str> {
self.fraudster_id.as_deref()
}
}
impl std::fmt::Debug for DeleteFraudsterInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteFraudsterInput");
formatter.field("domain_id", &self.domain_id);
formatter.field("fraudster_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDomainInput {
pub domain_id: std::option::Option<std::string::String>,
}
impl DeleteDomainInput {
pub fn domain_id(&self) -> std::option::Option<&str> {
self.domain_id.as_deref()
}
}
impl std::fmt::Debug for DeleteDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDomainInput");
formatter.field("domain_id", &self.domain_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDomainInput {
pub name: std::option::Option<std::string::String>,
pub description: std::option::Option<std::string::String>,
pub server_side_encryption_configuration:
std::option::Option<crate::model::ServerSideEncryptionConfiguration>,
pub client_token: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateDomainInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn server_side_encryption_configuration(
&self,
) -> std::option::Option<&crate::model::ServerSideEncryptionConfiguration> {
self.server_side_encryption_configuration.as_ref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateDomainInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDomainInput");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field(
"server_side_encryption_configuration",
&self.server_side_encryption_configuration,
);
formatter.field("client_token", &self.client_token);
formatter.field("tags", &self.tags);
formatter.finish()
}
}