use std::fmt::Write;
pub mod create_chat_token_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) room_identifier: std::option::Option<std::string::String>,
pub(crate) user_id: std::option::Option<std::string::String>,
pub(crate) capabilities:
std::option::Option<std::vec::Vec<crate::model::ChatTokenCapability>>,
pub(crate) session_duration_in_minutes: std::option::Option<i32>,
pub(crate) attributes: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn room_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.room_identifier = Some(input.into());
self
}
pub fn set_room_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.room_identifier = input;
self
}
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn capabilities(mut self, input: crate::model::ChatTokenCapability) -> Self {
let mut v = self.capabilities.unwrap_or_default();
v.push(input);
self.capabilities = Some(v);
self
}
pub fn set_capabilities(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ChatTokenCapability>>,
) -> Self {
self.capabilities = input;
self
}
pub fn session_duration_in_minutes(mut self, input: i32) -> Self {
self.session_duration_in_minutes = Some(input);
self
}
pub fn set_session_duration_in_minutes(mut self, input: std::option::Option<i32>) -> Self {
self.session_duration_in_minutes = input;
self
}
pub fn attributes(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.attributes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.attributes = Some(hash_map);
self
}
pub fn set_attributes(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.attributes = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateChatTokenInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateChatTokenInput {
room_identifier: self.room_identifier,
user_id: self.user_id,
capabilities: self.capabilities,
session_duration_in_minutes: self.session_duration_in_minutes.unwrap_or_default(),
attributes: self.attributes,
})
}
}
}
impl CreateChatTokenInput {
#[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::CreateChatToken,
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::CreateChatTokenInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateChatToken").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateChatTokenInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_chat_token(&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::CreateChatToken::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateChatToken",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_chat_token_input::Builder {
crate::input::create_chat_token_input::Builder::default()
}
}
pub mod create_logging_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) destination_configuration:
std::option::Option<crate::model::DestinationConfiguration>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn destination_configuration(
mut self,
input: crate::model::DestinationConfiguration,
) -> Self {
self.destination_configuration = Some(input);
self
}
pub fn set_destination_configuration(
mut self,
input: std::option::Option<crate::model::DestinationConfiguration>,
) -> Self {
self.destination_configuration = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateLoggingConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateLoggingConfigurationInput {
name: self.name,
destination_configuration: self.destination_configuration,
tags: self.tags,
})
}
}
}
impl CreateLoggingConfigurationInput {
#[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::CreateLoggingConfiguration,
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::CreateLoggingConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateLoggingConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateLoggingConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_logging_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateLoggingConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLoggingConfiguration",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_logging_configuration_input::Builder {
crate::input::create_logging_configuration_input::Builder::default()
}
}
pub mod create_room_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) maximum_message_rate_per_second: std::option::Option<i32>,
pub(crate) maximum_message_length: std::option::Option<i32>,
pub(crate) message_review_handler: std::option::Option<crate::model::MessageReviewHandler>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) logging_configuration_identifiers:
std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn maximum_message_rate_per_second(mut self, input: i32) -> Self {
self.maximum_message_rate_per_second = Some(input);
self
}
pub fn set_maximum_message_rate_per_second(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.maximum_message_rate_per_second = input;
self
}
pub fn maximum_message_length(mut self, input: i32) -> Self {
self.maximum_message_length = Some(input);
self
}
pub fn set_maximum_message_length(mut self, input: std::option::Option<i32>) -> Self {
self.maximum_message_length = input;
self
}
pub fn message_review_handler(mut self, input: crate::model::MessageReviewHandler) -> Self {
self.message_review_handler = Some(input);
self
}
pub fn set_message_review_handler(
mut self,
input: std::option::Option<crate::model::MessageReviewHandler>,
) -> Self {
self.message_review_handler = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn logging_configuration_identifiers(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.logging_configuration_identifiers.unwrap_or_default();
v.push(input.into());
self.logging_configuration_identifiers = Some(v);
self
}
pub fn set_logging_configuration_identifiers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.logging_configuration_identifiers = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateRoomInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateRoomInput {
name: self.name,
maximum_message_rate_per_second: self
.maximum_message_rate_per_second
.unwrap_or_default(),
maximum_message_length: self.maximum_message_length.unwrap_or_default(),
message_review_handler: self.message_review_handler,
tags: self.tags,
logging_configuration_identifiers: self.logging_configuration_identifiers,
})
}
}
}
impl CreateRoomInput {
#[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::CreateRoom,
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::CreateRoomInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/CreateRoom").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateRoomInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_room(&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::CreateRoom::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateRoom",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_room_input::Builder {
crate::input::create_room_input::Builder::default()
}
}
pub mod delete_logging_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteLoggingConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteLoggingConfigurationInput {
identifier: self.identifier,
})
}
}
}
impl DeleteLoggingConfigurationInput {
#[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::DeleteLoggingConfiguration,
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::DeleteLoggingConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteLoggingConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLoggingConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_logging_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteLoggingConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLoggingConfiguration",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_logging_configuration_input::Builder {
crate::input::delete_logging_configuration_input::Builder::default()
}
}
pub mod delete_message_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) room_identifier: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<std::string::String>,
}
impl Builder {
pub fn room_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.room_identifier = Some(input.into());
self
}
pub fn set_room_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.room_identifier = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
self.reason = Some(input.into());
self
}
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.reason = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteMessageInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteMessageInput {
room_identifier: self.room_identifier,
id: self.id,
reason: self.reason,
})
}
}
}
impl DeleteMessageInput {
#[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::DeleteMessage,
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::DeleteMessageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteMessage").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteMessageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_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::DeleteMessage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMessage",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_message_input::Builder {
crate::input::delete_message_input::Builder::default()
}
}
pub mod delete_room_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteRoomInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteRoomInput {
identifier: self.identifier,
})
}
}
}
impl DeleteRoomInput {
#[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::DeleteRoom,
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::DeleteRoomInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DeleteRoom").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteRoomInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_room(&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::DeleteRoom::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteRoom",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_room_input::Builder {
crate::input::delete_room_input::Builder::default()
}
}
pub mod disconnect_user_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) room_identifier: std::option::Option<std::string::String>,
pub(crate) user_id: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<std::string::String>,
}
impl Builder {
pub fn room_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.room_identifier = Some(input.into());
self
}
pub fn set_room_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.room_identifier = input;
self
}
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
self.reason = Some(input.into());
self
}
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.reason = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DisconnectUserInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DisconnectUserInput {
room_identifier: self.room_identifier,
user_id: self.user_id,
reason: self.reason,
})
}
}
}
impl DisconnectUserInput {
#[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::DisconnectUser,
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::DisconnectUserInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/DisconnectUser").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DisconnectUserInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_disconnect_user(&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::DisconnectUser::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DisconnectUser",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::disconnect_user_input::Builder {
crate::input::disconnect_user_input::Builder::default()
}
}
pub mod get_logging_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLoggingConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLoggingConfigurationInput {
identifier: self.identifier,
})
}
}
}
impl GetLoggingConfigurationInput {
#[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::GetLoggingConfiguration,
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::GetLoggingConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetLoggingConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLoggingConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_logging_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLoggingConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLoggingConfiguration",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_logging_configuration_input::Builder {
crate::input::get_logging_configuration_input::Builder::default()
}
}
pub mod get_room_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetRoomInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetRoomInput {
identifier: self.identifier,
})
}
}
}
impl GetRoomInput {
#[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::GetRoom,
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::GetRoomInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/GetRoom").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetRoomInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_room(&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::GetRoom::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetRoom", "ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_room_input::Builder {
crate::input::get_room_input::Builder::default()
}
}
pub mod list_logging_configurations_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) 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,
) -> Result<
crate::input::ListLoggingConfigurationsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListLoggingConfigurationsInput {
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
})
}
}
}
impl ListLoggingConfigurationsInput {
#[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::ListLoggingConfigurations,
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::ListLoggingConfigurationsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListLoggingConfigurations").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListLoggingConfigurationsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_logging_configurations(
&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::ListLoggingConfigurations::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListLoggingConfigurations",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_logging_configurations_input::Builder {
crate::input::list_logging_configurations_input::Builder::default()
}
}
pub mod list_rooms_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) message_review_handler_uri: std::option::Option<std::string::String>,
pub(crate) logging_configuration_identifier: std::option::Option<std::string::String>,
}
impl Builder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn 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 message_review_handler_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.message_review_handler_uri = Some(input.into());
self
}
pub fn set_message_review_handler_uri(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.message_review_handler_uri = input;
self
}
pub fn logging_configuration_identifier(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.logging_configuration_identifier = Some(input.into());
self
}
pub fn set_logging_configuration_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.logging_configuration_identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListRoomsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListRoomsInput {
name: self.name,
next_token: self.next_token,
max_results: self.max_results.unwrap_or_default(),
message_review_handler_uri: self.message_review_handler_uri,
logging_configuration_identifier: self.logging_configuration_identifier,
})
}
}
}
impl ListRoomsInput {
#[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::ListRooms,
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::ListRoomsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/ListRooms").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListRoomsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_rooms(&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::ListRooms::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListRooms",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_rooms_input::Builder {
crate::input::list_rooms_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
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,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::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::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.resource_arn;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.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::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod send_event_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) room_identifier: std::option::Option<std::string::String>,
pub(crate) event_name: std::option::Option<std::string::String>,
pub(crate) attributes: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn room_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.room_identifier = Some(input.into());
self
}
pub fn set_room_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.room_identifier = input;
self
}
pub fn event_name(mut self, input: impl Into<std::string::String>) -> Self {
self.event_name = Some(input.into());
self
}
pub fn set_event_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.event_name = input;
self
}
pub fn attributes(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.attributes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.attributes = Some(hash_map);
self
}
pub fn set_attributes(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.attributes = input;
self
}
pub fn build(
self,
) -> Result<crate::input::SendEventInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::SendEventInput {
room_identifier: self.room_identifier,
event_name: self.event_name,
attributes: self.attributes,
})
}
}
}
impl SendEventInput {
#[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::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),
};
let mut request = {
fn uri_base(
_input: &crate::input::SendEventInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/SendEvent").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)?;
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",
"ivschat",
));
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 tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, 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 tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.resource_arn;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/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_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.resource_arn;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(output, "/tags/{resourceArn}", resourceArn = resource_arn)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_4 = &_input.tag_keys;
let inner_4 = inner_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"tag_keys",
"cannot be empty or unset",
)
})?;
for inner_5 in inner_4 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_5));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_logging_configuration_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) destination_configuration:
std::option::Option<crate::model::DestinationConfiguration>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn destination_configuration(
mut self,
input: crate::model::DestinationConfiguration,
) -> Self {
self.destination_configuration = Some(input);
self
}
pub fn set_destination_configuration(
mut self,
input: std::option::Option<crate::model::DestinationConfiguration>,
) -> Self {
self.destination_configuration = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLoggingConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLoggingConfigurationInput {
identifier: self.identifier,
name: self.name,
destination_configuration: self.destination_configuration,
})
}
}
}
impl UpdateLoggingConfigurationInput {
#[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::UpdateLoggingConfiguration,
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::UpdateLoggingConfigurationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateLoggingConfiguration").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLoggingConfigurationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_logging_configuration(
&self,
)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateLoggingConfiguration::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLoggingConfiguration",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_logging_configuration_input::Builder {
crate::input::update_logging_configuration_input::Builder::default()
}
}
pub mod update_room_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) maximum_message_rate_per_second: std::option::Option<i32>,
pub(crate) maximum_message_length: std::option::Option<i32>,
pub(crate) message_review_handler: std::option::Option<crate::model::MessageReviewHandler>,
pub(crate) logging_configuration_identifiers:
std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn maximum_message_rate_per_second(mut self, input: i32) -> Self {
self.maximum_message_rate_per_second = Some(input);
self
}
pub fn set_maximum_message_rate_per_second(
mut self,
input: std::option::Option<i32>,
) -> Self {
self.maximum_message_rate_per_second = input;
self
}
pub fn maximum_message_length(mut self, input: i32) -> Self {
self.maximum_message_length = Some(input);
self
}
pub fn set_maximum_message_length(mut self, input: std::option::Option<i32>) -> Self {
self.maximum_message_length = input;
self
}
pub fn message_review_handler(mut self, input: crate::model::MessageReviewHandler) -> Self {
self.message_review_handler = Some(input);
self
}
pub fn set_message_review_handler(
mut self,
input: std::option::Option<crate::model::MessageReviewHandler>,
) -> Self {
self.message_review_handler = input;
self
}
pub fn logging_configuration_identifiers(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.logging_configuration_identifiers.unwrap_or_default();
v.push(input.into());
self.logging_configuration_identifiers = Some(v);
self
}
pub fn set_logging_configuration_identifiers(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.logging_configuration_identifiers = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateRoomInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateRoomInput {
identifier: self.identifier,
name: self.name,
maximum_message_rate_per_second: self
.maximum_message_rate_per_second
.unwrap_or_default(),
maximum_message_length: self.maximum_message_length.unwrap_or_default(),
message_review_handler: self.message_review_handler,
logging_configuration_identifiers: self.logging_configuration_identifiers,
})
}
}
}
impl UpdateRoomInput {
#[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::UpdateRoom,
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::UpdateRoomInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/UpdateRoom").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateRoomInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_room(&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::UpdateRoom::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateRoom",
"ivschat",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_room_input::Builder {
crate::input::update_room_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateRoomInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub maximum_message_rate_per_second: i32,
#[doc(hidden)]
pub maximum_message_length: i32,
#[doc(hidden)]
pub message_review_handler: std::option::Option<crate::model::MessageReviewHandler>,
#[doc(hidden)]
pub logging_configuration_identifiers: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UpdateRoomInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn maximum_message_rate_per_second(&self) -> i32 {
self.maximum_message_rate_per_second
}
pub fn maximum_message_length(&self) -> i32 {
self.maximum_message_length
}
pub fn message_review_handler(
&self,
) -> std::option::Option<&crate::model::MessageReviewHandler> {
self.message_review_handler.as_ref()
}
pub fn logging_configuration_identifiers(&self) -> std::option::Option<&[std::string::String]> {
self.logging_configuration_identifiers.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLoggingConfigurationInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub destination_configuration: std::option::Option<crate::model::DestinationConfiguration>,
}
impl UpdateLoggingConfigurationInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn destination_configuration(
&self,
) -> std::option::Option<&crate::model::DestinationConfiguration> {
self.destination_configuration.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendEventInput {
#[doc(hidden)]
pub room_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attributes:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl SendEventInput {
pub fn room_identifier(&self) -> std::option::Option<&str> {
self.room_identifier.as_deref()
}
pub fn event_name(&self) -> std::option::Option<&str> {
self.event_name.as_deref()
}
pub fn attributes(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.attributes.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTagsForResourceInput {
#[doc(hidden)]
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()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListRoomsInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
#[doc(hidden)]
pub message_review_handler_uri: std::option::Option<std::string::String>,
#[doc(hidden)]
pub logging_configuration_identifier: std::option::Option<std::string::String>,
}
impl ListRoomsInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
pub fn message_review_handler_uri(&self) -> std::option::Option<&str> {
self.message_review_handler_uri.as_deref()
}
pub fn logging_configuration_identifier(&self) -> std::option::Option<&str> {
self.logging_configuration_identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLoggingConfigurationsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: i32,
}
impl ListLoggingConfigurationsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> i32 {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetRoomInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
}
impl GetRoomInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLoggingConfigurationInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
}
impl GetLoggingConfigurationInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisconnectUserInput {
#[doc(hidden)]
pub room_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<std::string::String>,
}
impl DisconnectUserInput {
pub fn room_identifier(&self) -> std::option::Option<&str> {
self.room_identifier.as_deref()
}
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
pub fn reason(&self) -> std::option::Option<&str> {
self.reason.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRoomInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
}
impl DeleteRoomInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteMessageInput {
#[doc(hidden)]
pub room_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<std::string::String>,
}
impl DeleteMessageInput {
pub fn room_identifier(&self) -> std::option::Option<&str> {
self.room_identifier.as_deref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn reason(&self) -> std::option::Option<&str> {
self.reason.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLoggingConfigurationInput {
#[doc(hidden)]
pub identifier: std::option::Option<std::string::String>,
}
impl DeleteLoggingConfigurationInput {
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateRoomInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub maximum_message_rate_per_second: i32,
#[doc(hidden)]
pub maximum_message_length: i32,
#[doc(hidden)]
pub message_review_handler: std::option::Option<crate::model::MessageReviewHandler>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub logging_configuration_identifiers: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl CreateRoomInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn maximum_message_rate_per_second(&self) -> i32 {
self.maximum_message_rate_per_second
}
pub fn maximum_message_length(&self) -> i32 {
self.maximum_message_length
}
pub fn message_review_handler(
&self,
) -> std::option::Option<&crate::model::MessageReviewHandler> {
self.message_review_handler.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn logging_configuration_identifiers(&self) -> std::option::Option<&[std::string::String]> {
self.logging_configuration_identifiers.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateLoggingConfigurationInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub destination_configuration: std::option::Option<crate::model::DestinationConfiguration>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateLoggingConfigurationInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn destination_configuration(
&self,
) -> std::option::Option<&crate::model::DestinationConfiguration> {
self.destination_configuration.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateChatTokenInput {
#[doc(hidden)]
pub room_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub capabilities: std::option::Option<std::vec::Vec<crate::model::ChatTokenCapability>>,
#[doc(hidden)]
pub session_duration_in_minutes: i32,
#[doc(hidden)]
pub attributes:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateChatTokenInput {
pub fn room_identifier(&self) -> std::option::Option<&str> {
self.room_identifier.as_deref()
}
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
pub fn capabilities(&self) -> std::option::Option<&[crate::model::ChatTokenCapability]> {
self.capabilities.as_deref()
}
pub fn session_duration_in_minutes(&self) -> i32 {
self.session_duration_in_minutes
}
pub fn attributes(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.attributes.as_ref()
}
}