use std::fmt::Write;
pub mod complete_attachment_upload_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) attachment_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn attachment_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.attachment_ids.unwrap_or_default();
v.push(input.into());
self.attachment_ids = Some(v);
self
}
pub fn set_attachment_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.attachment_ids = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CompleteAttachmentUploadInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CompleteAttachmentUploadInput {
attachment_ids: self.attachment_ids,
client_token: self.client_token,
connection_token: self.connection_token,
})
}
}
}
impl CompleteAttachmentUploadInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CompleteAttachmentUpload,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CompleteAttachmentUploadInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/complete-attachment-upload")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CompleteAttachmentUploadInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_complete_attachment_upload(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_complete_attachment_upload(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CompleteAttachmentUpload::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CompleteAttachmentUpload",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::complete_attachment_upload_input::Builder {
crate::input::complete_attachment_upload_input::Builder::default()
}
}
pub mod create_participant_connection_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<std::vec::Vec<crate::model::ConnectionType>>,
pub(crate) participant_token: std::option::Option<std::string::String>,
pub(crate) connect_participant: std::option::Option<bool>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ConnectionType) -> Self {
let mut v = self.r#type.unwrap_or_default();
v.push(input);
self.r#type = Some(v);
self
}
pub fn set_type(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ConnectionType>>,
) -> Self {
self.r#type = input;
self
}
pub fn participant_token(mut self, input: impl Into<std::string::String>) -> Self {
self.participant_token = Some(input.into());
self
}
pub fn set_participant_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.participant_token = input;
self
}
pub fn connect_participant(mut self, input: bool) -> Self {
self.connect_participant = Some(input);
self
}
pub fn set_connect_participant(mut self, input: std::option::Option<bool>) -> Self {
self.connect_participant = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateParticipantConnectionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateParticipantConnectionInput {
r#type: self.r#type,
participant_token: self.participant_token,
connect_participant: self.connect_participant,
})
}
}
}
impl CreateParticipantConnectionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateParticipantConnection,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::CreateParticipantConnectionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/connection").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateParticipantConnectionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_create_participant_connection(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_participant_connection(&self)?
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateParticipantConnection::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateParticipantConnection",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_participant_connection_input::Builder {
crate::input::create_participant_connection_input::Builder::default()
}
}
pub mod disconnect_participant_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DisconnectParticipantInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DisconnectParticipantInput {
client_token: self.client_token,
connection_token: self.connection_token,
})
}
}
}
impl DisconnectParticipantInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DisconnectParticipant,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DisconnectParticipantInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/disconnect").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisconnectParticipantInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_disconnect_participant(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disconnect_participant(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DisconnectParticipant::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisconnectParticipant",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disconnect_participant_input::Builder {
crate::input::disconnect_participant_input::Builder::default()
}
}
pub mod get_attachment_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) attachment_id: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn attachment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.attachment_id = Some(input.into());
self
}
pub fn set_attachment_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.attachment_id = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetAttachmentInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetAttachmentInput {
attachment_id: self.attachment_id,
connection_token: self.connection_token,
})
}
}
}
impl GetAttachmentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetAttachment,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetAttachmentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/attachment").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAttachmentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_get_attachment(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_attachment(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetAttachment::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAttachment",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_attachment_input::Builder {
crate::input::get_attachment_input::Builder::default()
}
}
pub mod get_transcript_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) contact_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) scan_direction: std::option::Option<crate::model::ScanDirection>,
pub(crate) sort_order: std::option::Option<crate::model::SortKey>,
pub(crate) start_position: std::option::Option<crate::model::StartPosition>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn contact_id(mut self, input: impl Into<std::string::String>) -> Self {
self.contact_id = Some(input.into());
self
}
pub fn set_contact_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.contact_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn scan_direction(mut self, input: crate::model::ScanDirection) -> Self {
self.scan_direction = Some(input);
self
}
pub fn set_scan_direction(
mut self,
input: std::option::Option<crate::model::ScanDirection>,
) -> Self {
self.scan_direction = input;
self
}
pub fn sort_order(mut self, input: crate::model::SortKey) -> Self {
self.sort_order = Some(input);
self
}
pub fn set_sort_order(mut self, input: std::option::Option<crate::model::SortKey>) -> Self {
self.sort_order = input;
self
}
pub fn start_position(mut self, input: crate::model::StartPosition) -> Self {
self.start_position = Some(input);
self
}
pub fn set_start_position(
mut self,
input: std::option::Option<crate::model::StartPosition>,
) -> Self {
self.start_position = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetTranscriptInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetTranscriptInput {
contact_id: self.contact_id,
max_results: self.max_results,
next_token: self.next_token,
scan_direction: self.scan_direction,
sort_order: self.sort_order,
start_position: self.start_position,
connection_token: self.connection_token,
})
}
}
}
impl GetTranscriptInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetTranscript,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::GetTranscriptInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/transcript").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetTranscriptInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_get_transcript(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_transcript(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetTranscript::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetTranscript",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_transcript_input::Builder {
crate::input::get_transcript_input::Builder::default()
}
}
pub mod send_event_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) content_type: std::option::Option<std::string::String>,
pub(crate) content: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn content_type(mut self, input: impl Into<std::string::String>) -> Self {
self.content_type = Some(input.into());
self
}
pub fn set_content_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content_type = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::SendEventInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::SendEventInput {
content_type: self.content_type,
content: self.content,
client_token: self.client_token,
connection_token: self.connection_token,
})
}
}
}
impl SendEventInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::SendEvent,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::SendEventInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/event").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SendEventInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_send_event(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_send_event(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::SendEvent::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SendEvent",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::send_event_input::Builder {
crate::input::send_event_input::Builder::default()
}
}
pub mod send_message_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) content_type: std::option::Option<std::string::String>,
pub(crate) content: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn content_type(mut self, input: impl Into<std::string::String>) -> Self {
self.content_type = Some(input.into());
self
}
pub fn set_content_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content_type = input;
self
}
pub fn content(mut self, input: impl Into<std::string::String>) -> Self {
self.content = Some(input.into());
self
}
pub fn set_content(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::SendMessageInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::SendMessageInput {
content_type: self.content_type,
content: self.content,
client_token: self.client_token,
connection_token: self.connection_token,
})
}
}
}
impl SendMessageInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::SendMessage,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::SendMessageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/message").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::SendMessageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_send_message(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_send_message(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::SendMessage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"SendMessage",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::send_message_input::Builder {
crate::input::send_message_input::Builder::default()
}
}
pub mod start_attachment_upload_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) content_type: std::option::Option<std::string::String>,
pub(crate) attachment_size_in_bytes: std::option::Option<i64>,
pub(crate) attachment_name: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) connection_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn content_type(mut self, input: impl Into<std::string::String>) -> Self {
self.content_type = Some(input.into());
self
}
pub fn set_content_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content_type = input;
self
}
pub fn attachment_size_in_bytes(mut self, input: i64) -> Self {
self.attachment_size_in_bytes = Some(input);
self
}
pub fn set_attachment_size_in_bytes(mut self, input: std::option::Option<i64>) -> Self {
self.attachment_size_in_bytes = input;
self
}
pub fn attachment_name(mut self, input: impl Into<std::string::String>) -> Self {
self.attachment_name = Some(input.into());
self
}
pub fn set_attachment_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.attachment_name = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn connection_token(mut self, input: impl Into<std::string::String>) -> Self {
self.connection_token = Some(input.into());
self
}
pub fn set_connection_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.connection_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartAttachmentUploadInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartAttachmentUploadInput {
content_type: self.content_type,
attachment_size_in_bytes: self.attachment_size_in_bytes.unwrap_or_default(),
attachment_name: self.attachment_name,
client_token: self.client_token,
connection_token: self.connection_token,
})
}
}
}
impl StartAttachmentUploadInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartAttachmentUpload,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StartAttachmentUploadInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/participant/start-attachment-upload")
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartAttachmentUploadInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_start_attachment_upload(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_attachment_upload(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartAttachmentUpload::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartAttachmentUpload",
"connectparticipant",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_attachment_upload_input::Builder {
crate::input::start_attachment_upload_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartAttachmentUploadInput {
#[doc(hidden)]
pub content_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attachment_size_in_bytes: i64,
#[doc(hidden)]
pub attachment_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl StartAttachmentUploadInput {
pub fn content_type(&self) -> std::option::Option<&str> {
self.content_type.as_deref()
}
pub fn attachment_size_in_bytes(&self) -> i64 {
self.attachment_size_in_bytes
}
pub fn attachment_name(&self) -> std::option::Option<&str> {
self.attachment_name.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendMessageInput {
#[doc(hidden)]
pub content_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub content: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl SendMessageInput {
pub fn content_type(&self) -> std::option::Option<&str> {
self.content_type.as_deref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendEventInput {
#[doc(hidden)]
pub content_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub content: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl SendEventInput {
pub fn content_type(&self) -> std::option::Option<&str> {
self.content_type.as_deref()
}
pub fn content(&self) -> std::option::Option<&str> {
self.content.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetTranscriptInput {
#[doc(hidden)]
pub contact_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub scan_direction: std::option::Option<crate::model::ScanDirection>,
#[doc(hidden)]
pub sort_order: std::option::Option<crate::model::SortKey>,
#[doc(hidden)]
pub start_position: std::option::Option<crate::model::StartPosition>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl GetTranscriptInput {
pub fn contact_id(&self) -> std::option::Option<&str> {
self.contact_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn scan_direction(&self) -> std::option::Option<&crate::model::ScanDirection> {
self.scan_direction.as_ref()
}
pub fn sort_order(&self) -> std::option::Option<&crate::model::SortKey> {
self.sort_order.as_ref()
}
pub fn start_position(&self) -> std::option::Option<&crate::model::StartPosition> {
self.start_position.as_ref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetAttachmentInput {
#[doc(hidden)]
pub attachment_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl GetAttachmentInput {
pub fn attachment_id(&self) -> std::option::Option<&str> {
self.attachment_id.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisconnectParticipantInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl DisconnectParticipantInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateParticipantConnectionInput {
#[doc(hidden)]
pub r#type: std::option::Option<std::vec::Vec<crate::model::ConnectionType>>,
#[doc(hidden)]
pub participant_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connect_participant: std::option::Option<bool>,
}
impl CreateParticipantConnectionInput {
pub fn r#type(&self) -> std::option::Option<&[crate::model::ConnectionType]> {
self.r#type.as_deref()
}
pub fn participant_token(&self) -> std::option::Option<&str> {
self.participant_token.as_deref()
}
pub fn connect_participant(&self) -> std::option::Option<bool> {
self.connect_participant
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CompleteAttachmentUploadInput {
#[doc(hidden)]
pub attachment_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub connection_token: std::option::Option<std::string::String>,
}
impl CompleteAttachmentUploadInput {
pub fn attachment_ids(&self) -> std::option::Option<&[std::string::String]> {
self.attachment_ids.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn connection_token(&self) -> std::option::Option<&str> {
self.connection_token.as_deref()
}
}