use std::fmt::Write;
pub mod batch_create_attendee_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) attendees:
std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn attendees(mut self, input: crate::model::CreateAttendeeRequestItem) -> Self {
let mut v = self.attendees.unwrap_or_default();
v.push(input);
self.attendees = Some(v);
self
}
pub fn set_attendees(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
) -> Self {
self.attendees = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchCreateAttendeeInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchCreateAttendeeInput {
meeting_id: self.meeting_id,
attendees: self.attendees,
})
}
}
}
impl BatchCreateAttendeeInput {
#[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::BatchCreateAttendee,
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::BatchCreateAttendeeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.meeting_id;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::BatchCreateAttendeeInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "batch-create");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchCreateAttendeeInput,
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("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_batch_create_attendee(&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::BatchCreateAttendee::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchCreateAttendee",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_create_attendee_input::Builder {
crate::input::batch_create_attendee_input::Builder::default()
}
}
pub mod batch_update_attendee_capabilities_except_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) excluded_attendee_ids:
std::option::Option<std::vec::Vec<crate::model::AttendeeIdItem>>,
pub(crate) capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn excluded_attendee_ids(mut self, input: crate::model::AttendeeIdItem) -> Self {
let mut v = self.excluded_attendee_ids.unwrap_or_default();
v.push(input);
self.excluded_attendee_ids = Some(v);
self
}
pub fn set_excluded_attendee_ids(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AttendeeIdItem>>,
) -> Self {
self.excluded_attendee_ids = input;
self
}
pub fn capabilities(mut self, input: crate::model::AttendeeCapabilities) -> Self {
self.capabilities = Some(input);
self
}
pub fn set_capabilities(
mut self,
input: std::option::Option<crate::model::AttendeeCapabilities>,
) -> Self {
self.capabilities = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::BatchUpdateAttendeeCapabilitiesExceptInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::BatchUpdateAttendeeCapabilitiesExceptInput {
meeting_id: self.meeting_id,
excluded_attendee_ids: self.excluded_attendee_ids,
capabilities: self.capabilities,
})
}
}
}
impl BatchUpdateAttendeeCapabilitiesExceptInput {
#[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::BatchUpdateAttendeeCapabilitiesExcept,
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::BatchUpdateAttendeeCapabilitiesExceptInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.meeting_id;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees/capabilities",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::BatchUpdateAttendeeCapabilitiesExceptInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "batch-update-except");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::BatchUpdateAttendeeCapabilitiesExceptInput,
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("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_batch_update_attendee_capabilities_except(&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::BatchUpdateAttendeeCapabilitiesExcept::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"BatchUpdateAttendeeCapabilitiesExcept",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::batch_update_attendee_capabilities_except_input::Builder {
crate::input::batch_update_attendee_capabilities_except_input::Builder::default()
}
}
pub mod create_attendee_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) external_user_id: std::option::Option<std::string::String>,
pub(crate) capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn external_user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.external_user_id = Some(input.into());
self
}
pub fn set_external_user_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.external_user_id = input;
self
}
pub fn capabilities(mut self, input: crate::model::AttendeeCapabilities) -> Self {
self.capabilities = Some(input);
self
}
pub fn set_capabilities(
mut self,
input: std::option::Option<crate::model::AttendeeCapabilities>,
) -> Self {
self.capabilities = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateAttendeeInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateAttendeeInput {
meeting_id: self.meeting_id,
external_user_id: self.external_user_id,
capabilities: self.capabilities,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("meeting_id", &self.meeting_id);
formatter.field("external_user_id", &"*** Sensitive Data Redacted ***");
formatter.field("capabilities", &self.capabilities);
formatter.finish()
}
}
}
impl CreateAttendeeInput {
#[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::CreateAttendee,
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::CreateAttendeeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.meeting_id;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateAttendeeInput,
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_attendee(&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::CreateAttendee::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateAttendee",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_attendee_input::Builder {
crate::input::create_attendee_input::Builder::default()
}
}
pub mod create_meeting_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) media_region: std::option::Option<std::string::String>,
pub(crate) meeting_host_id: std::option::Option<std::string::String>,
pub(crate) external_meeting_id: std::option::Option<std::string::String>,
pub(crate) notifications_configuration:
std::option::Option<crate::model::NotificationsConfiguration>,
pub(crate) meeting_features:
std::option::Option<crate::model::MeetingFeaturesConfiguration>,
pub(crate) primary_meeting_id: std::option::Option<std::string::String>,
pub(crate) tenant_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn media_region(mut self, input: impl Into<std::string::String>) -> Self {
self.media_region = Some(input.into());
self
}
pub fn set_media_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.media_region = input;
self
}
pub fn meeting_host_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_host_id = Some(input.into());
self
}
pub fn set_meeting_host_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.meeting_host_id = input;
self
}
pub fn external_meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.external_meeting_id = Some(input.into());
self
}
pub fn set_external_meeting_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.external_meeting_id = input;
self
}
pub fn notifications_configuration(
mut self,
input: crate::model::NotificationsConfiguration,
) -> Self {
self.notifications_configuration = Some(input);
self
}
pub fn set_notifications_configuration(
mut self,
input: std::option::Option<crate::model::NotificationsConfiguration>,
) -> Self {
self.notifications_configuration = input;
self
}
pub fn meeting_features(
mut self,
input: crate::model::MeetingFeaturesConfiguration,
) -> Self {
self.meeting_features = Some(input);
self
}
pub fn set_meeting_features(
mut self,
input: std::option::Option<crate::model::MeetingFeaturesConfiguration>,
) -> Self {
self.meeting_features = input;
self
}
pub fn primary_meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.primary_meeting_id = Some(input.into());
self
}
pub fn set_primary_meeting_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.primary_meeting_id = input;
self
}
pub fn tenant_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tenant_ids.unwrap_or_default();
v.push(input.into());
self.tenant_ids = Some(v);
self
}
pub fn set_tenant_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tenant_ids = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateMeetingInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateMeetingInput {
client_request_token: self.client_request_token,
media_region: self.media_region,
meeting_host_id: self.meeting_host_id,
external_meeting_id: self.external_meeting_id,
notifications_configuration: self.notifications_configuration,
meeting_features: self.meeting_features,
primary_meeting_id: self.primary_meeting_id,
tenant_ids: self.tenant_ids,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_request_token", &"*** Sensitive Data Redacted ***");
formatter.field("media_region", &self.media_region);
formatter.field("meeting_host_id", &"*** Sensitive Data Redacted ***");
formatter.field("external_meeting_id", &"*** Sensitive Data Redacted ***");
formatter.field(
"notifications_configuration",
&self.notifications_configuration,
);
formatter.field("meeting_features", &self.meeting_features);
formatter.field("primary_meeting_id", &self.primary_meeting_id);
formatter.field("tenant_ids", &self.tenant_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateMeetingInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateMeeting,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateMeetingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/meetings").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateMeetingInput,
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_meeting(&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::CreateMeeting::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateMeeting",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_meeting_input::Builder {
crate::input::create_meeting_input::Builder::default()
}
}
pub mod create_meeting_with_attendees_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_request_token: std::option::Option<std::string::String>,
pub(crate) media_region: std::option::Option<std::string::String>,
pub(crate) meeting_host_id: std::option::Option<std::string::String>,
pub(crate) external_meeting_id: std::option::Option<std::string::String>,
pub(crate) meeting_features:
std::option::Option<crate::model::MeetingFeaturesConfiguration>,
pub(crate) notifications_configuration:
std::option::Option<crate::model::NotificationsConfiguration>,
pub(crate) attendees:
std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
pub(crate) primary_meeting_id: std::option::Option<std::string::String>,
pub(crate) tenant_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_request_token = Some(input.into());
self
}
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.client_request_token = input;
self
}
pub fn media_region(mut self, input: impl Into<std::string::String>) -> Self {
self.media_region = Some(input.into());
self
}
pub fn set_media_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.media_region = input;
self
}
pub fn meeting_host_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_host_id = Some(input.into());
self
}
pub fn set_meeting_host_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.meeting_host_id = input;
self
}
pub fn external_meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.external_meeting_id = Some(input.into());
self
}
pub fn set_external_meeting_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.external_meeting_id = input;
self
}
pub fn meeting_features(
mut self,
input: crate::model::MeetingFeaturesConfiguration,
) -> Self {
self.meeting_features = Some(input);
self
}
pub fn set_meeting_features(
mut self,
input: std::option::Option<crate::model::MeetingFeaturesConfiguration>,
) -> Self {
self.meeting_features = input;
self
}
pub fn notifications_configuration(
mut self,
input: crate::model::NotificationsConfiguration,
) -> Self {
self.notifications_configuration = Some(input);
self
}
pub fn set_notifications_configuration(
mut self,
input: std::option::Option<crate::model::NotificationsConfiguration>,
) -> Self {
self.notifications_configuration = input;
self
}
pub fn attendees(mut self, input: crate::model::CreateAttendeeRequestItem) -> Self {
let mut v = self.attendees.unwrap_or_default();
v.push(input);
self.attendees = Some(v);
self
}
pub fn set_attendees(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
) -> Self {
self.attendees = input;
self
}
pub fn primary_meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.primary_meeting_id = Some(input.into());
self
}
pub fn set_primary_meeting_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.primary_meeting_id = input;
self
}
pub fn tenant_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tenant_ids.unwrap_or_default();
v.push(input.into());
self.tenant_ids = Some(v);
self
}
pub fn set_tenant_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tenant_ids = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateMeetingWithAttendeesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateMeetingWithAttendeesInput {
client_request_token: self.client_request_token,
media_region: self.media_region,
meeting_host_id: self.meeting_host_id,
external_meeting_id: self.external_meeting_id,
meeting_features: self.meeting_features,
notifications_configuration: self.notifications_configuration,
attendees: self.attendees,
primary_meeting_id: self.primary_meeting_id,
tenant_ids: self.tenant_ids,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_request_token", &"*** Sensitive Data Redacted ***");
formatter.field("media_region", &self.media_region);
formatter.field("meeting_host_id", &"*** Sensitive Data Redacted ***");
formatter.field("external_meeting_id", &"*** Sensitive Data Redacted ***");
formatter.field("meeting_features", &self.meeting_features);
formatter.field(
"notifications_configuration",
&self.notifications_configuration,
);
formatter.field("attendees", &self.attendees);
formatter.field("primary_meeting_id", &self.primary_meeting_id);
formatter.field("tenant_ids", &self.tenant_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateMeetingWithAttendeesInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateMeetingWithAttendees,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_request_token.is_none() {
self.client_request_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateMeetingWithAttendeesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/meetings").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::CreateMeetingWithAttendeesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "create-attendees");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateMeetingWithAttendeesInput,
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("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_meeting_with_attendees(&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::CreateMeetingWithAttendees::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateMeetingWithAttendees",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_meeting_with_attendees_input::Builder {
crate::input::create_meeting_with_attendees_input::Builder::default()
}
}
pub mod delete_attendee_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) attendee_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn attendee_id(mut self, input: impl Into<std::string::String>) -> Self {
self.attendee_id = Some(input.into());
self
}
pub fn set_attendee_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.attendee_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteAttendeeInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteAttendeeInput {
meeting_id: self.meeting_id,
attendee_id: self.attendee_id,
})
}
}
}
impl DeleteAttendeeInput {
#[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::DeleteAttendee,
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::DeleteAttendeeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.meeting_id;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
let input_5 = &_input.attendee_id;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
)
})?;
let attendee_id = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if attendee_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees/{AttendeeId}",
MeetingId = meeting_id,
AttendeeId = attendee_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteAttendeeInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteAttendee::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteAttendee",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_attendee_input::Builder {
crate::input::delete_attendee_input::Builder::default()
}
}
pub mod delete_meeting_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteMeetingInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteMeetingInput {
meeting_id: self.meeting_id,
})
}
}
}
impl DeleteMeetingInput {
#[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::DeleteMeeting,
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::DeleteMeetingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_6 = &_input.meeting_id;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(output, "/meetings/{MeetingId}", MeetingId = meeting_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteMeetingInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteMeeting::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteMeeting",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_meeting_input::Builder {
crate::input::delete_meeting_input::Builder::default()
}
}
pub mod get_attendee_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) attendee_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn attendee_id(mut self, input: impl Into<std::string::String>) -> Self {
self.attendee_id = Some(input.into());
self
}
pub fn set_attendee_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.attendee_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetAttendeeInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetAttendeeInput {
meeting_id: self.meeting_id,
attendee_id: self.attendee_id,
})
}
}
}
impl GetAttendeeInput {
#[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::GetAttendee,
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::GetAttendeeInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_7 = &_input.meeting_id;
let input_7 = input_7.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_7,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
let input_8 = &_input.attendee_id;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
)
})?;
let attendee_id = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if attendee_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees/{AttendeeId}",
MeetingId = meeting_id,
AttendeeId = attendee_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetAttendeeInput,
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::GetAttendee::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetAttendee",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_attendee_input::Builder {
crate::input::get_attendee_input::Builder::default()
}
}
pub mod get_meeting_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetMeetingInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetMeetingInput {
meeting_id: self.meeting_id,
})
}
}
}
impl GetMeetingInput {
#[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::GetMeeting,
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::GetMeetingInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_9 = &_input.meeting_id;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(output, "/meetings/{MeetingId}", MeetingId = meeting_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetMeetingInput,
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::GetMeeting::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetMeeting",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_meeting_input::Builder {
crate::input::get_meeting_input::Builder::default()
}
}
pub mod list_attendees_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListAttendeesInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListAttendeesInput {
meeting_id: self.meeting_id,
next_token: self.next_token,
max_results: self.max_results,
})
}
}
}
impl ListAttendeesInput {
#[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::ListAttendees,
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::ListAttendeesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_10 = &_input.meeting_id;
let input_10 = input_10.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_10,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAttendeesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_11) = &_input.next_token {
{
query.push_kv("next-token", &aws_smithy_http::query::fmt_string(&inner_11));
}
}
if let Some(inner_12) = &_input.max_results {
if *inner_12 != 0 {
query.push_kv(
"max-results",
aws_smithy_types::primitive::Encoder::from(*inner_12).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAttendeesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListAttendees::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAttendees",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_attendees_input::Builder {
crate::input::list_attendees_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> {
write!(output, "/tags").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListTagsForResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_13 = &_input.resource_arn;
let inner_13 = inner_13.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
if inner_13.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
query.push_kv("arn", &aws_smithy_http::query::fmt_string(&inner_13));
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)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"chimesdkmeetings",
));
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 start_meeting_transcription_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) transcription_configuration:
std::option::Option<crate::model::TranscriptionConfiguration>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn transcription_configuration(
mut self,
input: crate::model::TranscriptionConfiguration,
) -> Self {
self.transcription_configuration = Some(input);
self
}
pub fn set_transcription_configuration(
mut self,
input: std::option::Option<crate::model::TranscriptionConfiguration>,
) -> Self {
self.transcription_configuration = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartMeetingTranscriptionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartMeetingTranscriptionInput {
meeting_id: self.meeting_id,
transcription_configuration: self.transcription_configuration,
})
}
}
}
impl StartMeetingTranscriptionInput {
#[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::StartMeetingTranscription,
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::StartMeetingTranscriptionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_14 = &_input.meeting_id;
let input_14 = input_14.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_14,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/transcription",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::StartMeetingTranscriptionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "start");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartMeetingTranscriptionInput,
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("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_meeting_transcription(
&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::StartMeetingTranscription::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartMeetingTranscription",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_meeting_transcription_input::Builder {
crate::input::start_meeting_transcription_input::Builder::default()
}
}
pub mod stop_meeting_transcription_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StopMeetingTranscriptionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StopMeetingTranscriptionInput {
meeting_id: self.meeting_id,
})
}
}
}
impl StopMeetingTranscriptionInput {
#[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::StopMeetingTranscription,
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::StopMeetingTranscriptionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_15 = &_input.meeting_id;
let input_15 = input_15.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_15,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/transcription",
MeetingId = meeting_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::StopMeetingTranscriptionInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "stop");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopMeetingTranscriptionInput,
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("POST").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::StopMeetingTranscription::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopMeetingTranscription",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::stop_meeting_transcription_input::Builder {
crate::input::stop_meeting_transcription_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::vec::Vec<crate::model::Tag>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(mut self, input: crate::model::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> 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> {
write!(output, "/tags").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::TagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
query.push_kv("operation", "tag-resource");
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)?;
uri_query(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/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",
"chimesdkmeetings",
));
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> {
write!(output, "/tags").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);
query.push_kv("operation", "untag-resource");
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("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_untag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(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",
"chimesdkmeetings",
));
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_attendee_capabilities_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) meeting_id: std::option::Option<std::string::String>,
pub(crate) attendee_id: std::option::Option<std::string::String>,
pub(crate) capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl Builder {
pub fn meeting_id(mut self, input: impl Into<std::string::String>) -> Self {
self.meeting_id = Some(input.into());
self
}
pub fn set_meeting_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.meeting_id = input;
self
}
pub fn attendee_id(mut self, input: impl Into<std::string::String>) -> Self {
self.attendee_id = Some(input.into());
self
}
pub fn set_attendee_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.attendee_id = input;
self
}
pub fn capabilities(mut self, input: crate::model::AttendeeCapabilities) -> Self {
self.capabilities = Some(input);
self
}
pub fn set_capabilities(
mut self,
input: std::option::Option<crate::model::AttendeeCapabilities>,
) -> Self {
self.capabilities = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateAttendeeCapabilitiesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateAttendeeCapabilitiesInput {
meeting_id: self.meeting_id,
attendee_id: self.attendee_id,
capabilities: self.capabilities,
})
}
}
}
impl UpdateAttendeeCapabilitiesInput {
#[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::UpdateAttendeeCapabilities,
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::UpdateAttendeeCapabilitiesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_16 = &_input.meeting_id;
let input_16 = input_16.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
)
})?;
let meeting_id = aws_smithy_http::label::fmt_string(
input_16,
aws_smithy_http::label::EncodingStrategy::Default,
);
if meeting_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"meeting_id",
"cannot be empty or unset",
),
);
}
let input_17 = &_input.attendee_id;
let input_17 = input_17.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
)
})?;
let attendee_id = aws_smithy_http::label::fmt_string(
input_17,
aws_smithy_http::label::EncodingStrategy::Default,
);
if attendee_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"attendee_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/meetings/{MeetingId}/attendees/{AttendeeId}/capabilities",
MeetingId = meeting_id,
AttendeeId = attendee_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateAttendeeCapabilitiesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_attendee_capabilities(
&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::UpdateAttendeeCapabilities::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateAttendeeCapabilities",
"chimesdkmeetings",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_attendee_capabilities_input::Builder {
crate::input::update_attendee_capabilities_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateAttendeeCapabilitiesInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attendee_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl UpdateAttendeeCapabilitiesInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn attendee_id(&self) -> std::option::Option<&str> {
self.attendee_id.as_deref()
}
pub fn capabilities(&self) -> std::option::Option<&crate::model::AttendeeCapabilities> {
self.capabilities.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::vec::Vec<crate::model::Tag>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StopMeetingTranscriptionInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
}
impl StopMeetingTranscriptionInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartMeetingTranscriptionInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub transcription_configuration: std::option::Option<crate::model::TranscriptionConfiguration>,
}
impl StartMeetingTranscriptionInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn transcription_configuration(
&self,
) -> std::option::Option<&crate::model::TranscriptionConfiguration> {
self.transcription_configuration.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 ListAttendeesInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
}
impl ListAttendeesInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetMeetingInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
}
impl GetMeetingInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetAttendeeInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attendee_id: std::option::Option<std::string::String>,
}
impl GetAttendeeInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn attendee_id(&self) -> std::option::Option<&str> {
self.attendee_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteMeetingInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
}
impl DeleteMeetingInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteAttendeeInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attendee_id: std::option::Option<std::string::String>,
}
impl DeleteAttendeeInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn attendee_id(&self) -> std::option::Option<&str> {
self.attendee_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateMeetingWithAttendeesInput {
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub media_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub meeting_host_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub external_meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub meeting_features: std::option::Option<crate::model::MeetingFeaturesConfiguration>,
#[doc(hidden)]
pub notifications_configuration: std::option::Option<crate::model::NotificationsConfiguration>,
#[doc(hidden)]
pub attendees: std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
#[doc(hidden)]
pub primary_meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tenant_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateMeetingWithAttendeesInput {
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn media_region(&self) -> std::option::Option<&str> {
self.media_region.as_deref()
}
pub fn meeting_host_id(&self) -> std::option::Option<&str> {
self.meeting_host_id.as_deref()
}
pub fn external_meeting_id(&self) -> std::option::Option<&str> {
self.external_meeting_id.as_deref()
}
pub fn meeting_features(
&self,
) -> std::option::Option<&crate::model::MeetingFeaturesConfiguration> {
self.meeting_features.as_ref()
}
pub fn notifications_configuration(
&self,
) -> std::option::Option<&crate::model::NotificationsConfiguration> {
self.notifications_configuration.as_ref()
}
pub fn attendees(&self) -> std::option::Option<&[crate::model::CreateAttendeeRequestItem]> {
self.attendees.as_deref()
}
pub fn primary_meeting_id(&self) -> std::option::Option<&str> {
self.primary_meeting_id.as_deref()
}
pub fn tenant_ids(&self) -> std::option::Option<&[std::string::String]> {
self.tenant_ids.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateMeetingWithAttendeesInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateMeetingWithAttendeesInput");
formatter.field("client_request_token", &"*** Sensitive Data Redacted ***");
formatter.field("media_region", &self.media_region);
formatter.field("meeting_host_id", &"*** Sensitive Data Redacted ***");
formatter.field("external_meeting_id", &"*** Sensitive Data Redacted ***");
formatter.field("meeting_features", &self.meeting_features);
formatter.field(
"notifications_configuration",
&self.notifications_configuration,
);
formatter.field("attendees", &self.attendees);
formatter.field("primary_meeting_id", &self.primary_meeting_id);
formatter.field("tenant_ids", &self.tenant_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateMeetingInput {
#[doc(hidden)]
pub client_request_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub media_region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub meeting_host_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub external_meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub notifications_configuration: std::option::Option<crate::model::NotificationsConfiguration>,
#[doc(hidden)]
pub meeting_features: std::option::Option<crate::model::MeetingFeaturesConfiguration>,
#[doc(hidden)]
pub primary_meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tenant_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::model::Tag>>,
}
impl CreateMeetingInput {
pub fn client_request_token(&self) -> std::option::Option<&str> {
self.client_request_token.as_deref()
}
pub fn media_region(&self) -> std::option::Option<&str> {
self.media_region.as_deref()
}
pub fn meeting_host_id(&self) -> std::option::Option<&str> {
self.meeting_host_id.as_deref()
}
pub fn external_meeting_id(&self) -> std::option::Option<&str> {
self.external_meeting_id.as_deref()
}
pub fn notifications_configuration(
&self,
) -> std::option::Option<&crate::model::NotificationsConfiguration> {
self.notifications_configuration.as_ref()
}
pub fn meeting_features(
&self,
) -> std::option::Option<&crate::model::MeetingFeaturesConfiguration> {
self.meeting_features.as_ref()
}
pub fn primary_meeting_id(&self) -> std::option::Option<&str> {
self.primary_meeting_id.as_deref()
}
pub fn tenant_ids(&self) -> std::option::Option<&[std::string::String]> {
self.tenant_ids.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::model::Tag]> {
self.tags.as_deref()
}
}
impl std::fmt::Debug for CreateMeetingInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateMeetingInput");
formatter.field("client_request_token", &"*** Sensitive Data Redacted ***");
formatter.field("media_region", &self.media_region);
formatter.field("meeting_host_id", &"*** Sensitive Data Redacted ***");
formatter.field("external_meeting_id", &"*** Sensitive Data Redacted ***");
formatter.field(
"notifications_configuration",
&self.notifications_configuration,
);
formatter.field("meeting_features", &self.meeting_features);
formatter.field("primary_meeting_id", &self.primary_meeting_id);
formatter.field("tenant_ids", &self.tenant_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateAttendeeInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub external_user_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl CreateAttendeeInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn external_user_id(&self) -> std::option::Option<&str> {
self.external_user_id.as_deref()
}
pub fn capabilities(&self) -> std::option::Option<&crate::model::AttendeeCapabilities> {
self.capabilities.as_ref()
}
}
impl std::fmt::Debug for CreateAttendeeInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateAttendeeInput");
formatter.field("meeting_id", &self.meeting_id);
formatter.field("external_user_id", &"*** Sensitive Data Redacted ***");
formatter.field("capabilities", &self.capabilities);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchUpdateAttendeeCapabilitiesExceptInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub excluded_attendee_ids: std::option::Option<std::vec::Vec<crate::model::AttendeeIdItem>>,
#[doc(hidden)]
pub capabilities: std::option::Option<crate::model::AttendeeCapabilities>,
}
impl BatchUpdateAttendeeCapabilitiesExceptInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn excluded_attendee_ids(&self) -> std::option::Option<&[crate::model::AttendeeIdItem]> {
self.excluded_attendee_ids.as_deref()
}
pub fn capabilities(&self) -> std::option::Option<&crate::model::AttendeeCapabilities> {
self.capabilities.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchCreateAttendeeInput {
#[doc(hidden)]
pub meeting_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub attendees: std::option::Option<std::vec::Vec<crate::model::CreateAttendeeRequestItem>>,
}
impl BatchCreateAttendeeInput {
pub fn meeting_id(&self) -> std::option::Option<&str> {
self.meeting_id.as_deref()
}
pub fn attendees(&self) -> std::option::Option<&[crate::model::CreateAttendeeRequestItem]> {
self.attendees.as_deref()
}
}