use std::fmt::Write;
pub mod create_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateGroupInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateGroupInput {
identity_store_id: self.identity_store_id,
display_name: self.display_name,
description: self.description,
})
}
}
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("identity_store_id", &self.identity_store_id);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl CreateGroupInput {
#[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::CreateGroup,
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::CreateGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateGroupInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.CreateGroup",
);
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_group(&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::CreateGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateGroup",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_group_input::Builder {
crate::input::create_group_input::Builder::default()
}
}
pub mod create_group_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
pub(crate) member_id: std::option::Option<crate::model::MemberId>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn member_id(mut self, input: crate::model::MemberId) -> Self {
self.member_id = Some(input);
self
}
pub fn set_member_id(mut self, input: std::option::Option<crate::model::MemberId>) -> Self {
self.member_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateGroupMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateGroupMembershipInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
member_id: self.member_id,
})
}
}
}
impl CreateGroupMembershipInput {
#[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::CreateGroupMembership,
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::CreateGroupMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateGroupMembershipInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.CreateGroupMembership",
);
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_group_membership(
&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::CreateGroupMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateGroupMembership",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_group_membership_input::Builder {
crate::input::create_group_membership_input::Builder::default()
}
}
pub mod create_user_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) user_name: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<crate::model::Name>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) nick_name: std::option::Option<std::string::String>,
pub(crate) profile_url: std::option::Option<std::string::String>,
pub(crate) emails: std::option::Option<std::vec::Vec<crate::model::Email>>,
pub(crate) addresses: std::option::Option<std::vec::Vec<crate::model::Address>>,
pub(crate) phone_numbers: std::option::Option<std::vec::Vec<crate::model::PhoneNumber>>,
pub(crate) user_type: std::option::Option<std::string::String>,
pub(crate) title: std::option::Option<std::string::String>,
pub(crate) preferred_language: std::option::Option<std::string::String>,
pub(crate) locale: std::option::Option<std::string::String>,
pub(crate) timezone: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn user_name(mut self, input: impl Into<std::string::String>) -> Self {
self.user_name = Some(input.into());
self
}
pub fn set_user_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_name = input;
self
}
pub fn name(mut self, input: crate::model::Name) -> Self {
self.name = Some(input);
self
}
pub fn set_name(mut self, input: std::option::Option<crate::model::Name>) -> Self {
self.name = input;
self
}
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.display_name = Some(input.into());
self
}
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn nick_name(mut self, input: impl Into<std::string::String>) -> Self {
self.nick_name = Some(input.into());
self
}
pub fn set_nick_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.nick_name = input;
self
}
pub fn profile_url(mut self, input: impl Into<std::string::String>) -> Self {
self.profile_url = Some(input.into());
self
}
pub fn set_profile_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.profile_url = input;
self
}
pub fn emails(mut self, input: crate::model::Email) -> Self {
let mut v = self.emails.unwrap_or_default();
v.push(input);
self.emails = Some(v);
self
}
pub fn set_emails(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Email>>,
) -> Self {
self.emails = input;
self
}
pub fn addresses(mut self, input: crate::model::Address) -> Self {
let mut v = self.addresses.unwrap_or_default();
v.push(input);
self.addresses = Some(v);
self
}
pub fn set_addresses(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Address>>,
) -> Self {
self.addresses = input;
self
}
pub fn phone_numbers(mut self, input: crate::model::PhoneNumber) -> Self {
let mut v = self.phone_numbers.unwrap_or_default();
v.push(input);
self.phone_numbers = Some(v);
self
}
pub fn set_phone_numbers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PhoneNumber>>,
) -> Self {
self.phone_numbers = input;
self
}
pub fn user_type(mut self, input: impl Into<std::string::String>) -> Self {
self.user_type = Some(input.into());
self
}
pub fn set_user_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_type = input;
self
}
pub fn title(mut self, input: impl Into<std::string::String>) -> Self {
self.title = Some(input.into());
self
}
pub fn set_title(mut self, input: std::option::Option<std::string::String>) -> Self {
self.title = input;
self
}
pub fn preferred_language(mut self, input: impl Into<std::string::String>) -> Self {
self.preferred_language = Some(input.into());
self
}
pub fn set_preferred_language(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.preferred_language = input;
self
}
pub fn locale(mut self, input: impl Into<std::string::String>) -> Self {
self.locale = Some(input.into());
self
}
pub fn set_locale(mut self, input: std::option::Option<std::string::String>) -> Self {
self.locale = input;
self
}
pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
self.timezone = Some(input.into());
self
}
pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
self.timezone = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateUserInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateUserInput {
identity_store_id: self.identity_store_id,
user_name: self.user_name,
name: self.name,
display_name: self.display_name,
nick_name: self.nick_name,
profile_url: self.profile_url,
emails: self.emails,
addresses: self.addresses,
phone_numbers: self.phone_numbers,
user_type: self.user_type,
title: self.title,
preferred_language: self.preferred_language,
locale: self.locale,
timezone: self.timezone,
})
}
}
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("identity_store_id", &self.identity_store_id);
formatter.field("user_name", &"*** Sensitive Data Redacted ***");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("nick_name", &"*** Sensitive Data Redacted ***");
formatter.field("profile_url", &"*** Sensitive Data Redacted ***");
formatter.field("emails", &self.emails);
formatter.field("addresses", &self.addresses);
formatter.field("phone_numbers", &self.phone_numbers);
formatter.field("user_type", &"*** Sensitive Data Redacted ***");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("preferred_language", &"*** Sensitive Data Redacted ***");
formatter.field("locale", &"*** Sensitive Data Redacted ***");
formatter.field("timezone", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
}
impl CreateUserInput {
#[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::CreateUser,
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::CreateUserInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateUserInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.CreateUser",
);
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_user(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::CreateUser::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateUser",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_user_input::Builder {
crate::input::create_user_input::Builder::default()
}
}
pub mod delete_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteGroupInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteGroupInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
})
}
}
}
impl DeleteGroupInput {
#[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::DeleteGroup,
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::DeleteGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteGroupInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DeleteGroup",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_group(&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::DeleteGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteGroup",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_group_input::Builder {
crate::input::delete_group_input::Builder::default()
}
}
pub mod delete_group_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) membership_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn membership_id(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_id = Some(input.into());
self
}
pub fn set_membership_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteGroupMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteGroupMembershipInput {
identity_store_id: self.identity_store_id,
membership_id: self.membership_id,
})
}
}
}
impl DeleteGroupMembershipInput {
#[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::DeleteGroupMembership,
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::DeleteGroupMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteGroupMembershipInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DeleteGroupMembership",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_group_membership(
&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::DeleteGroupMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteGroupMembership",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_group_membership_input::Builder {
crate::input::delete_group_membership_input::Builder::default()
}
}
pub mod delete_user_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) user_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteUserInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteUserInput {
identity_store_id: self.identity_store_id,
user_id: self.user_id,
})
}
}
}
impl DeleteUserInput {
#[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::DeleteUser,
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::DeleteUserInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteUserInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DeleteUser",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_delete_user(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteUser::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteUser",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_user_input::Builder {
crate::input::delete_user_input::Builder::default()
}
}
pub mod describe_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeGroupInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeGroupInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
})
}
}
}
impl DescribeGroupInput {
#[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::DescribeGroup,
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::DescribeGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeGroupInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DescribeGroup",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_group(&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::DescribeGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeGroup",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_group_input::Builder {
crate::input::describe_group_input::Builder::default()
}
}
pub mod describe_group_membership_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) membership_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn membership_id(mut self, input: impl Into<std::string::String>) -> Self {
self.membership_id = Some(input.into());
self
}
pub fn set_membership_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.membership_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DescribeGroupMembershipInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DescribeGroupMembershipInput {
identity_store_id: self.identity_store_id,
membership_id: self.membership_id,
})
}
}
}
impl DescribeGroupMembershipInput {
#[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::DescribeGroupMembership,
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::DescribeGroupMembershipInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeGroupMembershipInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DescribeGroupMembership",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_group_membership(
&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::DescribeGroupMembership::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeGroupMembership",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_group_membership_input::Builder {
crate::input::describe_group_membership_input::Builder::default()
}
}
pub mod describe_user_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) user_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DescribeUserInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DescribeUserInput {
identity_store_id: self.identity_store_id,
user_id: self.user_id,
})
}
}
}
impl DescribeUserInput {
#[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::DescribeUser,
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::DescribeUserInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeUserInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.DescribeUser",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_describe_user(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeUser::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeUser",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::describe_user_input::Builder {
crate::input::describe_user_input::Builder::default()
}
}
pub mod get_group_id_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) alternate_identifier: std::option::Option<crate::model::AlternateIdentifier>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn alternate_identifier(mut self, input: crate::model::AlternateIdentifier) -> Self {
self.alternate_identifier = Some(input);
self
}
pub fn set_alternate_identifier(
mut self,
input: std::option::Option<crate::model::AlternateIdentifier>,
) -> Self {
self.alternate_identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetGroupIdInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetGroupIdInput {
identity_store_id: self.identity_store_id,
alternate_identifier: self.alternate_identifier,
})
}
}
}
impl GetGroupIdInput {
#[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::GetGroupId,
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::GetGroupIdInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetGroupIdInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.GetGroupId",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_group_id(&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::GetGroupId::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetGroupId",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_group_id_input::Builder {
crate::input::get_group_id_input::Builder::default()
}
}
pub mod get_group_membership_id_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
pub(crate) member_id: std::option::Option<crate::model::MemberId>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn member_id(mut self, input: crate::model::MemberId) -> Self {
self.member_id = Some(input);
self
}
pub fn set_member_id(mut self, input: std::option::Option<crate::model::MemberId>) -> Self {
self.member_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetGroupMembershipIdInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetGroupMembershipIdInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
member_id: self.member_id,
})
}
}
}
impl GetGroupMembershipIdInput {
#[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::GetGroupMembershipId,
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::GetGroupMembershipIdInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetGroupMembershipIdInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.GetGroupMembershipId",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_group_membership_id(
&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::GetGroupMembershipId::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetGroupMembershipId",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_group_membership_id_input::Builder {
crate::input::get_group_membership_id_input::Builder::default()
}
}
pub mod get_user_id_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) alternate_identifier: std::option::Option<crate::model::AlternateIdentifier>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn alternate_identifier(mut self, input: crate::model::AlternateIdentifier) -> Self {
self.alternate_identifier = Some(input);
self
}
pub fn set_alternate_identifier(
mut self,
input: std::option::Option<crate::model::AlternateIdentifier>,
) -> Self {
self.alternate_identifier = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetUserIdInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetUserIdInput {
identity_store_id: self.identity_store_id,
alternate_identifier: self.alternate_identifier,
})
}
}
}
impl GetUserIdInput {
#[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::GetUserId,
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::GetUserIdInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetUserIdInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.GetUserId",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_get_user_id(&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::GetUserId::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetUserId",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_user_id_input::Builder {
crate::input::get_user_id_input::Builder::default()
}
}
pub mod is_member_in_groups_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) member_id: std::option::Option<crate::model::MemberId>,
pub(crate) group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn member_id(mut self, input: crate::model::MemberId) -> Self {
self.member_id = Some(input);
self
}
pub fn set_member_id(mut self, input: std::option::Option<crate::model::MemberId>) -> Self {
self.member_id = input;
self
}
pub fn group_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.group_ids.unwrap_or_default();
v.push(input.into());
self.group_ids = Some(v);
self
}
pub fn set_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.group_ids = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::IsMemberInGroupsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::IsMemberInGroupsInput {
identity_store_id: self.identity_store_id,
member_id: self.member_id,
group_ids: self.group_ids,
})
}
}
}
impl IsMemberInGroupsInput {
#[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::IsMemberInGroups,
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::IsMemberInGroupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::IsMemberInGroupsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.IsMemberInGroups",
);
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_is_member_in_groups(&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::IsMemberInGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"IsMemberInGroups",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::is_member_in_groups_input::Builder {
crate::input::is_member_in_groups_input::Builder::default()
}
}
pub mod list_group_memberships_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListGroupMembershipsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListGroupMembershipsInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListGroupMembershipsInput {
#[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::ListGroupMemberships,
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::ListGroupMembershipsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListGroupMembershipsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.ListGroupMemberships",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_group_memberships(
&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::ListGroupMemberships::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListGroupMemberships",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_group_memberships_input::Builder {
crate::input::list_group_memberships_input::Builder::default()
}
}
pub mod list_group_memberships_for_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) member_id: std::option::Option<crate::model::MemberId>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn member_id(mut self, input: crate::model::MemberId) -> Self {
self.member_id = Some(input);
self
}
pub fn set_member_id(mut self, input: std::option::Option<crate::model::MemberId>) -> Self {
self.member_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListGroupMembershipsForMemberInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListGroupMembershipsForMemberInput {
identity_store_id: self.identity_store_id,
member_id: self.member_id,
max_results: self.max_results,
next_token: self.next_token,
})
}
}
}
impl ListGroupMembershipsForMemberInput {
#[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::ListGroupMembershipsForMember,
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::ListGroupMembershipsForMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListGroupMembershipsForMemberInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.ListGroupMembershipsForMember",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_group_memberships_for_member(&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::ListGroupMembershipsForMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListGroupMembershipsForMember",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_group_memberships_for_member_input::Builder {
crate::input::list_group_memberships_for_member_input::Builder::default()
}
}
pub mod list_groups_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
#[deprecated(
note = "Using filters with ListGroups API is deprecated, please use GetGroupId API instead."
)]
pub fn filters(mut self, input: crate::model::Filter) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input);
self.filters = Some(v);
self
}
#[deprecated(
note = "Using filters with ListGroups API is deprecated, please use GetGroupId API instead."
)]
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListGroupsInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListGroupsInput {
identity_store_id: self.identity_store_id,
max_results: self.max_results,
next_token: self.next_token,
filters: self.filters,
})
}
}
}
impl ListGroupsInput {
#[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::ListGroups,
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::ListGroupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListGroupsInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.ListGroups",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_groups(&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::ListGroups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListGroups",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_groups_input::Builder {
crate::input::list_groups_input::Builder::default()
}
}
pub mod list_users_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = Some(input);
self
}
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
#[deprecated(
note = "Using filters with ListUsers API is deprecated, please use GetGroupId API instead."
)]
pub fn filters(mut self, input: crate::model::Filter) -> Self {
let mut v = self.filters.unwrap_or_default();
v.push(input);
self.filters = Some(v);
self
}
#[deprecated(
note = "Using filters with ListUsers API is deprecated, please use GetGroupId API instead."
)]
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
) -> Self {
self.filters = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListUsersInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListUsersInput {
identity_store_id: self.identity_store_id,
max_results: self.max_results,
next_token: self.next_token,
filters: self.filters,
})
}
}
}
impl ListUsersInput {
#[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::ListUsers,
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::ListUsersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListUsersInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.ListUsers",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_list_users(&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::ListUsers::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListUsers",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_users_input::Builder {
crate::input::list_users_input::Builder::default()
}
}
pub mod update_group_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) group_id: std::option::Option<std::string::String>,
pub(crate) operations: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.group_id = Some(input.into());
self
}
pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.group_id = input;
self
}
pub fn operations(mut self, input: crate::model::AttributeOperation) -> Self {
let mut v = self.operations.unwrap_or_default();
v.push(input);
self.operations = Some(v);
self
}
pub fn set_operations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
) -> Self {
self.operations = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateGroupInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateGroupInput {
identity_store_id: self.identity_store_id,
group_id: self.group_id,
operations: self.operations,
})
}
}
}
impl UpdateGroupInput {
#[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::UpdateGroup,
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::UpdateGroupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateGroupInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.UpdateGroup",
);
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_group(&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::UpdateGroup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateGroup",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_group_input::Builder {
crate::input::update_group_input::Builder::default()
}
}
pub mod update_user_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) user_id: std::option::Option<std::string::String>,
pub(crate) operations: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
}
impl Builder {
pub fn identity_store_id(mut self, input: impl Into<std::string::String>) -> Self {
self.identity_store_id = Some(input.into());
self
}
pub fn set_identity_store_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.identity_store_id = input;
self
}
pub fn user_id(mut self, input: impl Into<std::string::String>) -> Self {
self.user_id = Some(input.into());
self
}
pub fn set_user_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.user_id = input;
self
}
pub fn operations(mut self, input: crate::model::AttributeOperation) -> Self {
let mut v = self.operations.unwrap_or_default();
v.push(input);
self.operations = Some(v);
self
}
pub fn set_operations(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
) -> Self {
self.operations = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateUserInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateUserInput {
identity_store_id: self.identity_store_id,
user_id: self.user_id,
operations: self.operations,
})
}
}
}
impl UpdateUserInput {
#[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::UpdateUser,
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::UpdateUserInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateUserInput,
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/x-amz-json-1.1",
);
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::HeaderName::from_static("x-amz-target"),
"AWSIdentityStore.UpdateUser",
);
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_user(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UpdateUser::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateUser",
"identitystore",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_user_input::Builder {
crate::input::update_user_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListUsersInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[deprecated(
note = "Using filters with ListUsers API is deprecated, please use GetGroupId API instead."
)]
#[doc(hidden)]
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
}
impl ListUsersInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
#[deprecated(
note = "Using filters with ListUsers API is deprecated, please use GetGroupId API instead."
)]
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateUserInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<crate::model::Name>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub nick_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub profile_url: std::option::Option<std::string::String>,
#[doc(hidden)]
pub emails: std::option::Option<std::vec::Vec<crate::model::Email>>,
#[doc(hidden)]
pub addresses: std::option::Option<std::vec::Vec<crate::model::Address>>,
#[doc(hidden)]
pub phone_numbers: std::option::Option<std::vec::Vec<crate::model::PhoneNumber>>,
#[doc(hidden)]
pub user_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub title: std::option::Option<std::string::String>,
#[doc(hidden)]
pub preferred_language: std::option::Option<std::string::String>,
#[doc(hidden)]
pub locale: std::option::Option<std::string::String>,
#[doc(hidden)]
pub timezone: std::option::Option<std::string::String>,
}
impl CreateUserInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn user_name(&self) -> std::option::Option<&str> {
self.user_name.as_deref()
}
pub fn name(&self) -> std::option::Option<&crate::model::Name> {
self.name.as_ref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn nick_name(&self) -> std::option::Option<&str> {
self.nick_name.as_deref()
}
pub fn profile_url(&self) -> std::option::Option<&str> {
self.profile_url.as_deref()
}
pub fn emails(&self) -> std::option::Option<&[crate::model::Email]> {
self.emails.as_deref()
}
pub fn addresses(&self) -> std::option::Option<&[crate::model::Address]> {
self.addresses.as_deref()
}
pub fn phone_numbers(&self) -> std::option::Option<&[crate::model::PhoneNumber]> {
self.phone_numbers.as_deref()
}
pub fn user_type(&self) -> std::option::Option<&str> {
self.user_type.as_deref()
}
pub fn title(&self) -> std::option::Option<&str> {
self.title.as_deref()
}
pub fn preferred_language(&self) -> std::option::Option<&str> {
self.preferred_language.as_deref()
}
pub fn locale(&self) -> std::option::Option<&str> {
self.locale.as_deref()
}
pub fn timezone(&self) -> std::option::Option<&str> {
self.timezone.as_deref()
}
}
impl std::fmt::Debug for CreateUserInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateUserInput");
formatter.field("identity_store_id", &self.identity_store_id);
formatter.field("user_name", &"*** Sensitive Data Redacted ***");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("nick_name", &"*** Sensitive Data Redacted ***");
formatter.field("profile_url", &"*** Sensitive Data Redacted ***");
formatter.field("emails", &self.emails);
formatter.field("addresses", &self.addresses);
formatter.field("phone_numbers", &self.phone_numbers);
formatter.field("user_type", &"*** Sensitive Data Redacted ***");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("preferred_language", &"*** Sensitive Data Redacted ***");
formatter.field("locale", &"*** Sensitive Data Redacted ***");
formatter.field("timezone", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteUserInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
}
impl DeleteUserInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateUserInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operations: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
}
impl UpdateUserInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
pub fn operations(&self) -> std::option::Option<&[crate::model::AttributeOperation]> {
self.operations.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeUserInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_id: std::option::Option<std::string::String>,
}
impl DescribeUserInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn user_id(&self) -> std::option::Option<&str> {
self.user_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListGroupsInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[deprecated(
note = "Using filters with ListGroups API is deprecated, please use GetGroupId API instead."
)]
#[doc(hidden)]
pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
}
impl ListGroupsInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
#[deprecated(
note = "Using filters with ListGroups API is deprecated, please use GetGroupId API instead."
)]
pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
self.filters.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateGroupInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl CreateGroupInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
impl std::fmt::Debug for CreateGroupInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateGroupInput");
formatter.field("identity_store_id", &self.identity_store_id);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteGroupInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
}
impl DeleteGroupInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateGroupInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub operations: std::option::Option<std::vec::Vec<crate::model::AttributeOperation>>,
}
impl UpdateGroupInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
pub fn operations(&self) -> std::option::Option<&[crate::model::AttributeOperation]> {
self.operations.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeGroupInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
}
impl DescribeGroupInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListGroupMembershipsInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListGroupMembershipsInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateGroupMembershipInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub member_id: std::option::Option<crate::model::MemberId>,
}
impl CreateGroupMembershipInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
pub fn member_id(&self) -> std::option::Option<&crate::model::MemberId> {
self.member_id.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteGroupMembershipInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_id: std::option::Option<std::string::String>,
}
impl DeleteGroupMembershipInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn membership_id(&self) -> std::option::Option<&str> {
self.membership_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeGroupMembershipInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub membership_id: std::option::Option<std::string::String>,
}
impl DescribeGroupMembershipInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn membership_id(&self) -> std::option::Option<&str> {
self.membership_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListGroupMembershipsForMemberInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub member_id: std::option::Option<crate::model::MemberId>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListGroupMembershipsForMemberInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn member_id(&self) -> std::option::Option<&crate::model::MemberId> {
self.member_id.as_ref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IsMemberInGroupsInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub member_id: std::option::Option<crate::model::MemberId>,
#[doc(hidden)]
pub group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl IsMemberInGroupsInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn member_id(&self) -> std::option::Option<&crate::model::MemberId> {
self.member_id.as_ref()
}
pub fn group_ids(&self) -> std::option::Option<&[std::string::String]> {
self.group_ids.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetUserIdInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub alternate_identifier: std::option::Option<crate::model::AlternateIdentifier>,
}
impl GetUserIdInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn alternate_identifier(&self) -> std::option::Option<&crate::model::AlternateIdentifier> {
self.alternate_identifier.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetGroupMembershipIdInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub member_id: std::option::Option<crate::model::MemberId>,
}
impl GetGroupMembershipIdInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn group_id(&self) -> std::option::Option<&str> {
self.group_id.as_deref()
}
pub fn member_id(&self) -> std::option::Option<&crate::model::MemberId> {
self.member_id.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetGroupIdInput {
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub alternate_identifier: std::option::Option<crate::model::AlternateIdentifier>,
}
impl GetGroupIdInput {
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn alternate_identifier(&self) -> std::option::Option<&crate::model::AlternateIdentifier> {
self.alternate_identifier.as_ref()
}
}