use std::fmt::Write;
pub mod batch_detect_dominant_language_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn text_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.text_list.unwrap_or_default();
v.push(input.into());
self.text_list = Some(v);
self
}
pub fn set_text_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.text_list = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDetectDominantLanguageInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDetectDominantLanguageInput {
text_list: self.text_list,
})
}
}
}
#[doc(hidden)]
pub type BatchDetectDominantLanguageInputOperationOutputAlias =
crate::operation::BatchDetectDominantLanguage;
#[doc(hidden)]
pub type BatchDetectDominantLanguageInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchDetectDominantLanguageInput {
#[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::BatchDetectDominantLanguage,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchDetectDominantLanguageInput,
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::BatchDetectDominantLanguageInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchDetectDominantLanguageInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.BatchDetectDominantLanguage",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_detect_dominant_language(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDetectDominantLanguage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDetectDominantLanguage",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_detect_dominant_language_input::Builder {
crate::input::batch_detect_dominant_language_input::Builder::default()
}
}
pub mod batch_detect_entities_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.text_list.unwrap_or_default();
v.push(input.into());
self.text_list = Some(v);
self
}
pub fn set_text_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.text_list = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDetectEntitiesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDetectEntitiesInput {
text_list: self.text_list,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type BatchDetectEntitiesInputOperationOutputAlias = crate::operation::BatchDetectEntities;
#[doc(hidden)]
pub type BatchDetectEntitiesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchDetectEntitiesInput {
#[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::BatchDetectEntities,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchDetectEntitiesInput,
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::BatchDetectEntitiesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchDetectEntitiesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.BatchDetectEntities",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_detect_entities(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDetectEntities::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDetectEntities",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_detect_entities_input::Builder {
crate::input::batch_detect_entities_input::Builder::default()
}
}
pub mod batch_detect_key_phrases_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.text_list.unwrap_or_default();
v.push(input.into());
self.text_list = Some(v);
self
}
pub fn set_text_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.text_list = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDetectKeyPhrasesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDetectKeyPhrasesInput {
text_list: self.text_list,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type BatchDetectKeyPhrasesInputOperationOutputAlias = crate::operation::BatchDetectKeyPhrases;
#[doc(hidden)]
pub type BatchDetectKeyPhrasesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchDetectKeyPhrasesInput {
#[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::BatchDetectKeyPhrases,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchDetectKeyPhrasesInput,
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::BatchDetectKeyPhrasesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchDetectKeyPhrasesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.BatchDetectKeyPhrases",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_detect_key_phrases(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDetectKeyPhrases::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDetectKeyPhrases",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_detect_key_phrases_input::Builder {
crate::input::batch_detect_key_phrases_input::Builder::default()
}
}
pub mod batch_detect_sentiment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.text_list.unwrap_or_default();
v.push(input.into());
self.text_list = Some(v);
self
}
pub fn set_text_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.text_list = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDetectSentimentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDetectSentimentInput {
text_list: self.text_list,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type BatchDetectSentimentInputOperationOutputAlias = crate::operation::BatchDetectSentiment;
#[doc(hidden)]
pub type BatchDetectSentimentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchDetectSentimentInput {
#[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::BatchDetectSentiment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchDetectSentimentInput,
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::BatchDetectSentimentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchDetectSentimentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.BatchDetectSentiment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_detect_sentiment(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDetectSentiment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDetectSentiment",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_detect_sentiment_input::Builder {
crate::input::batch_detect_sentiment_input::Builder::default()
}
}
pub mod batch_detect_syntax_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) language_code: std::option::Option<crate::model::SyntaxLanguageCode>,
}
impl Builder {
pub fn text_list(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.text_list.unwrap_or_default();
v.push(input.into());
self.text_list = Some(v);
self
}
pub fn set_text_list(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.text_list = input;
self
}
pub fn language_code(mut self, input: crate::model::SyntaxLanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::SyntaxLanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::BatchDetectSyntaxInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::BatchDetectSyntaxInput {
text_list: self.text_list,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type BatchDetectSyntaxInputOperationOutputAlias = crate::operation::BatchDetectSyntax;
#[doc(hidden)]
pub type BatchDetectSyntaxInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl BatchDetectSyntaxInput {
#[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::BatchDetectSyntax,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::BatchDetectSyntaxInput,
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::BatchDetectSyntaxInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::BatchDetectSyntaxInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.BatchDetectSyntax",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_batch_detect_syntax(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::BatchDetectSyntax::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchDetectSyntax",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::batch_detect_syntax_input::Builder {
crate::input::batch_detect_syntax_input::Builder::default()
}
}
pub mod classify_document_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ClassifyDocumentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ClassifyDocumentInput {
text: self.text,
endpoint_arn: self.endpoint_arn,
})
}
}
}
#[doc(hidden)]
pub type ClassifyDocumentInputOperationOutputAlias = crate::operation::ClassifyDocument;
#[doc(hidden)]
pub type ClassifyDocumentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ClassifyDocumentInput {
#[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::ClassifyDocument,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ClassifyDocumentInput,
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::ClassifyDocumentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ClassifyDocumentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ClassifyDocument",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_classify_document(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ClassifyDocument::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ClassifyDocument",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::classify_document_input::Builder {
crate::input::classify_document_input::Builder::default()
}
}
pub mod contains_pii_entities_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ContainsPiiEntitiesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ContainsPiiEntitiesInput {
text: self.text,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type ContainsPiiEntitiesInputOperationOutputAlias = crate::operation::ContainsPiiEntities;
#[doc(hidden)]
pub type ContainsPiiEntitiesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ContainsPiiEntitiesInput {
#[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::ContainsPiiEntities,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ContainsPiiEntitiesInput,
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::ContainsPiiEntitiesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ContainsPiiEntitiesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ContainsPiiEntities",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_contains_pii_entities(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ContainsPiiEntities::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ContainsPiiEntities",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::contains_pii_entities_input::Builder {
crate::input::contains_pii_entities_input::Builder::default()
}
}
pub mod create_document_classifier_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) document_classifier_name: std::option::Option<std::string::String>,
pub(crate) version_name: std::option::Option<std::string::String>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) input_data_config:
std::option::Option<crate::model::DocumentClassifierInputDataConfig>,
pub(crate) output_data_config:
std::option::Option<crate::model::DocumentClassifierOutputDataConfig>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) mode: std::option::Option<crate::model::DocumentClassifierMode>,
pub(crate) model_kms_key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn document_classifier_name(mut self, input: impl Into<std::string::String>) -> Self {
self.document_classifier_name = Some(input.into());
self
}
pub fn set_document_classifier_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_classifier_name = input;
self
}
pub fn version_name(mut self, input: impl Into<std::string::String>) -> Self {
self.version_name = Some(input.into());
self
}
pub fn set_version_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_name = 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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn input_data_config(
mut self,
input: crate::model::DocumentClassifierInputDataConfig,
) -> Self {
self.input_data_config = Some(input);
self
}
pub fn set_input_data_config(
mut self,
input: std::option::Option<crate::model::DocumentClassifierInputDataConfig>,
) -> Self {
self.input_data_config = input;
self
}
pub fn output_data_config(
mut self,
input: crate::model::DocumentClassifierOutputDataConfig,
) -> Self {
self.output_data_config = Some(input);
self
}
pub fn set_output_data_config(
mut self,
input: std::option::Option<crate::model::DocumentClassifierOutputDataConfig>,
) -> Self {
self.output_data_config = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn mode(mut self, input: crate::model::DocumentClassifierMode) -> Self {
self.mode = Some(input);
self
}
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::DocumentClassifierMode>,
) -> Self {
self.mode = input;
self
}
pub fn model_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.model_kms_key_id = Some(input.into());
self
}
pub fn set_model_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.model_kms_key_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateDocumentClassifierInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateDocumentClassifierInput {
document_classifier_name: self.document_classifier_name,
version_name: self.version_name,
data_access_role_arn: self.data_access_role_arn,
tags: self.tags,
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
client_request_token: self.client_request_token,
language_code: self.language_code,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
mode: self.mode,
model_kms_key_id: self.model_kms_key_id,
})
}
}
}
#[doc(hidden)]
pub type CreateDocumentClassifierInputOperationOutputAlias =
crate::operation::CreateDocumentClassifier;
#[doc(hidden)]
pub type CreateDocumentClassifierInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateDocumentClassifierInput {
#[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::CreateDocumentClassifier,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateDocumentClassifierInput,
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::CreateDocumentClassifierInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateDocumentClassifierInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.CreateDocumentClassifier",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_document_classifier(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateDocumentClassifier::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateDocumentClassifier",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_document_classifier_input::Builder {
crate::input::create_document_classifier_input::Builder::default()
}
}
pub mod create_endpoint_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_name: std::option::Option<std::string::String>,
pub(crate) model_arn: std::option::Option<std::string::String>,
pub(crate) desired_inference_units: std::option::Option<i32>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_name(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_name = Some(input.into());
self
}
pub fn set_endpoint_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_name = input;
self
}
pub fn model_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.model_arn = Some(input.into());
self
}
pub fn set_model_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.model_arn = input;
self
}
pub fn desired_inference_units(mut self, input: i32) -> Self {
self.desired_inference_units = Some(input);
self
}
pub fn set_desired_inference_units(mut self, input: std::option::Option<i32>) -> Self {
self.desired_inference_units = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn 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 build(
self,
) -> std::result::Result<
crate::input::CreateEndpointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateEndpointInput {
endpoint_name: self.endpoint_name,
model_arn: self.model_arn,
desired_inference_units: self.desired_inference_units,
client_request_token: self.client_request_token,
tags: self.tags,
data_access_role_arn: self.data_access_role_arn,
})
}
}
}
#[doc(hidden)]
pub type CreateEndpointInputOperationOutputAlias = crate::operation::CreateEndpoint;
#[doc(hidden)]
pub type CreateEndpointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateEndpointInput {
#[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::CreateEndpoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateEndpointInput,
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::CreateEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateEndpointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.CreateEndpoint",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_endpoint(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEndpoint",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_endpoint_input::Builder {
crate::input::create_endpoint_input::Builder::default()
}
}
pub mod create_entity_recognizer_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) recognizer_name: std::option::Option<std::string::String>,
pub(crate) version_name: std::option::Option<std::string::String>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub(crate) input_data_config:
std::option::Option<crate::model::EntityRecognizerInputDataConfig>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) model_kms_key_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn recognizer_name(mut self, input: impl Into<std::string::String>) -> Self {
self.recognizer_name = Some(input.into());
self
}
pub fn set_recognizer_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recognizer_name = input;
self
}
pub fn version_name(mut self, input: impl Into<std::string::String>) -> Self {
self.version_name = Some(input.into());
self
}
pub fn set_version_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_name = 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 tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn input_data_config(
mut self,
input: crate::model::EntityRecognizerInputDataConfig,
) -> Self {
self.input_data_config = Some(input);
self
}
pub fn set_input_data_config(
mut self,
input: std::option::Option<crate::model::EntityRecognizerInputDataConfig>,
) -> Self {
self.input_data_config = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn model_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.model_kms_key_id = Some(input.into());
self
}
pub fn set_model_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.model_kms_key_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::CreateEntityRecognizerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::CreateEntityRecognizerInput {
recognizer_name: self.recognizer_name,
version_name: self.version_name,
data_access_role_arn: self.data_access_role_arn,
tags: self.tags,
input_data_config: self.input_data_config,
client_request_token: self.client_request_token,
language_code: self.language_code,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
model_kms_key_id: self.model_kms_key_id,
})
}
}
}
#[doc(hidden)]
pub type CreateEntityRecognizerInputOperationOutputAlias = crate::operation::CreateEntityRecognizer;
#[doc(hidden)]
pub type CreateEntityRecognizerInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl CreateEntityRecognizerInput {
#[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::CreateEntityRecognizer,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::CreateEntityRecognizerInput,
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::CreateEntityRecognizerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::CreateEntityRecognizerInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.CreateEntityRecognizer",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_create_entity_recognizer(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateEntityRecognizer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateEntityRecognizer",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::create_entity_recognizer_input::Builder {
crate::input::create_entity_recognizer_input::Builder::default()
}
}
pub mod delete_document_classifier_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) document_classifier_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn document_classifier_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.document_classifier_arn = Some(input.into());
self
}
pub fn set_document_classifier_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_classifier_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteDocumentClassifierInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteDocumentClassifierInput {
document_classifier_arn: self.document_classifier_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteDocumentClassifierInputOperationOutputAlias =
crate::operation::DeleteDocumentClassifier;
#[doc(hidden)]
pub type DeleteDocumentClassifierInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteDocumentClassifierInput {
#[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::DeleteDocumentClassifier,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteDocumentClassifierInput,
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::DeleteDocumentClassifierInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteDocumentClassifierInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DeleteDocumentClassifier",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_document_classifier(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteDocumentClassifier::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteDocumentClassifier",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_document_classifier_input::Builder {
crate::input::delete_document_classifier_input::Builder::default()
}
}
pub mod delete_endpoint_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteEndpointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteEndpointInput {
endpoint_arn: self.endpoint_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteEndpointInputOperationOutputAlias = crate::operation::DeleteEndpoint;
#[doc(hidden)]
pub type DeleteEndpointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteEndpointInput {
#[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::DeleteEndpoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteEndpointInput,
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::DeleteEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteEndpointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DeleteEndpoint",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_endpoint(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEndpoint",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_endpoint_input::Builder {
crate::input::delete_endpoint_input::Builder::default()
}
}
pub mod delete_entity_recognizer_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn entity_recognizer_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.entity_recognizer_arn = Some(input.into());
self
}
pub fn set_entity_recognizer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.entity_recognizer_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteEntityRecognizerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteEntityRecognizerInput {
entity_recognizer_arn: self.entity_recognizer_arn,
})
}
}
}
#[doc(hidden)]
pub type DeleteEntityRecognizerInputOperationOutputAlias = crate::operation::DeleteEntityRecognizer;
#[doc(hidden)]
pub type DeleteEntityRecognizerInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DeleteEntityRecognizerInput {
#[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::DeleteEntityRecognizer,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DeleteEntityRecognizerInput,
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::DeleteEntityRecognizerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DeleteEntityRecognizerInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DeleteEntityRecognizer",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_delete_entity_recognizer(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteEntityRecognizer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteEntityRecognizer",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::delete_entity_recognizer_input::Builder {
crate::input::delete_entity_recognizer_input::Builder::default()
}
}
pub mod describe_document_classification_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeDocumentClassificationJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeDocumentClassificationJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeDocumentClassificationJobInputOperationOutputAlias =
crate::operation::DescribeDocumentClassificationJob;
#[doc(hidden)]
pub type DescribeDocumentClassificationJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeDocumentClassificationJobInput {
#[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::DescribeDocumentClassificationJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeDocumentClassificationJobInput,
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::DescribeDocumentClassificationJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeDocumentClassificationJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeDocumentClassificationJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_document_classification_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDocumentClassificationJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDocumentClassificationJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_document_classification_job_input::Builder {
crate::input::describe_document_classification_job_input::Builder::default()
}
}
pub mod describe_document_classifier_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) document_classifier_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn document_classifier_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.document_classifier_arn = Some(input.into());
self
}
pub fn set_document_classifier_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_classifier_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeDocumentClassifierInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeDocumentClassifierInput {
document_classifier_arn: self.document_classifier_arn,
})
}
}
}
#[doc(hidden)]
pub type DescribeDocumentClassifierInputOperationOutputAlias =
crate::operation::DescribeDocumentClassifier;
#[doc(hidden)]
pub type DescribeDocumentClassifierInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeDocumentClassifierInput {
#[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::DescribeDocumentClassifier,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeDocumentClassifierInput,
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::DescribeDocumentClassifierInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeDocumentClassifierInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeDocumentClassifier",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_document_classifier(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDocumentClassifier::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDocumentClassifier",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_document_classifier_input::Builder {
crate::input::describe_document_classifier_input::Builder::default()
}
}
pub mod describe_dominant_language_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeDominantLanguageDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeDominantLanguageDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeDominantLanguageDetectionJobInputOperationOutputAlias =
crate::operation::DescribeDominantLanguageDetectionJob;
#[doc(hidden)]
pub type DescribeDominantLanguageDetectionJobInputOperationRetryAlias =
aws_http::AwsErrorRetryPolicy;
impl DescribeDominantLanguageDetectionJobInput {
#[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::DescribeDominantLanguageDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeDominantLanguageDetectionJobInput,
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::DescribeDominantLanguageDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeDominantLanguageDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeDominantLanguageDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_dominant_language_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeDominantLanguageDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeDominantLanguageDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_dominant_language_detection_job_input::Builder {
crate::input::describe_dominant_language_detection_job_input::Builder::default()
}
}
pub mod describe_endpoint_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeEndpointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeEndpointInput {
endpoint_arn: self.endpoint_arn,
})
}
}
}
#[doc(hidden)]
pub type DescribeEndpointInputOperationOutputAlias = crate::operation::DescribeEndpoint;
#[doc(hidden)]
pub type DescribeEndpointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeEndpointInput {
#[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::DescribeEndpoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeEndpointInput,
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::DescribeEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeEndpointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeEndpoint",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_endpoint(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeEndpoint",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_endpoint_input::Builder {
crate::input::describe_endpoint_input::Builder::default()
}
}
pub mod describe_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeEntitiesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::DescribeEntitiesDetectionJob;
#[doc(hidden)]
pub type DescribeEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeEntitiesDetectionJobInput {
#[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::DescribeEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeEntitiesDetectionJobInput,
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::DescribeEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeEntitiesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_entities_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_entities_detection_job_input::Builder {
crate::input::describe_entities_detection_job_input::Builder::default()
}
}
pub mod describe_entity_recognizer_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn entity_recognizer_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.entity_recognizer_arn = Some(input.into());
self
}
pub fn set_entity_recognizer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.entity_recognizer_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DescribeEntityRecognizerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeEntityRecognizerInput {
entity_recognizer_arn: self.entity_recognizer_arn,
})
}
}
}
#[doc(hidden)]
pub type DescribeEntityRecognizerInputOperationOutputAlias =
crate::operation::DescribeEntityRecognizer;
#[doc(hidden)]
pub type DescribeEntityRecognizerInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeEntityRecognizerInput {
#[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::DescribeEntityRecognizer,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeEntityRecognizerInput,
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::DescribeEntityRecognizerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeEntityRecognizerInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeEntityRecognizer",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_entity_recognizer(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeEntityRecognizer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeEntityRecognizer",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_entity_recognizer_input::Builder {
crate::input::describe_entity_recognizer_input::Builder::default()
}
}
pub mod describe_events_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeEventsDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeEventsDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeEventsDetectionJobInputOperationOutputAlias =
crate::operation::DescribeEventsDetectionJob;
#[doc(hidden)]
pub type DescribeEventsDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeEventsDetectionJobInput {
#[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::DescribeEventsDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeEventsDetectionJobInput,
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::DescribeEventsDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeEventsDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeEventsDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_events_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeEventsDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeEventsDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_events_detection_job_input::Builder {
crate::input::describe_events_detection_job_input::Builder::default()
}
}
pub mod describe_key_phrases_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeKeyPhrasesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeKeyPhrasesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeKeyPhrasesDetectionJobInputOperationOutputAlias =
crate::operation::DescribeKeyPhrasesDetectionJob;
#[doc(hidden)]
pub type DescribeKeyPhrasesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeKeyPhrasesDetectionJobInput {
#[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::DescribeKeyPhrasesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeKeyPhrasesDetectionJobInput,
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::DescribeKeyPhrasesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeKeyPhrasesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeKeyPhrasesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_key_phrases_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeKeyPhrasesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeKeyPhrasesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_key_phrases_detection_job_input::Builder {
crate::input::describe_key_phrases_detection_job_input::Builder::default()
}
}
pub mod describe_pii_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribePiiEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribePiiEntitiesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribePiiEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::DescribePiiEntitiesDetectionJob;
#[doc(hidden)]
pub type DescribePiiEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribePiiEntitiesDetectionJobInput {
#[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::DescribePiiEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribePiiEntitiesDetectionJobInput,
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::DescribePiiEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribePiiEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribePiiEntitiesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_pii_entities_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribePiiEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribePiiEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_pii_entities_detection_job_input::Builder {
crate::input::describe_pii_entities_detection_job_input::Builder::default()
}
}
pub mod describe_sentiment_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeSentimentDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeSentimentDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeSentimentDetectionJobInputOperationOutputAlias =
crate::operation::DescribeSentimentDetectionJob;
#[doc(hidden)]
pub type DescribeSentimentDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeSentimentDetectionJobInput {
#[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::DescribeSentimentDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeSentimentDetectionJobInput,
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::DescribeSentimentDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeSentimentDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeSentimentDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_sentiment_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeSentimentDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeSentimentDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_sentiment_detection_job_input::Builder {
crate::input::describe_sentiment_detection_job_input::Builder::default()
}
}
pub mod describe_topics_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::DescribeTopicsDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DescribeTopicsDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type DescribeTopicsDetectionJobInputOperationOutputAlias =
crate::operation::DescribeTopicsDetectionJob;
#[doc(hidden)]
pub type DescribeTopicsDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DescribeTopicsDetectionJobInput {
#[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::DescribeTopicsDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DescribeTopicsDetectionJobInput,
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::DescribeTopicsDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DescribeTopicsDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DescribeTopicsDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_describe_topics_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeTopicsDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeTopicsDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::describe_topics_detection_job_input::Builder {
crate::input::describe_topics_detection_job_input::Builder::default()
}
}
pub mod detect_dominant_language_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectDominantLanguageInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectDominantLanguageInput { text: self.text })
}
}
}
#[doc(hidden)]
pub type DetectDominantLanguageInputOperationOutputAlias = crate::operation::DetectDominantLanguage;
#[doc(hidden)]
pub type DetectDominantLanguageInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectDominantLanguageInput {
#[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::DetectDominantLanguage,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectDominantLanguageInput,
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::DetectDominantLanguageInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectDominantLanguageInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectDominantLanguage",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_detect_dominant_language(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectDominantLanguage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectDominantLanguage",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_dominant_language_input::Builder {
crate::input::detect_dominant_language_input::Builder::default()
}
}
pub mod detect_entities_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectEntitiesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectEntitiesInput {
text: self.text,
language_code: self.language_code,
endpoint_arn: self.endpoint_arn,
})
}
}
}
#[doc(hidden)]
pub type DetectEntitiesInputOperationOutputAlias = crate::operation::DetectEntities;
#[doc(hidden)]
pub type DetectEntitiesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectEntitiesInput {
#[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::DetectEntities,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectEntitiesInput,
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::DetectEntitiesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectEntitiesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectEntities",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_detect_entities(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectEntities::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectEntities",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_entities_input::Builder {
crate::input::detect_entities_input::Builder::default()
}
}
pub mod detect_key_phrases_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectKeyPhrasesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectKeyPhrasesInput {
text: self.text,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type DetectKeyPhrasesInputOperationOutputAlias = crate::operation::DetectKeyPhrases;
#[doc(hidden)]
pub type DetectKeyPhrasesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectKeyPhrasesInput {
#[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::DetectKeyPhrases,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectKeyPhrasesInput,
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::DetectKeyPhrasesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectKeyPhrasesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectKeyPhrases",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_detect_key_phrases(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectKeyPhrases::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectKeyPhrases",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_key_phrases_input::Builder {
crate::input::detect_key_phrases_input::Builder::default()
}
}
pub mod detect_pii_entities_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectPiiEntitiesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectPiiEntitiesInput {
text: self.text,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type DetectPiiEntitiesInputOperationOutputAlias = crate::operation::DetectPiiEntities;
#[doc(hidden)]
pub type DetectPiiEntitiesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectPiiEntitiesInput {
#[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::DetectPiiEntities,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectPiiEntitiesInput,
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::DetectPiiEntitiesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectPiiEntitiesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectPiiEntities",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_detect_pii_entities(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectPiiEntities::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectPiiEntities",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_pii_entities_input::Builder {
crate::input::detect_pii_entities_input::Builder::default()
}
}
pub mod detect_sentiment_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectSentimentInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectSentimentInput {
text: self.text,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type DetectSentimentInputOperationOutputAlias = crate::operation::DetectSentiment;
#[doc(hidden)]
pub type DetectSentimentInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectSentimentInput {
#[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::DetectSentiment,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectSentimentInput,
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::DetectSentimentInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectSentimentInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectSentiment",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_detect_sentiment(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectSentiment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectSentiment",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_sentiment_input::Builder {
crate::input::detect_sentiment_input::Builder::default()
}
}
pub mod detect_syntax_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::SyntaxLanguageCode>,
}
impl Builder {
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn language_code(mut self, input: crate::model::SyntaxLanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::SyntaxLanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DetectSyntaxInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DetectSyntaxInput {
text: self.text,
language_code: self.language_code,
})
}
}
}
#[doc(hidden)]
pub type DetectSyntaxInputOperationOutputAlias = crate::operation::DetectSyntax;
#[doc(hidden)]
pub type DetectSyntaxInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl DetectSyntaxInput {
#[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::DetectSyntax,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::DetectSyntaxInput,
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::DetectSyntaxInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::DetectSyntaxInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.DetectSyntax",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_detect_syntax(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DetectSyntax::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DetectSyntax",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::detect_syntax_input::Builder {
crate::input::detect_syntax_input::Builder::default()
}
}
pub mod list_document_classification_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::DocumentClassificationJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::DocumentClassificationJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::DocumentClassificationJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListDocumentClassificationJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDocumentClassificationJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListDocumentClassificationJobsInputOperationOutputAlias =
crate::operation::ListDocumentClassificationJobs;
#[doc(hidden)]
pub type ListDocumentClassificationJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDocumentClassificationJobsInput {
#[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::ListDocumentClassificationJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDocumentClassificationJobsInput,
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::ListDocumentClassificationJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDocumentClassificationJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListDocumentClassificationJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_document_classification_jobs(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDocumentClassificationJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDocumentClassificationJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_document_classification_jobs_input::Builder {
crate::input::list_document_classification_jobs_input::Builder::default()
}
}
pub mod list_document_classifiers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::DocumentClassifierFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::DocumentClassifierFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::DocumentClassifierFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListDocumentClassifiersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDocumentClassifiersInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListDocumentClassifiersInputOperationOutputAlias =
crate::operation::ListDocumentClassifiers;
#[doc(hidden)]
pub type ListDocumentClassifiersInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDocumentClassifiersInput {
#[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::ListDocumentClassifiers,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDocumentClassifiersInput,
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::ListDocumentClassifiersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDocumentClassifiersInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListDocumentClassifiers",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_document_classifiers(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDocumentClassifiers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDocumentClassifiers",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_document_classifiers_input::Builder {
crate::input::list_document_classifiers_input::Builder::default()
}
}
pub mod list_document_classifier_summaries_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn 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 build(
self,
) -> std::result::Result<
crate::input::ListDocumentClassifierSummariesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDocumentClassifierSummariesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListDocumentClassifierSummariesInputOperationOutputAlias =
crate::operation::ListDocumentClassifierSummaries;
#[doc(hidden)]
pub type ListDocumentClassifierSummariesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDocumentClassifierSummariesInput {
#[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::ListDocumentClassifierSummaries,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDocumentClassifierSummariesInput,
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::ListDocumentClassifierSummariesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDocumentClassifierSummariesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListDocumentClassifierSummaries",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_document_classifier_summaries(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDocumentClassifierSummaries::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDocumentClassifierSummaries",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_document_classifier_summaries_input::Builder {
crate::input::list_document_classifier_summaries_input::Builder::default()
}
}
pub mod list_dominant_language_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::DominantLanguageDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::DominantLanguageDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::DominantLanguageDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListDominantLanguageDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListDominantLanguageDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListDominantLanguageDetectionJobsInputOperationOutputAlias =
crate::operation::ListDominantLanguageDetectionJobs;
#[doc(hidden)]
pub type ListDominantLanguageDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListDominantLanguageDetectionJobsInput {
#[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::ListDominantLanguageDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListDominantLanguageDetectionJobsInput,
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::ListDominantLanguageDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListDominantLanguageDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListDominantLanguageDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_dominant_language_detection_jobs(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListDominantLanguageDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListDominantLanguageDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_dominant_language_detection_jobs_input::Builder {
crate::input::list_dominant_language_detection_jobs_input::Builder::default()
}
}
pub mod list_endpoints_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::EndpointFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::EndpointFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::EndpointFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListEndpointsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListEndpointsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListEndpointsInputOperationOutputAlias = crate::operation::ListEndpoints;
#[doc(hidden)]
pub type ListEndpointsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListEndpointsInput {
#[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::ListEndpoints,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListEndpointsInput,
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::ListEndpointsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListEndpointsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListEndpoints",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_list_endpoints(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEndpoints::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEndpoints",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_endpoints_input::Builder {
crate::input::list_endpoints_input::Builder::default()
}
}
pub mod list_entities_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::EntitiesDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::EntitiesDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::EntitiesDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListEntitiesDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListEntitiesDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListEntitiesDetectionJobsInputOperationOutputAlias =
crate::operation::ListEntitiesDetectionJobs;
#[doc(hidden)]
pub type ListEntitiesDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListEntitiesDetectionJobsInput {
#[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::ListEntitiesDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListEntitiesDetectionJobsInput,
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::ListEntitiesDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListEntitiesDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListEntitiesDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_entities_detection_jobs(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEntitiesDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEntitiesDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_entities_detection_jobs_input::Builder {
crate::input::list_entities_detection_jobs_input::Builder::default()
}
}
pub mod list_entity_recognizers_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::EntityRecognizerFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::EntityRecognizerFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::EntityRecognizerFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListEntityRecognizersInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListEntityRecognizersInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListEntityRecognizersInputOperationOutputAlias = crate::operation::ListEntityRecognizers;
#[doc(hidden)]
pub type ListEntityRecognizersInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListEntityRecognizersInput {
#[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::ListEntityRecognizers,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListEntityRecognizersInput,
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::ListEntityRecognizersInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListEntityRecognizersInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListEntityRecognizers",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_entity_recognizers(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEntityRecognizers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEntityRecognizers",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_entity_recognizers_input::Builder {
crate::input::list_entity_recognizers_input::Builder::default()
}
}
pub mod list_entity_recognizer_summaries_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn 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 build(
self,
) -> std::result::Result<
crate::input::ListEntityRecognizerSummariesInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListEntityRecognizerSummariesInput {
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListEntityRecognizerSummariesInputOperationOutputAlias =
crate::operation::ListEntityRecognizerSummaries;
#[doc(hidden)]
pub type ListEntityRecognizerSummariesInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListEntityRecognizerSummariesInput {
#[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::ListEntityRecognizerSummaries,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListEntityRecognizerSummariesInput,
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::ListEntityRecognizerSummariesInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListEntityRecognizerSummariesInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListEntityRecognizerSummaries",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_entity_recognizer_summaries(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEntityRecognizerSummaries::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEntityRecognizerSummaries",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_entity_recognizer_summaries_input::Builder {
crate::input::list_entity_recognizer_summaries_input::Builder::default()
}
}
pub mod list_events_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::EventsDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::EventsDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::EventsDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListEventsDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListEventsDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListEventsDetectionJobsInputOperationOutputAlias =
crate::operation::ListEventsDetectionJobs;
#[doc(hidden)]
pub type ListEventsDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListEventsDetectionJobsInput {
#[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::ListEventsDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListEventsDetectionJobsInput,
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::ListEventsDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListEventsDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListEventsDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_events_detection_jobs(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEventsDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEventsDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_events_detection_jobs_input::Builder {
crate::input::list_events_detection_jobs_input::Builder::default()
}
}
pub mod list_key_phrases_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::KeyPhrasesDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::KeyPhrasesDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::KeyPhrasesDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListKeyPhrasesDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListKeyPhrasesDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListKeyPhrasesDetectionJobsInputOperationOutputAlias =
crate::operation::ListKeyPhrasesDetectionJobs;
#[doc(hidden)]
pub type ListKeyPhrasesDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListKeyPhrasesDetectionJobsInput {
#[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::ListKeyPhrasesDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListKeyPhrasesDetectionJobsInput,
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::ListKeyPhrasesDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListKeyPhrasesDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListKeyPhrasesDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_key_phrases_detection_jobs(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListKeyPhrasesDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListKeyPhrasesDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_key_phrases_detection_jobs_input::Builder {
crate::input::list_key_phrases_detection_jobs_input::Builder::default()
}
}
pub mod list_pii_entities_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::PiiEntitiesDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::PiiEntitiesDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::PiiEntitiesDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListPiiEntitiesDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListPiiEntitiesDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListPiiEntitiesDetectionJobsInputOperationOutputAlias =
crate::operation::ListPiiEntitiesDetectionJobs;
#[doc(hidden)]
pub type ListPiiEntitiesDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListPiiEntitiesDetectionJobsInput {
#[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::ListPiiEntitiesDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListPiiEntitiesDetectionJobsInput,
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::ListPiiEntitiesDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListPiiEntitiesDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListPiiEntitiesDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_pii_entities_detection_jobs(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListPiiEntitiesDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListPiiEntitiesDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_pii_entities_detection_jobs_input::Builder {
crate::input::list_pii_entities_detection_jobs_input::Builder::default()
}
}
pub mod list_sentiment_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::SentimentDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::SentimentDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::SentimentDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListSentimentDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListSentimentDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListSentimentDetectionJobsInputOperationOutputAlias =
crate::operation::ListSentimentDetectionJobs;
#[doc(hidden)]
pub type ListSentimentDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListSentimentDetectionJobsInput {
#[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::ListSentimentDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListSentimentDetectionJobsInput,
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::ListSentimentDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListSentimentDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListSentimentDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_sentiment_detection_jobs(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListSentimentDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListSentimentDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_sentiment_detection_jobs_input::Builder {
crate::input::list_sentiment_detection_jobs_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
#[doc(hidden)]
pub type ListTagsForResourceInputOperationOutputAlias = crate::operation::ListTagsForResource;
#[doc(hidden)]
pub type ListTagsForResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTagsForResourceInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListTagsForResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListTagsForResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_tags_for_resource(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod list_topics_detection_jobs_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) filter: std::option::Option<crate::model::TopicsDetectionJobFilter>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn filter(mut self, input: crate::model::TopicsDetectionJobFilter) -> Self {
self.filter = Some(input);
self
}
pub fn set_filter(
mut self,
input: std::option::Option<crate::model::TopicsDetectionJobFilter>,
) -> Self {
self.filter = 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 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 build(
self,
) -> std::result::Result<
crate::input::ListTopicsDetectionJobsInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::ListTopicsDetectionJobsInput {
filter: self.filter,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
#[doc(hidden)]
pub type ListTopicsDetectionJobsInputOperationOutputAlias =
crate::operation::ListTopicsDetectionJobs;
#[doc(hidden)]
pub type ListTopicsDetectionJobsInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl ListTopicsDetectionJobsInput {
#[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::ListTopicsDetectionJobs,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::ListTopicsDetectionJobsInput,
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::ListTopicsDetectionJobsInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::ListTopicsDetectionJobsInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.ListTopicsDetectionJobs",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_list_topics_detection_jobs(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTopicsDetectionJobs::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTopicsDetectionJobs",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::list_topics_detection_jobs_input::Builder {
crate::input::list_topics_detection_jobs_input::Builder::default()
}
}
pub mod start_document_classification_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) document_classifier_arn: std::option::Option<std::string::String>,
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 document_classifier_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.document_classifier_arn = Some(input.into());
self
}
pub fn set_document_classifier_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_classifier_arn = 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 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 client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartDocumentClassificationJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartDocumentClassificationJobInput {
job_name: self.job_name,
document_classifier_arn: self.document_classifier_arn,
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartDocumentClassificationJobInputOperationOutputAlias =
crate::operation::StartDocumentClassificationJob;
#[doc(hidden)]
pub type StartDocumentClassificationJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartDocumentClassificationJobInput {
#[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::StartDocumentClassificationJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartDocumentClassificationJobInput,
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::StartDocumentClassificationJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartDocumentClassificationJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartDocumentClassificationJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_document_classification_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartDocumentClassificationJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartDocumentClassificationJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_document_classification_job_input::Builder {
crate::input::start_document_classification_job_input::Builder::default()
}
}
pub mod start_dominant_language_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartDominantLanguageDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartDominantLanguageDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartDominantLanguageDetectionJobInputOperationOutputAlias =
crate::operation::StartDominantLanguageDetectionJob;
#[doc(hidden)]
pub type StartDominantLanguageDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartDominantLanguageDetectionJobInput {
#[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::StartDominantLanguageDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartDominantLanguageDetectionJobInput,
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::StartDominantLanguageDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartDominantLanguageDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartDominantLanguageDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_dominant_language_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartDominantLanguageDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartDominantLanguageDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_dominant_language_detection_job_input::Builder {
crate::input::start_dominant_language_detection_job_input::Builder::default()
}
}
pub mod start_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) entity_recognizer_arn: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 entity_recognizer_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.entity_recognizer_arn = Some(input.into());
self
}
pub fn set_entity_recognizer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.entity_recognizer_arn = input;
self
}
pub fn language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartEntitiesDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
entity_recognizer_arn: self.entity_recognizer_arn,
language_code: self.language_code,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::StartEntitiesDetectionJob;
#[doc(hidden)]
pub type StartEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartEntitiesDetectionJobInput {
#[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::StartEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartEntitiesDetectionJobInput,
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::StartEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartEntitiesDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_entities_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_entities_detection_job_input::Builder {
crate::input::start_entities_detection_job_input::Builder::default()
}
}
pub mod start_events_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) target_event_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn target_event_types(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.target_event_types.unwrap_or_default();
v.push(input.into());
self.target_event_types = Some(v);
self
}
pub fn set_target_event_types(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.target_event_types = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartEventsDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartEventsDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
language_code: self.language_code,
client_request_token: self.client_request_token,
target_event_types: self.target_event_types,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartEventsDetectionJobInputOperationOutputAlias =
crate::operation::StartEventsDetectionJob;
#[doc(hidden)]
pub type StartEventsDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartEventsDetectionJobInput {
#[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::StartEventsDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartEventsDetectionJobInput,
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::StartEventsDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartEventsDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartEventsDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_events_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartEventsDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartEventsDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_events_detection_job_input::Builder {
crate::input::start_events_detection_job_input::Builder::default()
}
}
pub mod start_key_phrases_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartKeyPhrasesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartKeyPhrasesDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
language_code: self.language_code,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartKeyPhrasesDetectionJobInputOperationOutputAlias =
crate::operation::StartKeyPhrasesDetectionJob;
#[doc(hidden)]
pub type StartKeyPhrasesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartKeyPhrasesDetectionJobInput {
#[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::StartKeyPhrasesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartKeyPhrasesDetectionJobInput,
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::StartKeyPhrasesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartKeyPhrasesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartKeyPhrasesDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_key_phrases_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartKeyPhrasesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartKeyPhrasesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_key_phrases_detection_job_input::Builder {
crate::input::start_key_phrases_detection_job_input::Builder::default()
}
}
pub mod start_pii_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) mode: std::option::Option<crate::model::PiiEntitiesDetectionMode>,
pub(crate) redaction_config: std::option::Option<crate::model::RedactionConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 mode(mut self, input: crate::model::PiiEntitiesDetectionMode) -> Self {
self.mode = Some(input);
self
}
pub fn set_mode(
mut self,
input: std::option::Option<crate::model::PiiEntitiesDetectionMode>,
) -> Self {
self.mode = input;
self
}
pub fn redaction_config(mut self, input: crate::model::RedactionConfig) -> Self {
self.redaction_config = Some(input);
self
}
pub fn set_redaction_config(
mut self,
input: std::option::Option<crate::model::RedactionConfig>,
) -> Self {
self.redaction_config = 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 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 language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartPiiEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartPiiEntitiesDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
mode: self.mode,
redaction_config: self.redaction_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
language_code: self.language_code,
client_request_token: self.client_request_token,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartPiiEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::StartPiiEntitiesDetectionJob;
#[doc(hidden)]
pub type StartPiiEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartPiiEntitiesDetectionJobInput {
#[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::StartPiiEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartPiiEntitiesDetectionJobInput,
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::StartPiiEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartPiiEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartPiiEntitiesDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_pii_entities_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartPiiEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartPiiEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_pii_entities_detection_job_input::Builder {
crate::input::start_pii_entities_detection_job_input::Builder::default()
}
}
pub mod start_sentiment_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) language_code: std::option::Option<crate::model::LanguageCode>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 language_code(mut self, input: crate::model::LanguageCode) -> Self {
self.language_code = Some(input);
self
}
pub fn set_language_code(
mut self,
input: std::option::Option<crate::model::LanguageCode>,
) -> Self {
self.language_code = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartSentimentDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartSentimentDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
language_code: self.language_code,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartSentimentDetectionJobInputOperationOutputAlias =
crate::operation::StartSentimentDetectionJob;
#[doc(hidden)]
pub type StartSentimentDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartSentimentDetectionJobInput {
#[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::StartSentimentDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartSentimentDetectionJobInput,
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::StartSentimentDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartSentimentDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartSentimentDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_sentiment_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartSentimentDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartSentimentDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_sentiment_detection_job_input::Builder {
crate::input::start_sentiment_detection_job_input::Builder::default()
}
}
pub mod start_topics_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub(crate) output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub(crate) data_access_role_arn: std::option::Option<std::string::String>,
pub(crate) job_name: std::option::Option<std::string::String>,
pub(crate) number_of_topics: std::option::Option<i32>,
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) volume_kms_key_id: std::option::Option<std::string::String>,
pub(crate) vpc_config: std::option::Option<crate::model::VpcConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
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 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 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 number_of_topics(mut self, input: i32) -> Self {
self.number_of_topics = Some(input);
self
}
pub fn set_number_of_topics(mut self, input: std::option::Option<i32>) -> Self {
self.number_of_topics = input;
self
}
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn volume_kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.volume_kms_key_id = Some(input.into());
self
}
pub fn set_volume_kms_key_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.volume_kms_key_id = input;
self
}
pub fn vpc_config(mut self, input: crate::model::VpcConfig) -> Self {
self.vpc_config = Some(input);
self
}
pub fn set_vpc_config(
mut self,
input: std::option::Option<crate::model::VpcConfig>,
) -> Self {
self.vpc_config = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StartTopicsDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StartTopicsDetectionJobInput {
input_data_config: self.input_data_config,
output_data_config: self.output_data_config,
data_access_role_arn: self.data_access_role_arn,
job_name: self.job_name,
number_of_topics: self.number_of_topics,
client_request_token: self.client_request_token,
volume_kms_key_id: self.volume_kms_key_id,
vpc_config: self.vpc_config,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type StartTopicsDetectionJobInputOperationOutputAlias =
crate::operation::StartTopicsDetectionJob;
#[doc(hidden)]
pub type StartTopicsDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StartTopicsDetectionJobInput {
#[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::StartTopicsDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StartTopicsDetectionJobInput,
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::StartTopicsDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StartTopicsDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StartTopicsDetectionJob",
);
Ok(builder)
}
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_start_topics_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartTopicsDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartTopicsDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::start_topics_detection_job_input::Builder {
crate::input::start_topics_detection_job_input::Builder::default()
}
}
pub mod stop_dominant_language_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopDominantLanguageDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopDominantLanguageDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopDominantLanguageDetectionJobInputOperationOutputAlias =
crate::operation::StopDominantLanguageDetectionJob;
#[doc(hidden)]
pub type StopDominantLanguageDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopDominantLanguageDetectionJobInput {
#[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::StopDominantLanguageDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopDominantLanguageDetectionJobInput,
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::StopDominantLanguageDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopDominantLanguageDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopDominantLanguageDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_dominant_language_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopDominantLanguageDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopDominantLanguageDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_dominant_language_detection_job_input::Builder {
crate::input::stop_dominant_language_detection_job_input::Builder::default()
}
}
pub mod stop_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopEntitiesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::StopEntitiesDetectionJob;
#[doc(hidden)]
pub type StopEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopEntitiesDetectionJobInput {
#[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::StopEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopEntitiesDetectionJobInput,
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::StopEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopEntitiesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_entities_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_entities_detection_job_input::Builder {
crate::input::stop_entities_detection_job_input::Builder::default()
}
}
pub mod stop_events_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopEventsDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopEventsDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopEventsDetectionJobInputOperationOutputAlias = crate::operation::StopEventsDetectionJob;
#[doc(hidden)]
pub type StopEventsDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopEventsDetectionJobInput {
#[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::StopEventsDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopEventsDetectionJobInput,
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::StopEventsDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopEventsDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopEventsDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_events_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopEventsDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopEventsDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_events_detection_job_input::Builder {
crate::input::stop_events_detection_job_input::Builder::default()
}
}
pub mod stop_key_phrases_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopKeyPhrasesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopKeyPhrasesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopKeyPhrasesDetectionJobInputOperationOutputAlias =
crate::operation::StopKeyPhrasesDetectionJob;
#[doc(hidden)]
pub type StopKeyPhrasesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopKeyPhrasesDetectionJobInput {
#[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::StopKeyPhrasesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopKeyPhrasesDetectionJobInput,
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::StopKeyPhrasesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopKeyPhrasesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopKeyPhrasesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_key_phrases_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopKeyPhrasesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopKeyPhrasesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_key_phrases_detection_job_input::Builder {
crate::input::stop_key_phrases_detection_job_input::Builder::default()
}
}
pub mod stop_pii_entities_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopPiiEntitiesDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopPiiEntitiesDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopPiiEntitiesDetectionJobInputOperationOutputAlias =
crate::operation::StopPiiEntitiesDetectionJob;
#[doc(hidden)]
pub type StopPiiEntitiesDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopPiiEntitiesDetectionJobInput {
#[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::StopPiiEntitiesDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopPiiEntitiesDetectionJobInput,
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::StopPiiEntitiesDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopPiiEntitiesDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopPiiEntitiesDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_pii_entities_detection_job(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopPiiEntitiesDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopPiiEntitiesDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_pii_entities_detection_job_input::Builder {
crate::input::stop_pii_entities_detection_job_input::Builder::default()
}
}
pub mod stop_sentiment_detection_job_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) job_id: std::option::Option<std::string::String>,
}
impl Builder {
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::StopSentimentDetectionJobInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopSentimentDetectionJobInput {
job_id: self.job_id,
})
}
}
}
#[doc(hidden)]
pub type StopSentimentDetectionJobInputOperationOutputAlias =
crate::operation::StopSentimentDetectionJob;
#[doc(hidden)]
pub type StopSentimentDetectionJobInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopSentimentDetectionJobInput {
#[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::StopSentimentDetectionJob,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopSentimentDetectionJobInput,
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::StopSentimentDetectionJobInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopSentimentDetectionJobInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopSentimentDetectionJob",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_sentiment_detection_job(
&self,
)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopSentimentDetectionJob::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopSentimentDetectionJob",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_sentiment_detection_job_input::Builder {
crate::input::stop_sentiment_detection_job_input::Builder::default()
}
}
pub mod stop_training_document_classifier_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) document_classifier_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn document_classifier_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.document_classifier_arn = Some(input.into());
self
}
pub fn set_document_classifier_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.document_classifier_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StopTrainingDocumentClassifierInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopTrainingDocumentClassifierInput {
document_classifier_arn: self.document_classifier_arn,
})
}
}
}
#[doc(hidden)]
pub type StopTrainingDocumentClassifierInputOperationOutputAlias =
crate::operation::StopTrainingDocumentClassifier;
#[doc(hidden)]
pub type StopTrainingDocumentClassifierInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopTrainingDocumentClassifierInput {
#[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::StopTrainingDocumentClassifier,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopTrainingDocumentClassifierInput,
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::StopTrainingDocumentClassifierInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopTrainingDocumentClassifierInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopTrainingDocumentClassifier",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_training_document_classifier(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopTrainingDocumentClassifier::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopTrainingDocumentClassifier",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_training_document_classifier_input::Builder {
crate::input::stop_training_document_classifier_input::Builder::default()
}
}
pub mod stop_training_entity_recognizer_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn entity_recognizer_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.entity_recognizer_arn = Some(input.into());
self
}
pub fn set_entity_recognizer_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.entity_recognizer_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::StopTrainingEntityRecognizerInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::StopTrainingEntityRecognizerInput {
entity_recognizer_arn: self.entity_recognizer_arn,
})
}
}
}
#[doc(hidden)]
pub type StopTrainingEntityRecognizerInputOperationOutputAlias =
crate::operation::StopTrainingEntityRecognizer;
#[doc(hidden)]
pub type StopTrainingEntityRecognizerInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl StopTrainingEntityRecognizerInput {
#[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::StopTrainingEntityRecognizer,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::StopTrainingEntityRecognizerInput,
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::StopTrainingEntityRecognizerInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::StopTrainingEntityRecognizerInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.StopTrainingEntityRecognizer",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_stop_training_entity_recognizer(&self)?
;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StopTrainingEntityRecognizer::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopTrainingEntityRecognizer",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::stop_training_entity_recognizer_input::Builder {
crate::input::stop_training_entity_recognizer_input::Builder::default()
}
}
pub mod tag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: impl Into<crate::model::Tag>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::TagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
#[doc(hidden)]
pub type TagResourceInputOperationOutputAlias = crate::operation::TagResource;
#[doc(hidden)]
pub type TagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl TagResourceInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::TagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.TagResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UntagResourceInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
#[doc(hidden)]
pub type UntagResourceInputOperationOutputAlias = crate::operation::UntagResource;
#[doc(hidden)]
pub type UntagResourceInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UntagResourceInput {
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UntagResourceInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.UntagResource",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body = crate::operation_ser::serialize_operation_crate_operation_untag_resource(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_endpoint_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) endpoint_arn: std::option::Option<std::string::String>,
pub(crate) desired_model_arn: std::option::Option<std::string::String>,
pub(crate) desired_inference_units: std::option::Option<i32>,
pub(crate) desired_data_access_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn endpoint_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_arn = Some(input.into());
self
}
pub fn set_endpoint_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_arn = input;
self
}
pub fn desired_model_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.desired_model_arn = Some(input.into());
self
}
pub fn set_desired_model_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.desired_model_arn = input;
self
}
pub fn desired_inference_units(mut self, input: i32) -> Self {
self.desired_inference_units = Some(input);
self
}
pub fn set_desired_inference_units(mut self, input: std::option::Option<i32>) -> Self {
self.desired_inference_units = input;
self
}
pub fn desired_data_access_role_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.desired_data_access_role_arn = Some(input.into());
self
}
pub fn set_desired_data_access_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.desired_data_access_role_arn = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::UpdateEndpointInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::UpdateEndpointInput {
endpoint_arn: self.endpoint_arn,
desired_model_arn: self.desired_model_arn,
desired_inference_units: self.desired_inference_units,
desired_data_access_role_arn: self.desired_data_access_role_arn,
})
}
}
}
#[doc(hidden)]
pub type UpdateEndpointInputOperationOutputAlias = crate::operation::UpdateEndpoint;
#[doc(hidden)]
pub type UpdateEndpointInputOperationRetryAlias = aws_http::AwsErrorRetryPolicy;
impl UpdateEndpointInput {
#[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::UpdateEndpoint,
aws_http::AwsErrorRetryPolicy,
>,
aws_smithy_http::operation::BuildError,
> {
fn uri_base(
_input: &crate::input::UpdateEndpointInput,
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::UpdateEndpointInput,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
#[allow(clippy::unnecessary_wraps)]
fn request_builder_base(
input: &crate::input::UpdateEndpointInput,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
#[allow(unused_mut)]
let mut builder = update_http_builder(input, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("content-type"),
"application/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"Comprehend_20171127.UpdateEndpoint",
);
Ok(builder)
}
let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
let request = request_builder_base(&self)?;
let body =
crate::operation_ser::serialize_operation_crate_operation_update_endpoint(&self)?;
let request = Self::assemble(request, body);
#[allow(unused_mut)]
let mut request = aws_smithy_http::operation::Request::from_parts(
request.map(aws_smithy_http::body::SdkBody::from),
properties,
);
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
#[allow(unused_mut)]
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
aws_endpoint::set_endpoint_resolver(
&mut request.properties_mut(),
_config.endpoint_resolver.clone(),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateEndpoint::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateEndpoint",
"comprehend",
));
let op = op.with_retry_policy(aws_http::AwsErrorRetryPolicy::new());
Ok(op)
}
fn assemble(
builder: http::request::Builder,
body: aws_smithy_http::body::SdkBody,
) -> http::request::Request<aws_smithy_http::body::SdkBody> {
let mut builder = builder;
if let Some(content_length) = body.content_length() {
builder = aws_smithy_http::header::set_header_if_absent(
builder,
http::header::CONTENT_LENGTH,
content_length,
);
}
builder.body(body).expect("should be valid request")
}
pub fn builder() -> crate::input::update_endpoint_input::Builder {
crate::input::update_endpoint_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateEndpointInput {
pub endpoint_arn: std::option::Option<std::string::String>,
pub desired_model_arn: std::option::Option<std::string::String>,
pub desired_inference_units: std::option::Option<i32>,
pub desired_data_access_role_arn: std::option::Option<std::string::String>,
}
impl UpdateEndpointInput {
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
pub fn desired_model_arn(&self) -> std::option::Option<&str> {
self.desired_model_arn.as_deref()
}
pub fn desired_inference_units(&self) -> std::option::Option<i32> {
self.desired_inference_units
}
pub fn desired_data_access_role_arn(&self) -> std::option::Option<&str> {
self.desired_data_access_role_arn.as_deref()
}
}
impl std::fmt::Debug for UpdateEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateEndpointInput");
formatter.field("endpoint_arn", &self.endpoint_arn);
formatter.field("desired_model_arn", &self.desired_model_arn);
formatter.field("desired_inference_units", &self.desired_inference_units);
formatter.field(
"desired_data_access_role_arn",
&self.desired_data_access_role_arn,
);
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 StopTrainingEntityRecognizerInput {
pub entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl StopTrainingEntityRecognizerInput {
pub fn entity_recognizer_arn(&self) -> std::option::Option<&str> {
self.entity_recognizer_arn.as_deref()
}
}
impl std::fmt::Debug for StopTrainingEntityRecognizerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopTrainingEntityRecognizerInput");
formatter.field("entity_recognizer_arn", &self.entity_recognizer_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopTrainingDocumentClassifierInput {
pub document_classifier_arn: std::option::Option<std::string::String>,
}
impl StopTrainingDocumentClassifierInput {
pub fn document_classifier_arn(&self) -> std::option::Option<&str> {
self.document_classifier_arn.as_deref()
}
}
impl std::fmt::Debug for StopTrainingDocumentClassifierInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopTrainingDocumentClassifierInput");
formatter.field("document_classifier_arn", &self.document_classifier_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopSentimentDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopSentimentDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopSentimentDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopSentimentDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopPiiEntitiesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopPiiEntitiesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopPiiEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopPiiEntitiesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopKeyPhrasesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopKeyPhrasesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopKeyPhrasesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopKeyPhrasesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopEventsDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopEventsDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopEventsDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopEventsDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopEntitiesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopEntitiesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopEntitiesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StopDominantLanguageDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl StopDominantLanguageDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for StopDominantLanguageDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StopDominantLanguageDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartTopicsDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub number_of_topics: std::option::Option<i32>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartTopicsDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn number_of_topics(&self) -> std::option::Option<i32> {
self.number_of_topics
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartTopicsDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartTopicsDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("number_of_topics", &self.number_of_topics);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartSentimentDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartSentimentDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartSentimentDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartSentimentDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("language_code", &self.language_code);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartPiiEntitiesDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub mode: std::option::Option<crate::model::PiiEntitiesDetectionMode>,
pub redaction_config: std::option::Option<crate::model::RedactionConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub client_request_token: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartPiiEntitiesDetectionJobInput {
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()
}
pub fn mode(&self) -> std::option::Option<&crate::model::PiiEntitiesDetectionMode> {
self.mode.as_ref()
}
pub fn redaction_config(&self) -> std::option::Option<&crate::model::RedactionConfig> {
self.redaction_config.as_ref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartPiiEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartPiiEntitiesDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("mode", &self.mode);
formatter.field("redaction_config", &self.redaction_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("language_code", &self.language_code);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartKeyPhrasesDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartKeyPhrasesDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartKeyPhrasesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartKeyPhrasesDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("language_code", &self.language_code);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartEventsDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub client_request_token: std::option::Option<std::string::String>,
pub target_event_types: std::option::Option<std::vec::Vec<std::string::String>>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartEventsDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn target_event_types(&self) -> std::option::Option<&[std::string::String]> {
self.target_event_types.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartEventsDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartEventsDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("language_code", &self.language_code);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("target_event_types", &self.target_event_types);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartEntitiesDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub entity_recognizer_arn: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartEntitiesDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn entity_recognizer_arn(&self) -> std::option::Option<&str> {
self.entity_recognizer_arn.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartEntitiesDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("entity_recognizer_arn", &self.entity_recognizer_arn);
formatter.field("language_code", &self.language_code);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartDominantLanguageDetectionJobInput {
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub job_name: std::option::Option<std::string::String>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartDominantLanguageDetectionJobInput {
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartDominantLanguageDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartDominantLanguageDetectionJobInput");
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("job_name", &self.job_name);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StartDocumentClassificationJobInput {
pub job_name: std::option::Option<std::string::String>,
pub document_classifier_arn: std::option::Option<std::string::String>,
pub input_data_config: std::option::Option<crate::model::InputDataConfig>,
pub output_data_config: std::option::Option<crate::model::OutputDataConfig>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub client_request_token: std::option::Option<std::string::String>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl StartDocumentClassificationJobInput {
pub fn job_name(&self) -> std::option::Option<&str> {
self.job_name.as_deref()
}
pub fn document_classifier_arn(&self) -> std::option::Option<&str> {
self.document_classifier_arn.as_deref()
}
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()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for StartDocumentClassificationJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StartDocumentClassificationJobInput");
formatter.field("job_name", &self.job_name);
formatter.field("document_classifier_arn", &self.document_classifier_arn);
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListTopicsDetectionJobsInput {
pub filter: std::option::Option<crate::model::TopicsDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListTopicsDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::TopicsDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListTopicsDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListTopicsDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
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 ListSentimentDetectionJobsInput {
pub filter: std::option::Option<crate::model::SentimentDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListSentimentDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::SentimentDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListSentimentDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListSentimentDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListPiiEntitiesDetectionJobsInput {
pub filter: std::option::Option<crate::model::PiiEntitiesDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListPiiEntitiesDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::PiiEntitiesDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListPiiEntitiesDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListPiiEntitiesDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListKeyPhrasesDetectionJobsInput {
pub filter: std::option::Option<crate::model::KeyPhrasesDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListKeyPhrasesDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::KeyPhrasesDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListKeyPhrasesDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListKeyPhrasesDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEventsDetectionJobsInput {
pub filter: std::option::Option<crate::model::EventsDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListEventsDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::EventsDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListEventsDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEventsDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEntityRecognizerSummariesInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListEntityRecognizerSummariesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListEntityRecognizerSummariesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEntityRecognizerSummariesInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEntityRecognizersInput {
pub filter: std::option::Option<crate::model::EntityRecognizerFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListEntityRecognizersInput {
pub fn filter(&self) -> std::option::Option<&crate::model::EntityRecognizerFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListEntityRecognizersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEntityRecognizersInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEntitiesDetectionJobsInput {
pub filter: std::option::Option<crate::model::EntitiesDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListEntitiesDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::EntitiesDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListEntitiesDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEntitiesDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListEndpointsInput {
pub filter: std::option::Option<crate::model::EndpointFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListEndpointsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::EndpointFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListEndpointsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListEndpointsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDominantLanguageDetectionJobsInput {
pub filter: std::option::Option<crate::model::DominantLanguageDetectionJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListDominantLanguageDetectionJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::DominantLanguageDetectionJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListDominantLanguageDetectionJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDominantLanguageDetectionJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDocumentClassifierSummariesInput {
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListDocumentClassifierSummariesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListDocumentClassifierSummariesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDocumentClassifierSummariesInput");
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDocumentClassifiersInput {
pub filter: std::option::Option<crate::model::DocumentClassifierFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListDocumentClassifiersInput {
pub fn filter(&self) -> std::option::Option<&crate::model::DocumentClassifierFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListDocumentClassifiersInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDocumentClassifiersInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ListDocumentClassificationJobsInput {
pub filter: std::option::Option<crate::model::DocumentClassificationJobFilter>,
pub next_token: std::option::Option<std::string::String>,
pub max_results: std::option::Option<i32>,
}
impl ListDocumentClassificationJobsInput {
pub fn filter(&self) -> std::option::Option<&crate::model::DocumentClassificationJobFilter> {
self.filter.as_ref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
impl std::fmt::Debug for ListDocumentClassificationJobsInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ListDocumentClassificationJobsInput");
formatter.field("filter", &self.filter);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectSyntaxInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::SyntaxLanguageCode>,
}
impl DetectSyntaxInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::SyntaxLanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for DetectSyntaxInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectSyntaxInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectSentimentInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl DetectSentimentInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for DetectSentimentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectSentimentInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectPiiEntitiesInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl DetectPiiEntitiesInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for DetectPiiEntitiesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectPiiEntitiesInput");
formatter.field("text", &self.text);
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectKeyPhrasesInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl DetectKeyPhrasesInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for DetectKeyPhrasesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectKeyPhrasesInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectEntitiesInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub endpoint_arn: std::option::Option<std::string::String>,
}
impl DetectEntitiesInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
}
impl std::fmt::Debug for DetectEntitiesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectEntitiesInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.field("endpoint_arn", &self.endpoint_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DetectDominantLanguageInput {
pub text: std::option::Option<std::string::String>,
}
impl DetectDominantLanguageInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
}
impl std::fmt::Debug for DetectDominantLanguageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DetectDominantLanguageInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeTopicsDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeTopicsDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeTopicsDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeTopicsDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeSentimentDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeSentimentDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeSentimentDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeSentimentDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribePiiEntitiesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribePiiEntitiesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribePiiEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribePiiEntitiesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeKeyPhrasesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeKeyPhrasesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeKeyPhrasesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeKeyPhrasesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeEventsDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeEventsDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeEventsDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeEventsDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeEntityRecognizerInput {
pub entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl DescribeEntityRecognizerInput {
pub fn entity_recognizer_arn(&self) -> std::option::Option<&str> {
self.entity_recognizer_arn.as_deref()
}
}
impl std::fmt::Debug for DescribeEntityRecognizerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeEntityRecognizerInput");
formatter.field("entity_recognizer_arn", &self.entity_recognizer_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeEntitiesDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeEntitiesDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeEntitiesDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeEntitiesDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeEndpointInput {
pub endpoint_arn: std::option::Option<std::string::String>,
}
impl DescribeEndpointInput {
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
}
impl std::fmt::Debug for DescribeEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeEndpointInput");
formatter.field("endpoint_arn", &self.endpoint_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDominantLanguageDetectionJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeDominantLanguageDetectionJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeDominantLanguageDetectionJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDominantLanguageDetectionJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDocumentClassifierInput {
pub document_classifier_arn: std::option::Option<std::string::String>,
}
impl DescribeDocumentClassifierInput {
pub fn document_classifier_arn(&self) -> std::option::Option<&str> {
self.document_classifier_arn.as_deref()
}
}
impl std::fmt::Debug for DescribeDocumentClassifierInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDocumentClassifierInput");
formatter.field("document_classifier_arn", &self.document_classifier_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDocumentClassificationJobInput {
pub job_id: std::option::Option<std::string::String>,
}
impl DescribeDocumentClassificationJobInput {
pub fn job_id(&self) -> std::option::Option<&str> {
self.job_id.as_deref()
}
}
impl std::fmt::Debug for DescribeDocumentClassificationJobInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDocumentClassificationJobInput");
formatter.field("job_id", &self.job_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteEntityRecognizerInput {
pub entity_recognizer_arn: std::option::Option<std::string::String>,
}
impl DeleteEntityRecognizerInput {
pub fn entity_recognizer_arn(&self) -> std::option::Option<&str> {
self.entity_recognizer_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteEntityRecognizerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteEntityRecognizerInput");
formatter.field("entity_recognizer_arn", &self.entity_recognizer_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteEndpointInput {
pub endpoint_arn: std::option::Option<std::string::String>,
}
impl DeleteEndpointInput {
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteEndpointInput");
formatter.field("endpoint_arn", &self.endpoint_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteDocumentClassifierInput {
pub document_classifier_arn: std::option::Option<std::string::String>,
}
impl DeleteDocumentClassifierInput {
pub fn document_classifier_arn(&self) -> std::option::Option<&str> {
self.document_classifier_arn.as_deref()
}
}
impl std::fmt::Debug for DeleteDocumentClassifierInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteDocumentClassifierInput");
formatter.field("document_classifier_arn", &self.document_classifier_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEntityRecognizerInput {
pub recognizer_name: std::option::Option<std::string::String>,
pub version_name: std::option::Option<std::string::String>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub input_data_config: std::option::Option<crate::model::EntityRecognizerInputDataConfig>,
pub client_request_token: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub model_kms_key_id: std::option::Option<std::string::String>,
}
impl CreateEntityRecognizerInput {
pub fn recognizer_name(&self) -> std::option::Option<&str> {
self.recognizer_name.as_deref()
}
pub fn version_name(&self) -> std::option::Option<&str> {
self.version_name.as_deref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn input_data_config(
&self,
) -> std::option::Option<&crate::model::EntityRecognizerInputDataConfig> {
self.input_data_config.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn model_kms_key_id(&self) -> std::option::Option<&str> {
self.model_kms_key_id.as_deref()
}
}
impl std::fmt::Debug for CreateEntityRecognizerInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEntityRecognizerInput");
formatter.field("recognizer_name", &self.recognizer_name);
formatter.field("version_name", &self.version_name);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("tags", &self.tags);
formatter.field("input_data_config", &self.input_data_config);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("language_code", &self.language_code);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("model_kms_key_id", &self.model_kms_key_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateEndpointInput {
pub endpoint_name: std::option::Option<std::string::String>,
pub model_arn: std::option::Option<std::string::String>,
pub desired_inference_units: std::option::Option<i32>,
pub client_request_token: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub data_access_role_arn: std::option::Option<std::string::String>,
}
impl CreateEndpointInput {
pub fn endpoint_name(&self) -> std::option::Option<&str> {
self.endpoint_name.as_deref()
}
pub fn model_arn(&self) -> std::option::Option<&str> {
self.model_arn.as_deref()
}
pub fn desired_inference_units(&self) -> std::option::Option<i32> {
self.desired_inference_units
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
}
impl std::fmt::Debug for CreateEndpointInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateEndpointInput");
formatter.field("endpoint_name", &self.endpoint_name);
formatter.field("model_arn", &self.model_arn);
formatter.field("desired_inference_units", &self.desired_inference_units);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("tags", &self.tags);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateDocumentClassifierInput {
pub document_classifier_name: std::option::Option<std::string::String>,
pub version_name: std::option::Option<std::string::String>,
pub data_access_role_arn: std::option::Option<std::string::String>,
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
pub input_data_config: std::option::Option<crate::model::DocumentClassifierInputDataConfig>,
pub output_data_config: std::option::Option<crate::model::DocumentClassifierOutputDataConfig>,
pub client_request_token: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
pub volume_kms_key_id: std::option::Option<std::string::String>,
pub vpc_config: std::option::Option<crate::model::VpcConfig>,
pub mode: std::option::Option<crate::model::DocumentClassifierMode>,
pub model_kms_key_id: std::option::Option<std::string::String>,
}
impl CreateDocumentClassifierInput {
pub fn document_classifier_name(&self) -> std::option::Option<&str> {
self.document_classifier_name.as_deref()
}
pub fn version_name(&self) -> std::option::Option<&str> {
self.version_name.as_deref()
}
pub fn data_access_role_arn(&self) -> std::option::Option<&str> {
self.data_access_role_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
pub fn input_data_config(
&self,
) -> std::option::Option<&crate::model::DocumentClassifierInputDataConfig> {
self.input_data_config.as_ref()
}
pub fn output_data_config(
&self,
) -> std::option::Option<&crate::model::DocumentClassifierOutputDataConfig> {
self.output_data_config.as_ref()
}
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
pub fn volume_kms_key_id(&self) -> std::option::Option<&str> {
self.volume_kms_key_id.as_deref()
}
pub fn vpc_config(&self) -> std::option::Option<&crate::model::VpcConfig> {
self.vpc_config.as_ref()
}
pub fn mode(&self) -> std::option::Option<&crate::model::DocumentClassifierMode> {
self.mode.as_ref()
}
pub fn model_kms_key_id(&self) -> std::option::Option<&str> {
self.model_kms_key_id.as_deref()
}
}
impl std::fmt::Debug for CreateDocumentClassifierInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateDocumentClassifierInput");
formatter.field("document_classifier_name", &self.document_classifier_name);
formatter.field("version_name", &self.version_name);
formatter.field("data_access_role_arn", &self.data_access_role_arn);
formatter.field("tags", &self.tags);
formatter.field("input_data_config", &self.input_data_config);
formatter.field("output_data_config", &self.output_data_config);
formatter.field("client_request_token", &self.client_request_token);
formatter.field("language_code", &self.language_code);
formatter.field("volume_kms_key_id", &self.volume_kms_key_id);
formatter.field("vpc_config", &self.vpc_config);
formatter.field("mode", &self.mode);
formatter.field("model_kms_key_id", &self.model_kms_key_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ContainsPiiEntitiesInput {
pub text: std::option::Option<std::string::String>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl ContainsPiiEntitiesInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for ContainsPiiEntitiesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ContainsPiiEntitiesInput");
formatter.field("text", &self.text);
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ClassifyDocumentInput {
pub text: std::option::Option<std::string::String>,
pub endpoint_arn: std::option::Option<std::string::String>,
}
impl ClassifyDocumentInput {
pub fn text(&self) -> std::option::Option<&str> {
self.text.as_deref()
}
pub fn endpoint_arn(&self) -> std::option::Option<&str> {
self.endpoint_arn.as_deref()
}
}
impl std::fmt::Debug for ClassifyDocumentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ClassifyDocumentInput");
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("endpoint_arn", &self.endpoint_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDetectSyntaxInput {
pub text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub language_code: std::option::Option<crate::model::SyntaxLanguageCode>,
}
impl BatchDetectSyntaxInput {
pub fn text_list(&self) -> std::option::Option<&[std::string::String]> {
self.text_list.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::SyntaxLanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for BatchDetectSyntaxInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDetectSyntaxInput");
formatter.field("text_list", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDetectSentimentInput {
pub text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl BatchDetectSentimentInput {
pub fn text_list(&self) -> std::option::Option<&[std::string::String]> {
self.text_list.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for BatchDetectSentimentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDetectSentimentInput");
formatter.field("text_list", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDetectKeyPhrasesInput {
pub text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl BatchDetectKeyPhrasesInput {
pub fn text_list(&self) -> std::option::Option<&[std::string::String]> {
self.text_list.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for BatchDetectKeyPhrasesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDetectKeyPhrasesInput");
formatter.field("text_list", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDetectEntitiesInput {
pub text_list: std::option::Option<std::vec::Vec<std::string::String>>,
pub language_code: std::option::Option<crate::model::LanguageCode>,
}
impl BatchDetectEntitiesInput {
pub fn text_list(&self) -> std::option::Option<&[std::string::String]> {
self.text_list.as_deref()
}
pub fn language_code(&self) -> std::option::Option<&crate::model::LanguageCode> {
self.language_code.as_ref()
}
}
impl std::fmt::Debug for BatchDetectEntitiesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDetectEntitiesInput");
formatter.field("text_list", &"*** Sensitive Data Redacted ***");
formatter.field("language_code", &self.language_code);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BatchDetectDominantLanguageInput {
pub text_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchDetectDominantLanguageInput {
pub fn text_list(&self) -> std::option::Option<&[std::string::String]> {
self.text_list.as_deref()
}
}
impl std::fmt::Debug for BatchDetectDominantLanguageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BatchDetectDominantLanguageInput");
formatter.field("text_list", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}