use std::fmt::Write;
pub mod accept_eulas_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn eula_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.eula_ids.unwrap_or_default();
v.push(input.into());
self.eula_ids = Some(v);
self
}
pub fn set_eula_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.eula_ids = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::AcceptEulasInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::AcceptEulasInput {
client_token: self.client_token,
eula_ids: self.eula_ids,
studio_id: self.studio_id,
})
}
}
}
impl AcceptEulasInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::AcceptEulas,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::AcceptEulasInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_1 = &_input.studio_id;
let input_1 = input_1.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_1,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/eula-acceptances",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::AcceptEulasInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_accept_eulas(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_accept_eulas(&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::AcceptEulas::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"AcceptEulas",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::accept_eulas_input::Builder {
crate::input::accept_eulas_input::Builder::default()
}
}
pub mod create_launch_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) ec2_subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) launch_profile_protocol_versions:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) stream_configuration:
std::option::Option<crate::model::StreamConfigurationCreate>,
pub(crate) studio_component_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 ec2_subnet_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.ec2_subnet_ids.unwrap_or_default();
v.push(input.into());
self.ec2_subnet_ids = Some(v);
self
}
pub fn set_ec2_subnet_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.ec2_subnet_ids = input;
self
}
pub fn launch_profile_protocol_versions(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.launch_profile_protocol_versions.unwrap_or_default();
v.push(input.into());
self.launch_profile_protocol_versions = Some(v);
self
}
pub fn set_launch_profile_protocol_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.launch_profile_protocol_versions = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn stream_configuration(
mut self,
input: crate::model::StreamConfigurationCreate,
) -> Self {
self.stream_configuration = Some(input);
self
}
pub fn set_stream_configuration(
mut self,
input: std::option::Option<crate::model::StreamConfigurationCreate>,
) -> Self {
self.stream_configuration = input;
self
}
pub fn studio_component_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.studio_component_ids.unwrap_or_default();
v.push(input.into());
self.studio_component_ids = Some(v);
self
}
pub fn set_studio_component_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.studio_component_ids = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateLaunchProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateLaunchProfileInput {
client_token: self.client_token,
description: self.description,
ec2_subnet_ids: self.ec2_subnet_ids,
launch_profile_protocol_versions: self.launch_profile_protocol_versions,
name: self.name,
stream_configuration: self.stream_configuration,
studio_component_ids: self.studio_component_ids,
studio_id: self.studio_id,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_subnet_ids", &self.ec2_subnet_ids);
formatter.field(
"launch_profile_protocol_versions",
&self.launch_profile_protocol_versions,
);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("stream_configuration", &self.stream_configuration);
formatter.field("studio_component_ids", &self.studio_component_ids);
formatter.field("studio_id", &self.studio_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateLaunchProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateLaunchProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateLaunchProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_2 = &_input.studio_id;
let input_2 = input_2.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_2,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateLaunchProfileInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_create_launch_profile(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_launch_profile(&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::CreateLaunchProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateLaunchProfile",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_launch_profile_input::Builder {
crate::input::create_launch_profile_input::Builder::default()
}
}
pub mod create_streaming_image_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) ec2_image_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 ec2_image_id(mut self, input: impl Into<std::string::String>) -> Self {
self.ec2_image_id = Some(input.into());
self
}
pub fn set_ec2_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ec2_image_id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateStreamingImageInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateStreamingImageInput {
client_token: self.client_token,
description: self.description,
ec2_image_id: self.ec2_image_id,
name: self.name,
studio_id: self.studio_id,
tags: self.tags,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_image_id", &self.ec2_image_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
}
impl CreateStreamingImageInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateStreamingImage,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateStreamingImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_3 = &_input.studio_id;
let input_3 = input_3.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_3,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-images",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateStreamingImageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_create_streaming_image(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_streaming_image(
&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::CreateStreamingImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateStreamingImage",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_streaming_image_input::Builder {
crate::input::create_streaming_image_input::Builder::default()
}
}
pub mod create_streaming_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) ec2_instance_type: std::option::Option<crate::model::StreamingInstanceType>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) owned_by: std::option::Option<std::string::String>,
pub(crate) streaming_image_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn ec2_instance_type(mut self, input: crate::model::StreamingInstanceType) -> Self {
self.ec2_instance_type = Some(input);
self
}
pub fn set_ec2_instance_type(
mut self,
input: std::option::Option<crate::model::StreamingInstanceType>,
) -> Self {
self.ec2_instance_type = input;
self
}
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn owned_by(mut self, input: impl Into<std::string::String>) -> Self {
self.owned_by = Some(input.into());
self
}
pub fn set_owned_by(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owned_by = input;
self
}
pub fn streaming_image_id(mut self, input: impl Into<std::string::String>) -> Self {
self.streaming_image_id = Some(input.into());
self
}
pub fn set_streaming_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.streaming_image_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateStreamingSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateStreamingSessionInput {
client_token: self.client_token,
ec2_instance_type: self.ec2_instance_type,
launch_profile_id: self.launch_profile_id,
owned_by: self.owned_by,
streaming_image_id: self.streaming_image_id,
studio_id: self.studio_id,
tags: self.tags,
})
}
}
}
impl CreateStreamingSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateStreamingSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateStreamingSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_4 = &_input.studio_id;
let input_4 = input_4.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_4,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateStreamingSessionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_create_streaming_session(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_streaming_session(
&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::CreateStreamingSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateStreamingSession",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_streaming_session_input::Builder {
crate::input::create_streaming_session_input::Builder::default()
}
}
pub mod create_streaming_session_stream_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) expiration_in_seconds: std::option::Option<i32>,
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn expiration_in_seconds(mut self, input: i32) -> Self {
self.expiration_in_seconds = Some(input);
self
}
pub fn set_expiration_in_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.expiration_in_seconds = input;
self
}
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateStreamingSessionStreamInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateStreamingSessionStreamInput {
client_token: self.client_token,
expiration_in_seconds: self.expiration_in_seconds,
session_id: self.session_id,
studio_id: self.studio_id,
})
}
}
}
impl CreateStreamingSessionStreamInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateStreamingSessionStream,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateStreamingSessionStreamInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_5 = &_input.studio_id;
let input_5 = input_5.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_5,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_6 = &_input.session_id;
let input_6 = input_6.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_6,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/streams",
studioId = studio_id,
sessionId = session_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateStreamingSessionStreamInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_create_streaming_session_stream(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_streaming_session_stream(&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::CreateStreamingSessionStream::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateStreamingSessionStream",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_streaming_session_stream_input::Builder {
crate::input::create_streaming_session_stream_input::Builder::default()
}
}
pub mod create_studio_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) admin_role_arn: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) studio_encryption_configuration:
std::option::Option<crate::model::StudioEncryptionConfiguration>,
pub(crate) studio_name: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) user_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn admin_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.admin_role_arn = Some(input.into());
self
}
pub fn set_admin_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.admin_role_arn = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 studio_encryption_configuration(
mut self,
input: crate::model::StudioEncryptionConfiguration,
) -> Self {
self.studio_encryption_configuration = Some(input);
self
}
pub fn set_studio_encryption_configuration(
mut self,
input: std::option::Option<crate::model::StudioEncryptionConfiguration>,
) -> Self {
self.studio_encryption_configuration = input;
self
}
pub fn studio_name(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_name = Some(input.into());
self
}
pub fn set_studio_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_name = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn user_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.user_role_arn = Some(input.into());
self
}
pub fn set_user_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.user_role_arn = input;
self
}
pub fn build(
self,
) -> Result<crate::input::CreateStudioInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::CreateStudioInput {
admin_role_arn: self.admin_role_arn,
client_token: self.client_token,
display_name: self.display_name,
studio_encryption_configuration: self.studio_encryption_configuration,
studio_name: self.studio_name,
tags: self.tags,
user_role_arn: self.user_role_arn,
})
}
}
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("admin_role_arn", &self.admin_role_arn);
formatter.field("client_token", &self.client_token);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field(
"studio_encryption_configuration",
&self.studio_encryption_configuration,
);
formatter.field("studio_name", &self.studio_name);
formatter.field("tags", &self.tags);
formatter.field("user_role_arn", &self.user_role_arn);
formatter.finish()
}
}
}
impl CreateStudioInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateStudio,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateStudioInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/2020-08-01/studios").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateStudioInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_create_studio(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_studio(&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::CreateStudio::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateStudio",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_studio_input::Builder {
crate::input::create_studio_input::Builder::default()
}
}
pub mod create_studio_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) configuration: std::option::Option<crate::model::StudioComponentConfiguration>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) ec2_security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) initialization_scripts:
std::option::Option<std::vec::Vec<crate::model::StudioComponentInitializationScript>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) script_parameters:
std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) subtype: std::option::Option<crate::model::StudioComponentSubtype>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
pub(crate) r#type: std::option::Option<crate::model::StudioComponentType>,
pub(crate) secure_initialization_role_arn: std::option::Option<std::string::String>,
pub(crate) runtime_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn configuration(mut self, input: crate::model::StudioComponentConfiguration) -> Self {
self.configuration = Some(input);
self
}
pub fn set_configuration(
mut self,
input: std::option::Option<crate::model::StudioComponentConfiguration>,
) -> Self {
self.configuration = 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 ec2_security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.ec2_security_group_ids.unwrap_or_default();
v.push(input.into());
self.ec2_security_group_ids = Some(v);
self
}
pub fn set_ec2_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.ec2_security_group_ids = input;
self
}
pub fn initialization_scripts(
mut self,
input: crate::model::StudioComponentInitializationScript,
) -> Self {
let mut v = self.initialization_scripts.unwrap_or_default();
v.push(input);
self.initialization_scripts = Some(v);
self
}
pub fn set_initialization_scripts(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::StudioComponentInitializationScript>,
>,
) -> Self {
self.initialization_scripts = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn script_parameters(mut self, input: crate::model::ScriptParameterKeyValue) -> Self {
let mut v = self.script_parameters.unwrap_or_default();
v.push(input);
self.script_parameters = Some(v);
self
}
pub fn set_script_parameters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
) -> Self {
self.script_parameters = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn subtype(mut self, input: crate::model::StudioComponentSubtype) -> Self {
self.subtype = Some(input);
self
}
pub fn set_subtype(
mut self,
input: std::option::Option<crate::model::StudioComponentSubtype>,
) -> Self {
self.subtype = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn r#type(mut self, input: crate::model::StudioComponentType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::StudioComponentType>,
) -> Self {
self.r#type = input;
self
}
pub fn secure_initialization_role_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.secure_initialization_role_arn = Some(input.into());
self
}
pub fn set_secure_initialization_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.secure_initialization_role_arn = input;
self
}
pub fn runtime_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.runtime_role_arn = Some(input.into());
self
}
pub fn set_runtime_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.runtime_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::CreateStudioComponentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::CreateStudioComponentInput {
client_token: self.client_token,
configuration: self.configuration,
description: self.description,
ec2_security_group_ids: self.ec2_security_group_ids,
initialization_scripts: self.initialization_scripts,
name: self.name,
script_parameters: self.script_parameters,
studio_id: self.studio_id,
subtype: self.subtype,
tags: self.tags,
r#type: self.r#type,
secure_initialization_role_arn: self.secure_initialization_role_arn,
runtime_role_arn: self.runtime_role_arn,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("configuration", &self.configuration);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
formatter.field("initialization_scripts", &self.initialization_scripts);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("subtype", &self.subtype);
formatter.field("tags", &self.tags);
formatter.field("r#type", &self.r#type);
formatter.field(
"secure_initialization_role_arn",
&self.secure_initialization_role_arn,
);
formatter.field("runtime_role_arn", &self.runtime_role_arn);
formatter.finish()
}
}
}
impl CreateStudioComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::CreateStudioComponent,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::CreateStudioComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_7 = &_input.studio_id;
let input_7 = input_7.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_7,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/studio-components",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::CreateStudioComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_create_studio_component(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_create_studio_component(
&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::CreateStudioComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"CreateStudioComponent",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::create_studio_component_input::Builder {
crate::input::create_studio_component_input::Builder::default()
}
}
pub mod delete_launch_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteLaunchProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteLaunchProfileInput {
client_token: self.client_token,
launch_profile_id: self.launch_profile_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteLaunchProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteLaunchProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteLaunchProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_8 = &_input.studio_id;
let input_8 = input_8.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_8,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_9 = &_input.launch_profile_id;
let input_9 = input_9.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_9,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLaunchProfileInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_delete_launch_profile(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteLaunchProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLaunchProfile",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_launch_profile_input::Builder {
crate::input::delete_launch_profile_input::Builder::default()
}
}
pub mod delete_launch_profile_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteLaunchProfileMemberInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteLaunchProfileMemberInput {
client_token: self.client_token,
launch_profile_id: self.launch_profile_id,
principal_id: self.principal_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteLaunchProfileMemberInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteLaunchProfileMember,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteLaunchProfileMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_10 = &_input.studio_id;
let input_10 = input_10.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_10,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_11 = &_input.launch_profile_id;
let input_11 = input_11.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_11,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
let input_12 = &_input.principal_id;
let input_12 = input_12.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
)
})?;
let principal_id = aws_smithy_http::label::fmt_string(
input_12,
aws_smithy_http::label::EncodingStrategy::Default,
);
if principal_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
),
);
}
write!(output, "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", studioId = studio_id, launchProfileId = launch_profile_id, principalId = principal_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteLaunchProfileMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_delete_launch_profile_member(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteLaunchProfileMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteLaunchProfileMember",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_launch_profile_member_input::Builder {
crate::input::delete_launch_profile_member_input::Builder::default()
}
}
pub mod delete_streaming_image_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) streaming_image_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn streaming_image_id(mut self, input: impl Into<std::string::String>) -> Self {
self.streaming_image_id = Some(input.into());
self
}
pub fn set_streaming_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.streaming_image_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteStreamingImageInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteStreamingImageInput {
client_token: self.client_token,
streaming_image_id: self.streaming_image_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteStreamingImageInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteStreamingImage,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteStreamingImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_13 = &_input.studio_id;
let input_13 = input_13.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_13,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_14 = &_input.streaming_image_id;
let input_14 = input_14.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
)
})?;
let streaming_image_id = aws_smithy_http::label::fmt_string(
input_14,
aws_smithy_http::label::EncodingStrategy::Default,
);
if streaming_image_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}",
studioId = studio_id,
streamingImageId = streaming_image_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStreamingImageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_delete_streaming_image(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteStreamingImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStreamingImage",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_streaming_image_input::Builder {
crate::input::delete_streaming_image_input::Builder::default()
}
}
pub mod delete_streaming_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteStreamingSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteStreamingSessionInput {
client_token: self.client_token,
session_id: self.session_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteStreamingSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteStreamingSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteStreamingSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_15 = &_input.studio_id;
let input_15 = input_15.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_15,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_16 = &_input.session_id;
let input_16 = input_16.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_16,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}",
studioId = studio_id,
sessionId = session_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStreamingSessionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_delete_streaming_session(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteStreamingSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStreamingSession",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_streaming_session_input::Builder {
crate::input::delete_streaming_session_input::Builder::default()
}
}
pub mod delete_studio_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::DeleteStudioInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::DeleteStudioInput {
client_token: self.client_token,
studio_id: self.studio_id,
})
}
}
}
impl DeleteStudioInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteStudio,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteStudioInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_17 = &_input.studio_id;
let input_17 = input_17.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_17,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStudioInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_delete_studio(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteStudio::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStudio",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_studio_input::Builder {
crate::input::delete_studio_input::Builder::default()
}
}
pub mod delete_studio_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) studio_component_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn studio_component_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_component_id = Some(input.into());
self
}
pub fn set_studio_component_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.studio_component_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteStudioComponentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteStudioComponentInput {
client_token: self.client_token,
studio_component_id: self.studio_component_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteStudioComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteStudioComponent,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteStudioComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_18 = &_input.studio_id;
let input_18 = input_18.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_18,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_19 = &_input.studio_component_id;
let input_19 = input_19.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
)
})?;
let studio_component_id = aws_smithy_http::label::fmt_string(
input_19,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_component_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}",
studioId = studio_id,
studioComponentId = studio_component_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStudioComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_delete_studio_component(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteStudioComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStudioComponent",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_studio_component_input::Builder {
crate::input::delete_studio_component_input::Builder::default()
}
}
pub mod delete_studio_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::DeleteStudioMemberInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::DeleteStudioMemberInput {
client_token: self.client_token,
principal_id: self.principal_id,
studio_id: self.studio_id,
})
}
}
}
impl DeleteStudioMemberInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteStudioMember,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::DeleteStudioMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_20 = &_input.studio_id;
let input_20 = input_20.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_20,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_21 = &_input.principal_id;
let input_21 = input_21.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
)
})?;
let principal_id = aws_smithy_http::label::fmt_string(
input_21,
aws_smithy_http::label::EncodingStrategy::Default,
);
if principal_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/membership/{principalId}",
studioId = studio_id,
principalId = principal_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteStudioMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_delete_studio_member(input, builder)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteStudioMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteStudioMember",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::delete_studio_member_input::Builder {
crate::input::delete_studio_member_input::Builder::default()
}
}
pub mod get_eula_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) eula_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn eula_id(mut self, input: impl Into<std::string::String>) -> Self {
self.eula_id = Some(input.into());
self
}
pub fn set_eula_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.eula_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetEulaInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetEulaInput {
eula_id: self.eula_id,
})
}
}
}
impl GetEulaInput {
#[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::GetEula,
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::GetEulaInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_22 = &_input.eula_id;
let input_22 = input_22.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"eula_id",
"cannot be empty or unset",
)
})?;
let eula_id = aws_smithy_http::label::fmt_string(
input_22,
aws_smithy_http::label::EncodingStrategy::Default,
);
if eula_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"eula_id",
"cannot be empty or unset",
),
);
}
write!(output, "/2020-08-01/eulas/{eulaId}", eulaId = eula_id)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetEulaInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetEula::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetEula", "nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_eula_input::Builder {
crate::input::get_eula_input::Builder::default()
}
}
pub mod get_launch_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLaunchProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLaunchProfileInput {
launch_profile_id: self.launch_profile_id,
studio_id: self.studio_id,
})
}
}
}
impl GetLaunchProfileInput {
#[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::GetLaunchProfile,
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::GetLaunchProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_23 = &_input.studio_id;
let input_23 = input_23.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_23,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_24 = &_input.launch_profile_id;
let input_24 = input_24.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_24,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLaunchProfileInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLaunchProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLaunchProfile",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_launch_profile_input::Builder {
crate::input::get_launch_profile_input::Builder::default()
}
}
pub mod get_launch_profile_details_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLaunchProfileDetailsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLaunchProfileDetailsInput {
launch_profile_id: self.launch_profile_id,
studio_id: self.studio_id,
})
}
}
}
impl GetLaunchProfileDetailsInput {
#[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::GetLaunchProfileDetails,
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::GetLaunchProfileDetailsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_25 = &_input.studio_id;
let input_25 = input_25.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_25,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_26 = &_input.launch_profile_id;
let input_26 = input_26.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_26,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/details",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLaunchProfileDetailsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLaunchProfileDetails::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLaunchProfileDetails",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_launch_profile_details_input::Builder {
crate::input::get_launch_profile_details_input::Builder::default()
}
}
pub mod get_launch_profile_initialization_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) launch_profile_protocol_versions:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) launch_purpose: std::option::Option<std::string::String>,
pub(crate) platform: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn launch_profile_protocol_versions(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.launch_profile_protocol_versions.unwrap_or_default();
v.push(input.into());
self.launch_profile_protocol_versions = Some(v);
self
}
pub fn set_launch_profile_protocol_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.launch_profile_protocol_versions = input;
self
}
pub fn launch_purpose(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_purpose = Some(input.into());
self
}
pub fn set_launch_purpose(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_purpose = input;
self
}
pub fn platform(mut self, input: impl Into<std::string::String>) -> Self {
self.platform = Some(input.into());
self
}
pub fn set_platform(mut self, input: std::option::Option<std::string::String>) -> Self {
self.platform = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLaunchProfileInitializationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLaunchProfileInitializationInput {
launch_profile_id: self.launch_profile_id,
launch_profile_protocol_versions: self.launch_profile_protocol_versions,
launch_purpose: self.launch_purpose,
platform: self.platform,
studio_id: self.studio_id,
})
}
}
}
impl GetLaunchProfileInitializationInput {
#[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::GetLaunchProfileInitialization,
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::GetLaunchProfileInitializationInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_27 = &_input.studio_id;
let input_27 = input_27.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_27,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_28 = &_input.launch_profile_id;
let input_28 = input_28.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_28,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/init",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetLaunchProfileInitializationInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_29 = &_input.launch_profile_protocol_versions;
let inner_29 = inner_29.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_protocol_versions",
"cannot be empty or unset",
)
})?;
for inner_30 in inner_29 {
query.push_kv(
"launchProfileProtocolVersions",
&aws_smithy_http::query::fmt_string(&inner_30),
);
}
let inner_31 = &_input.launch_purpose;
let inner_31 = inner_31.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_purpose",
"cannot be empty or unset",
)
})?;
if inner_31.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_purpose",
"cannot be empty or unset",
),
);
}
query.push_kv(
"launchPurpose",
&aws_smithy_http::query::fmt_string(&inner_31),
);
let inner_32 = &_input.platform;
let inner_32 = inner_32.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"platform",
"cannot be empty or unset",
)
})?;
if inner_32.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"platform",
"cannot be empty or unset",
),
);
}
query.push_kv("platform", &aws_smithy_http::query::fmt_string(&inner_32));
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLaunchProfileInitializationInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLaunchProfileInitialization::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLaunchProfileInitialization",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_launch_profile_initialization_input::Builder {
crate::input::get_launch_profile_initialization_input::Builder::default()
}
}
pub mod get_launch_profile_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetLaunchProfileMemberInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetLaunchProfileMemberInput {
launch_profile_id: self.launch_profile_id,
principal_id: self.principal_id,
studio_id: self.studio_id,
})
}
}
}
impl GetLaunchProfileMemberInput {
#[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::GetLaunchProfileMember,
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::GetLaunchProfileMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_33 = &_input.studio_id;
let input_33 = input_33.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_33,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_34 = &_input.launch_profile_id;
let input_34 = input_34.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_34,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
let input_35 = &_input.principal_id;
let input_35 = input_35.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
)
})?;
let principal_id = aws_smithy_http::label::fmt_string(
input_35,
aws_smithy_http::label::EncodingStrategy::Default,
);
if principal_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
),
);
}
write!(output, "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", studioId = studio_id, launchProfileId = launch_profile_id, principalId = principal_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetLaunchProfileMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetLaunchProfileMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetLaunchProfileMember",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_launch_profile_member_input::Builder {
crate::input::get_launch_profile_member_input::Builder::default()
}
}
pub mod get_streaming_image_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) streaming_image_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn streaming_image_id(mut self, input: impl Into<std::string::String>) -> Self {
self.streaming_image_id = Some(input.into());
self
}
pub fn set_streaming_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.streaming_image_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetStreamingImageInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetStreamingImageInput {
streaming_image_id: self.streaming_image_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStreamingImageInput {
#[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::GetStreamingImage,
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::GetStreamingImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_36 = &_input.studio_id;
let input_36 = input_36.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_36,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_37 = &_input.streaming_image_id;
let input_37 = input_37.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
)
})?;
let streaming_image_id = aws_smithy_http::label::fmt_string(
input_37,
aws_smithy_http::label::EncodingStrategy::Default,
);
if streaming_image_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}",
studioId = studio_id,
streamingImageId = streaming_image_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStreamingImageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStreamingImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStreamingImage",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_streaming_image_input::Builder {
crate::input::get_streaming_image_input::Builder::default()
}
}
pub mod get_streaming_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetStreamingSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetStreamingSessionInput {
session_id: self.session_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStreamingSessionInput {
#[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::GetStreamingSession,
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::GetStreamingSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_38 = &_input.studio_id;
let input_38 = input_38.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_38,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_39 = &_input.session_id;
let input_39 = input_39.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_39,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}",
studioId = studio_id,
sessionId = session_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStreamingSessionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStreamingSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStreamingSession",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_streaming_session_input::Builder {
crate::input::get_streaming_session_input::Builder::default()
}
}
pub mod get_streaming_session_backup_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) backup_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn backup_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_id = Some(input.into());
self
}
pub fn set_backup_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetStreamingSessionBackupInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetStreamingSessionBackupInput {
backup_id: self.backup_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStreamingSessionBackupInput {
#[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::GetStreamingSessionBackup,
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::GetStreamingSessionBackupInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_40 = &_input.studio_id;
let input_40 = input_40.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_40,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_41 = &_input.backup_id;
let input_41 = input_41.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"backup_id",
"cannot be empty or unset",
)
})?;
let backup_id = aws_smithy_http::label::fmt_string(
input_41,
aws_smithy_http::label::EncodingStrategy::Default,
);
if backup_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"backup_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-session-backups/{backupId}",
studioId = studio_id,
backupId = backup_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStreamingSessionBackupInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStreamingSessionBackup::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStreamingSessionBackup",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_streaming_session_backup_input::Builder {
crate::input::get_streaming_session_backup_input::Builder::default()
}
}
pub mod get_streaming_session_stream_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) stream_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn stream_id(mut self, input: impl Into<std::string::String>) -> Self {
self.stream_id = Some(input.into());
self
}
pub fn set_stream_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stream_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetStreamingSessionStreamInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetStreamingSessionStreamInput {
session_id: self.session_id,
stream_id: self.stream_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStreamingSessionStreamInput {
#[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::GetStreamingSessionStream,
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::GetStreamingSessionStreamInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_42 = &_input.studio_id;
let input_42 = input_42.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_42,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_43 = &_input.session_id;
let input_43 = input_43.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_43,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
let input_44 = &_input.stream_id;
let input_44 = input_44.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"stream_id",
"cannot be empty or unset",
)
})?;
let stream_id = aws_smithy_http::label::fmt_string(
input_44,
aws_smithy_http::label::EncodingStrategy::Default,
);
if stream_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"stream_id",
"cannot be empty or unset",
),
);
}
write!(output, "/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/streams/{streamId}", studioId = studio_id, sessionId = session_id, streamId = stream_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStreamingSessionStreamInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStreamingSessionStream::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStreamingSessionStream",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_streaming_session_stream_input::Builder {
crate::input::get_streaming_session_stream_input::Builder::default()
}
}
pub mod get_studio_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetStudioInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetStudioInput {
studio_id: self.studio_id,
})
}
}
}
impl GetStudioInput {
#[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::GetStudio,
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::GetStudioInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_45 = &_input.studio_id;
let input_45 = input_45.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_45,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStudioInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetStudio::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStudio",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_studio_input::Builder {
crate::input::get_studio_input::Builder::default()
}
}
pub mod get_studio_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) studio_component_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn studio_component_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_component_id = Some(input.into());
self
}
pub fn set_studio_component_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.studio_component_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::GetStudioComponentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::GetStudioComponentInput {
studio_component_id: self.studio_component_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStudioComponentInput {
#[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::GetStudioComponent,
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::GetStudioComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_46 = &_input.studio_id;
let input_46 = input_46.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_46,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_47 = &_input.studio_component_id;
let input_47 = input_47.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
)
})?;
let studio_component_id = aws_smithy_http::label::fmt_string(
input_47,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_component_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}",
studioId = studio_id,
studioComponentId = studio_component_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStudioComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStudioComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStudioComponent",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_studio_component_input::Builder {
crate::input::get_studio_component_input::Builder::default()
}
}
pub mod get_studio_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<crate::input::GetStudioMemberInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::GetStudioMemberInput {
principal_id: self.principal_id,
studio_id: self.studio_id,
})
}
}
}
impl GetStudioMemberInput {
#[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::GetStudioMember,
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::GetStudioMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_48 = &_input.studio_id;
let input_48 = input_48.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_48,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_49 = &_input.principal_id;
let input_49 = input_49.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
)
})?;
let principal_id = aws_smithy_http::label::fmt_string(
input_49,
aws_smithy_http::label::EncodingStrategy::Default,
);
if principal_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/membership/{principalId}",
studioId = studio_id,
principalId = principal_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetStudioMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::GetStudioMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetStudioMember",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::get_studio_member_input::Builder {
crate::input::get_studio_member_input::Builder::default()
}
}
pub mod list_eula_acceptances_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn eula_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.eula_ids.unwrap_or_default();
v.push(input.into());
self.eula_ids = Some(v);
self
}
pub fn set_eula_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.eula_ids = 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 studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListEulaAcceptancesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListEulaAcceptancesInput {
eula_ids: self.eula_ids,
next_token: self.next_token,
studio_id: self.studio_id,
})
}
}
}
impl ListEulaAcceptancesInput {
#[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::ListEulaAcceptances,
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::ListEulaAcceptancesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_50 = &_input.studio_id;
let input_50 = input_50.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_50,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/eula-acceptances",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListEulaAcceptancesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_51) = &_input.eula_ids {
{
for inner_52 in inner_51 {
query
.push_kv("eulaIds", &aws_smithy_http::query::fmt_string(&inner_52));
}
}
}
if let Some(inner_53) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_53));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEulaAcceptancesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListEulaAcceptances::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEulaAcceptances",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_eula_acceptances_input::Builder {
crate::input::list_eula_acceptances_input::Builder::default()
}
}
pub mod list_eulas_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn eula_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.eula_ids.unwrap_or_default();
v.push(input.into());
self.eula_ids = Some(v);
self
}
pub fn set_eula_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.eula_ids = 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::ListEulasInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListEulasInput {
eula_ids: self.eula_ids,
next_token: self.next_token,
})
}
}
}
impl ListEulasInput {
#[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::ListEulas,
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::ListEulasInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/2020-08-01/eulas").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListEulasInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_54) = &_input.eula_ids {
{
for inner_55 in inner_54 {
query
.push_kv("eulaIds", &aws_smithy_http::query::fmt_string(&inner_55));
}
}
}
if let Some(inner_56) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_56));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListEulasInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::ListEulas::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListEulas",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_eulas_input::Builder {
crate::input::list_eulas_input::Builder::default()
}
}
pub mod list_launch_profile_members_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) launch_profile_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) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_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 studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListLaunchProfileMembersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListLaunchProfileMembersInput {
launch_profile_id: self.launch_profile_id,
max_results: self.max_results,
next_token: self.next_token,
studio_id: self.studio_id,
})
}
}
}
impl ListLaunchProfileMembersInput {
#[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::ListLaunchProfileMembers,
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::ListLaunchProfileMembersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_57 = &_input.studio_id;
let input_57 = input_57.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_57,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_58 = &_input.launch_profile_id;
let input_58 = input_58.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_58,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListLaunchProfileMembersInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_59) = &_input.max_results {
if *inner_59 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_59).encode(),
);
}
}
if let Some(inner_60) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_60));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListLaunchProfileMembersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListLaunchProfileMembers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListLaunchProfileMembers",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_launch_profile_members_input::Builder {
crate::input::list_launch_profile_members_input::Builder::default()
}
}
pub mod list_launch_profiles_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) states: std::option::Option<std::vec::Vec<crate::model::LaunchProfileState>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
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 principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn states(mut self, input: crate::model::LaunchProfileState) -> Self {
let mut v = self.states.unwrap_or_default();
v.push(input);
self.states = Some(v);
self
}
pub fn set_states(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::LaunchProfileState>>,
) -> Self {
self.states = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListLaunchProfilesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListLaunchProfilesInput {
max_results: self.max_results,
next_token: self.next_token,
principal_id: self.principal_id,
states: self.states,
studio_id: self.studio_id,
})
}
}
}
impl ListLaunchProfilesInput {
#[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::ListLaunchProfiles,
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::ListLaunchProfilesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_61 = &_input.studio_id;
let input_61 = input_61.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_61,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListLaunchProfilesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_62) = &_input.max_results {
if *inner_62 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_62).encode(),
);
}
}
if let Some(inner_63) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_63));
}
}
if let Some(inner_64) = &_input.principal_id {
{
query.push_kv(
"principalId",
&aws_smithy_http::query::fmt_string(&inner_64),
);
}
}
if let Some(inner_65) = &_input.states {
{
for inner_66 in inner_65 {
query.push_kv("states", &aws_smithy_http::query::fmt_string(&inner_66));
}
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListLaunchProfilesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListLaunchProfiles::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListLaunchProfiles",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_launch_profiles_input::Builder {
crate::input::list_launch_profiles_input::Builder::default()
}
}
pub mod list_streaming_images_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) owner: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn owner(mut self, input: impl Into<std::string::String>) -> Self {
self.owner = Some(input.into());
self
}
pub fn set_owner(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owner = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListStreamingImagesInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStreamingImagesInput {
next_token: self.next_token,
owner: self.owner,
studio_id: self.studio_id,
})
}
}
}
impl ListStreamingImagesInput {
#[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::ListStreamingImages,
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::ListStreamingImagesInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_67 = &_input.studio_id;
let input_67 = input_67.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_67,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-images",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStreamingImagesInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_68) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_68));
}
}
if let Some(inner_69) = &_input.owner {
{
query.push_kv("owner", &aws_smithy_http::query::fmt_string(&inner_69));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStreamingImagesInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStreamingImages::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStreamingImages",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_streaming_images_input::Builder {
crate::input::list_streaming_images_input::Builder::default()
}
}
pub mod list_streaming_session_backups_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) owned_by: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn owned_by(mut self, input: impl Into<std::string::String>) -> Self {
self.owned_by = Some(input.into());
self
}
pub fn set_owned_by(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owned_by = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListStreamingSessionBackupsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStreamingSessionBackupsInput {
next_token: self.next_token,
owned_by: self.owned_by,
studio_id: self.studio_id,
})
}
}
}
impl ListStreamingSessionBackupsInput {
#[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::ListStreamingSessionBackups,
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::ListStreamingSessionBackupsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_70 = &_input.studio_id;
let input_70 = input_70.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_70,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-session-backups",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStreamingSessionBackupsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_71) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_71));
}
}
if let Some(inner_72) = &_input.owned_by {
{
query.push_kv("ownedBy", &aws_smithy_http::query::fmt_string(&inner_72));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStreamingSessionBackupsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStreamingSessionBackups::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStreamingSessionBackups",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_streaming_session_backups_input::Builder {
crate::input::list_streaming_session_backups_input::Builder::default()
}
}
pub mod list_streaming_sessions_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) created_by: std::option::Option<std::string::String>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) owned_by: std::option::Option<std::string::String>,
pub(crate) session_ids: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn created_by(mut self, input: impl Into<std::string::String>) -> Self {
self.created_by = Some(input.into());
self
}
pub fn set_created_by(mut self, input: std::option::Option<std::string::String>) -> Self {
self.created_by = 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 owned_by(mut self, input: impl Into<std::string::String>) -> Self {
self.owned_by = Some(input.into());
self
}
pub fn set_owned_by(mut self, input: std::option::Option<std::string::String>) -> Self {
self.owned_by = input;
self
}
pub fn session_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.session_ids = Some(input.into());
self
}
pub fn set_session_ids(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_ids = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListStreamingSessionsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStreamingSessionsInput {
created_by: self.created_by,
next_token: self.next_token,
owned_by: self.owned_by,
session_ids: self.session_ids,
studio_id: self.studio_id,
})
}
}
}
impl ListStreamingSessionsInput {
#[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::ListStreamingSessions,
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::ListStreamingSessionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_73 = &_input.studio_id;
let input_73 = input_73.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_73,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStreamingSessionsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_74) = &_input.created_by {
{
query.push_kv("createdBy", &aws_smithy_http::query::fmt_string(&inner_74));
}
}
if let Some(inner_75) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_75));
}
}
if let Some(inner_76) = &_input.owned_by {
{
query.push_kv("ownedBy", &aws_smithy_http::query::fmt_string(&inner_76));
}
}
if let Some(inner_77) = &_input.session_ids {
{
query.push_kv("sessionIds", &aws_smithy_http::query::fmt_string(&inner_77));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStreamingSessionsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStreamingSessions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStreamingSessions",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_streaming_sessions_input::Builder {
crate::input::list_streaming_sessions_input::Builder::default()
}
}
pub mod list_studio_components_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) states: std::option::Option<std::vec::Vec<crate::model::StudioComponentState>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) types: std::option::Option<std::vec::Vec<crate::model::StudioComponentType>>,
}
impl Builder {
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 states(mut self, input: crate::model::StudioComponentState) -> Self {
let mut v = self.states.unwrap_or_default();
v.push(input);
self.states = Some(v);
self
}
pub fn set_states(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::StudioComponentState>>,
) -> Self {
self.states = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn types(mut self, input: crate::model::StudioComponentType) -> Self {
let mut v = self.types.unwrap_or_default();
v.push(input);
self.types = Some(v);
self
}
pub fn set_types(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::StudioComponentType>>,
) -> Self {
self.types = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListStudioComponentsInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStudioComponentsInput {
max_results: self.max_results,
next_token: self.next_token,
states: self.states,
studio_id: self.studio_id,
types: self.types,
})
}
}
}
impl ListStudioComponentsInput {
#[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::ListStudioComponents,
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::ListStudioComponentsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_78 = &_input.studio_id;
let input_78 = input_78.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_78,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/studio-components",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStudioComponentsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_79) = &_input.max_results {
if *inner_79 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_79).encode(),
);
}
}
if let Some(inner_80) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_80));
}
}
if let Some(inner_81) = &_input.states {
{
for inner_82 in inner_81 {
query.push_kv("states", &aws_smithy_http::query::fmt_string(&inner_82));
}
}
}
if let Some(inner_83) = &_input.types {
{
for inner_84 in inner_83 {
query.push_kv("types", &aws_smithy_http::query::fmt_string(&inner_84));
}
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStudioComponentsInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStudioComponents::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStudioComponents",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_studio_components_input::Builder {
crate::input::list_studio_components_input::Builder::default()
}
}
pub mod list_studio_members_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) max_results: std::option::Option<i32>,
pub(crate) next_token: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
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 studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListStudioMembersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListStudioMembersInput {
max_results: self.max_results,
next_token: self.next_token,
studio_id: self.studio_id,
})
}
}
}
impl ListStudioMembersInput {
#[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::ListStudioMembers,
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::ListStudioMembersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_85 = &_input.studio_id;
let input_85 = input_85.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_85,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/membership",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStudioMembersInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_86) = &_input.max_results {
if *inner_86 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_86).encode(),
);
}
}
if let Some(inner_87) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_87));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStudioMembersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStudioMembers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStudioMembers",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_studio_members_input::Builder {
crate::input::list_studio_members_input::Builder::default()
}
}
pub mod list_studios_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn build(
self,
) -> Result<crate::input::ListStudiosInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::ListStudiosInput {
next_token: self.next_token,
})
}
}
}
impl ListStudiosInput {
#[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::ListStudios,
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::ListStudiosInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/2020-08-01/studios").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListStudiosInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_88) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_88));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListStudiosInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListStudios::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListStudios",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_studios_input::Builder {
crate::input::list_studios_input::Builder::default()
}
}
pub mod list_tags_for_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::ListTagsForResourceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::ListTagsForResourceInput {
resource_arn: self.resource_arn,
})
}
}
}
impl ListTagsForResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::ListTagsForResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_89 = &_input.resource_arn;
let input_89 = input_89.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_89,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/tags/{resourceArn}",
resourceArn = resource_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListTagsForResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListTagsForResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListTagsForResource",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
crate::input::list_tags_for_resource_input::Builder::default()
}
}
pub mod put_launch_profile_members_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) members:
std::option::Option<std::vec::Vec<crate::model::NewLaunchProfileMember>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn members(mut self, input: crate::model::NewLaunchProfileMember) -> Self {
let mut v = self.members.unwrap_or_default();
v.push(input);
self.members = Some(v);
self
}
pub fn set_members(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NewLaunchProfileMember>>,
) -> Self {
self.members = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutLaunchProfileMembersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutLaunchProfileMembersInput {
client_token: self.client_token,
identity_store_id: self.identity_store_id,
launch_profile_id: self.launch_profile_id,
members: self.members,
studio_id: self.studio_id,
})
}
}
}
impl PutLaunchProfileMembersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutLaunchProfileMembers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::PutLaunchProfileMembersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_90 = &_input.studio_id;
let input_90 = input_90.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_90,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_91 = &_input.launch_profile_id;
let input_91 = input_91.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_91,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutLaunchProfileMembersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_put_launch_profile_members(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_launch_profile_members(
&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::PutLaunchProfileMembers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutLaunchProfileMembers",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_launch_profile_members_input::Builder {
crate::input::put_launch_profile_members_input::Builder::default()
}
}
pub mod put_studio_members_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) identity_store_id: std::option::Option<std::string::String>,
pub(crate) members: std::option::Option<std::vec::Vec<crate::model::NewStudioMember>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 members(mut self, input: crate::model::NewStudioMember) -> Self {
let mut v = self.members.unwrap_or_default();
v.push(input);
self.members = Some(v);
self
}
pub fn set_members(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NewStudioMember>>,
) -> Self {
self.members = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::PutStudioMembersInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::PutStudioMembersInput {
client_token: self.client_token,
identity_store_id: self.identity_store_id,
members: self.members,
studio_id: self.studio_id,
})
}
}
}
impl PutStudioMembersInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::PutStudioMembers,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::PutStudioMembersInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_92 = &_input.studio_id;
let input_92 = input_92.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_92,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/membership",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutStudioMembersInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_put_studio_members(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_studio_members(&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::PutStudioMembers::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutStudioMembers",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::put_studio_members_input::Builder {
crate::input::put_studio_members_input::Builder::default()
}
}
pub mod start_streaming_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) backup_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn backup_id(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_id = Some(input.into());
self
}
pub fn set_backup_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartStreamingSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartStreamingSessionInput {
client_token: self.client_token,
session_id: self.session_id,
studio_id: self.studio_id,
backup_id: self.backup_id,
})
}
}
}
impl StartStreamingSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartStreamingSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StartStreamingSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_93 = &_input.studio_id;
let input_93 = input_93.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_93,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_94 = &_input.session_id;
let input_94 = input_94.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_94,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/start",
studioId = studio_id,
sessionId = session_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartStreamingSessionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_start_streaming_session(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_start_streaming_session(
&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::StartStreamingSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartStreamingSession",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_streaming_session_input::Builder {
crate::input::start_streaming_session_input::Builder::default()
}
}
pub mod start_studio_sso_configuration_repair_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StartStudioSsoConfigurationRepairInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StartStudioSsoConfigurationRepairInput {
client_token: self.client_token,
studio_id: self.studio_id,
})
}
}
}
impl StartStudioSsoConfigurationRepairInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StartStudioSSOConfigurationRepair,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StartStudioSsoConfigurationRepairInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_95 = &_input.studio_id;
let input_95 = input_95.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_95,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/sso-configuration",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StartStudioSsoConfigurationRepairInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_start_studio_sso_configuration_repair(
input, builder,
)?;
Ok(builder.method("PUT").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::StartStudioSSOConfigurationRepair::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StartStudioSSOConfigurationRepair",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::start_studio_sso_configuration_repair_input::Builder {
crate::input::start_studio_sso_configuration_repair_input::Builder::default()
}
}
pub mod stop_streaming_session_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) session_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) volume_retention_mode: std::option::Option<crate::model::VolumeRetentionMode>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.session_id = Some(input.into());
self
}
pub fn set_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.session_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn volume_retention_mode(mut self, input: crate::model::VolumeRetentionMode) -> Self {
self.volume_retention_mode = Some(input);
self
}
pub fn set_volume_retention_mode(
mut self,
input: std::option::Option<crate::model::VolumeRetentionMode>,
) -> Self {
self.volume_retention_mode = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::StopStreamingSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::StopStreamingSessionInput {
client_token: self.client_token,
session_id: self.session_id,
studio_id: self.studio_id,
volume_retention_mode: self.volume_retention_mode,
})
}
}
}
impl StopStreamingSessionInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::StopStreamingSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::StopStreamingSessionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_96 = &_input.studio_id;
let input_96 = input_96.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_96,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_97 = &_input.session_id;
let input_97 = input_97.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
)
})?;
let session_id = aws_smithy_http::label::fmt_string(
input_97,
aws_smithy_http::label::EncodingStrategy::Default,
);
if session_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"session_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/stop",
studioId = studio_id,
sessionId = session_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::StopStreamingSessionInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_stop_streaming_session(input, builder)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_stop_streaming_session(
&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::StopStreamingSession::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"StopStreamingSession",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::stop_streaming_session_input::Builder {
crate::input::stop_streaming_session_input::Builder::default()
}
}
pub mod tag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn build(
self,
) -> Result<crate::input::TagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::TagResourceInput {
resource_arn: self.resource_arn,
tags: self.tags,
})
}
}
}
impl TagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::TagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_98 = &_input.resource_arn;
let input_98 = input_98.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_98,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/tags/{resourceArn}",
resourceArn = resource_arn
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::TagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
Ok(builder.method("POST").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_tag_resource(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::TagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"TagResource",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::tag_resource_input::Builder {
crate::input::tag_resource_input::Builder::default()
}
}
pub mod untag_resource_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) resource_arn: std::option::Option<std::string::String>,
pub(crate) tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_arn = Some(input.into());
self
}
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_arn = input;
self
}
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.tag_keys.unwrap_or_default();
v.push(input.into());
self.tag_keys = Some(v);
self
}
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.tag_keys = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UntagResourceInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UntagResourceInput {
resource_arn: self.resource_arn,
tag_keys: self.tag_keys,
})
}
}
}
impl UntagResourceInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
let mut request = {
fn uri_base(
_input: &crate::input::UntagResourceInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_99 = &_input.resource_arn;
let input_99 = input_99.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
)
})?;
let resource_arn = aws_smithy_http::label::fmt_string(
input_99,
aws_smithy_http::label::EncodingStrategy::Default,
);
if resource_arn.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_arn",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/tags/{resourceArn}",
resourceArn = resource_arn
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::UntagResourceInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_100 = &_input.tag_keys;
let inner_100 = inner_100.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"tag_keys",
"cannot be empty or unset",
)
})?;
for inner_101 in inner_100 {
query.push_kv("tagKeys", &aws_smithy_http::query::fmt_string(&inner_101));
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UntagResourceInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("DELETE").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request.properties_mut().insert(endpoint_result);
if let Some(params) = params {
request.properties_mut().insert(params);
}
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_credentials_cache(
&mut request.properties_mut(),
_config.credentials_cache.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::UntagResource::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UntagResource",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::untag_resource_input::Builder {
crate::input::untag_resource_input::Builder::default()
}
}
pub mod update_launch_profile_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) launch_profile_protocol_versions:
std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) stream_configuration:
std::option::Option<crate::model::StreamConfigurationCreate>,
pub(crate) studio_component_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn launch_profile_protocol_versions(
mut self,
input: impl Into<std::string::String>,
) -> Self {
let mut v = self.launch_profile_protocol_versions.unwrap_or_default();
v.push(input.into());
self.launch_profile_protocol_versions = Some(v);
self
}
pub fn set_launch_profile_protocol_versions(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.launch_profile_protocol_versions = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn stream_configuration(
mut self,
input: crate::model::StreamConfigurationCreate,
) -> Self {
self.stream_configuration = Some(input);
self
}
pub fn set_stream_configuration(
mut self,
input: std::option::Option<crate::model::StreamConfigurationCreate>,
) -> Self {
self.stream_configuration = input;
self
}
pub fn studio_component_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.studio_component_ids.unwrap_or_default();
v.push(input.into());
self.studio_component_ids = Some(v);
self
}
pub fn set_studio_component_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.studio_component_ids = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLaunchProfileInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLaunchProfileInput {
client_token: self.client_token,
description: self.description,
launch_profile_id: self.launch_profile_id,
launch_profile_protocol_versions: self.launch_profile_protocol_versions,
name: self.name,
stream_configuration: self.stream_configuration,
studio_component_ids: self.studio_component_ids,
studio_id: self.studio_id,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("launch_profile_id", &self.launch_profile_id);
formatter.field(
"launch_profile_protocol_versions",
&self.launch_profile_protocol_versions,
);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("stream_configuration", &self.stream_configuration);
formatter.field("studio_component_ids", &self.studio_component_ids);
formatter.field("studio_id", &self.studio_id);
formatter.finish()
}
}
}
impl UpdateLaunchProfileInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateLaunchProfile,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLaunchProfileInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_102 = &_input.studio_id;
let input_102 = input_102.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_102,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_103 = &_input.launch_profile_id;
let input_103 = input_103.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_103,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}",
studioId = studio_id,
launchProfileId = launch_profile_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLaunchProfileInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_update_launch_profile(input, builder)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_launch_profile(&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::UpdateLaunchProfile::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLaunchProfile",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_launch_profile_input::Builder {
crate::input::update_launch_profile_input::Builder::default()
}
}
pub mod update_launch_profile_member_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) launch_profile_id: std::option::Option<std::string::String>,
pub(crate) persona: std::option::Option<crate::model::LaunchProfilePersona>,
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn launch_profile_id(mut self, input: impl Into<std::string::String>) -> Self {
self.launch_profile_id = Some(input.into());
self
}
pub fn set_launch_profile_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.launch_profile_id = input;
self
}
pub fn persona(mut self, input: crate::model::LaunchProfilePersona) -> Self {
self.persona = Some(input);
self
}
pub fn set_persona(
mut self,
input: std::option::Option<crate::model::LaunchProfilePersona>,
) -> Self {
self.persona = input;
self
}
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateLaunchProfileMemberInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateLaunchProfileMemberInput {
client_token: self.client_token,
launch_profile_id: self.launch_profile_id,
persona: self.persona,
principal_id: self.principal_id,
studio_id: self.studio_id,
})
}
}
}
impl UpdateLaunchProfileMemberInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateLaunchProfileMember,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::UpdateLaunchProfileMemberInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_104 = &_input.studio_id;
let input_104 = input_104.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_104,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_105 = &_input.launch_profile_id;
let input_105 = input_105.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
)
})?;
let launch_profile_id = aws_smithy_http::label::fmt_string(
input_105,
aws_smithy_http::label::EncodingStrategy::Default,
);
if launch_profile_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"launch_profile_id",
"cannot be empty or unset",
),
);
}
let input_106 = &_input.principal_id;
let input_106 = input_106.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
)
})?;
let principal_id = aws_smithy_http::label::fmt_string(
input_106,
aws_smithy_http::label::EncodingStrategy::Default,
);
if principal_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"principal_id",
"cannot be empty or unset",
),
);
}
write!(output, "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", studioId = studio_id, launchProfileId = launch_profile_id, principalId = principal_id).expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateLaunchProfileMemberInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_update_launch_profile_member(input, builder)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_launch_profile_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::UpdateLaunchProfileMember::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateLaunchProfileMember",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_launch_profile_member_input::Builder {
crate::input::update_launch_profile_member_input::Builder::default()
}
}
pub mod update_streaming_image_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) streaming_image_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn streaming_image_id(mut self, input: impl Into<std::string::String>) -> Self {
self.streaming_image_id = Some(input.into());
self
}
pub fn set_streaming_image_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.streaming_image_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateStreamingImageInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateStreamingImageInput {
client_token: self.client_token,
description: self.description,
name: self.name,
streaming_image_id: self.streaming_image_id,
studio_id: self.studio_id,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("streaming_image_id", &self.streaming_image_id);
formatter.field("studio_id", &self.studio_id);
formatter.finish()
}
}
}
impl UpdateStreamingImageInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateStreamingImage,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::UpdateStreamingImageInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_107 = &_input.studio_id;
let input_107 = input_107.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_107,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_108 = &_input.streaming_image_id;
let input_108 = input_108.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
)
})?;
let streaming_image_id = aws_smithy_http::label::fmt_string(
input_108,
aws_smithy_http::label::EncodingStrategy::Default,
);
if streaming_image_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"streaming_image_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}",
studioId = studio_id,
streamingImageId = streaming_image_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateStreamingImageInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_update_streaming_image(input, builder)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_streaming_image(
&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::UpdateStreamingImage::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateStreamingImage",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_streaming_image_input::Builder {
crate::input::update_streaming_image_input::Builder::default()
}
}
pub mod update_studio_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) admin_role_arn: std::option::Option<std::string::String>,
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) display_name: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) user_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn admin_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.admin_role_arn = Some(input.into());
self
}
pub fn set_admin_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.admin_role_arn = input;
self
}
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn 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 studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn user_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.user_role_arn = Some(input.into());
self
}
pub fn set_user_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.user_role_arn = input;
self
}
pub fn build(
self,
) -> Result<crate::input::UpdateStudioInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::UpdateStudioInput {
admin_role_arn: self.admin_role_arn,
client_token: self.client_token,
display_name: self.display_name,
studio_id: self.studio_id,
user_role_arn: self.user_role_arn,
})
}
}
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("admin_role_arn", &self.admin_role_arn);
formatter.field("client_token", &self.client_token);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("user_role_arn", &self.user_role_arn);
formatter.finish()
}
}
}
impl UpdateStudioInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateStudio,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::UpdateStudioInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_109 = &_input.studio_id;
let input_109 = input_109.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_109,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}",
studioId = studio_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateStudioInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder = crate::http_serde::add_headers_update_studio(input, builder)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_studio(&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::UpdateStudio::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateStudio",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_studio_input::Builder {
crate::input::update_studio_input::Builder::default()
}
}
pub mod update_studio_component_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct Builder {
pub(crate) client_token: std::option::Option<std::string::String>,
pub(crate) configuration: std::option::Option<crate::model::StudioComponentConfiguration>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) ec2_security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) initialization_scripts:
std::option::Option<std::vec::Vec<crate::model::StudioComponentInitializationScript>>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) script_parameters:
std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
pub(crate) studio_component_id: std::option::Option<std::string::String>,
pub(crate) studio_id: std::option::Option<std::string::String>,
pub(crate) subtype: std::option::Option<crate::model::StudioComponentSubtype>,
pub(crate) r#type: std::option::Option<crate::model::StudioComponentType>,
pub(crate) secure_initialization_role_arn: std::option::Option<std::string::String>,
pub(crate) runtime_role_arn: std::option::Option<std::string::String>,
}
impl Builder {
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.client_token = Some(input.into());
self
}
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn configuration(mut self, input: crate::model::StudioComponentConfiguration) -> Self {
self.configuration = Some(input);
self
}
pub fn set_configuration(
mut self,
input: std::option::Option<crate::model::StudioComponentConfiguration>,
) -> Self {
self.configuration = 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 ec2_security_group_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.ec2_security_group_ids.unwrap_or_default();
v.push(input.into());
self.ec2_security_group_ids = Some(v);
self
}
pub fn set_ec2_security_group_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.ec2_security_group_ids = input;
self
}
pub fn initialization_scripts(
mut self,
input: crate::model::StudioComponentInitializationScript,
) -> Self {
let mut v = self.initialization_scripts.unwrap_or_default();
v.push(input);
self.initialization_scripts = Some(v);
self
}
pub fn set_initialization_scripts(
mut self,
input: std::option::Option<
std::vec::Vec<crate::model::StudioComponentInitializationScript>,
>,
) -> Self {
self.initialization_scripts = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn script_parameters(mut self, input: crate::model::ScriptParameterKeyValue) -> Self {
let mut v = self.script_parameters.unwrap_or_default();
v.push(input);
self.script_parameters = Some(v);
self
}
pub fn set_script_parameters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
) -> Self {
self.script_parameters = input;
self
}
pub fn studio_component_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_component_id = Some(input.into());
self
}
pub fn set_studio_component_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.studio_component_id = input;
self
}
pub fn studio_id(mut self, input: impl Into<std::string::String>) -> Self {
self.studio_id = Some(input.into());
self
}
pub fn set_studio_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.studio_id = input;
self
}
pub fn subtype(mut self, input: crate::model::StudioComponentSubtype) -> Self {
self.subtype = Some(input);
self
}
pub fn set_subtype(
mut self,
input: std::option::Option<crate::model::StudioComponentSubtype>,
) -> Self {
self.subtype = input;
self
}
pub fn r#type(mut self, input: crate::model::StudioComponentType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::StudioComponentType>,
) -> Self {
self.r#type = input;
self
}
pub fn secure_initialization_role_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.secure_initialization_role_arn = Some(input.into());
self
}
pub fn set_secure_initialization_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.secure_initialization_role_arn = input;
self
}
pub fn runtime_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.runtime_role_arn = Some(input.into());
self
}
pub fn set_runtime_role_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.runtime_role_arn = input;
self
}
pub fn build(
self,
) -> Result<
crate::input::UpdateStudioComponentInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::input::UpdateStudioComponentInput {
client_token: self.client_token,
configuration: self.configuration,
description: self.description,
ec2_security_group_ids: self.ec2_security_group_ids,
initialization_scripts: self.initialization_scripts,
name: self.name,
script_parameters: self.script_parameters,
studio_component_id: self.studio_component_id,
studio_id: self.studio_id,
subtype: self.subtype,
r#type: self.r#type,
secure_initialization_role_arn: self.secure_initialization_role_arn,
runtime_role_arn: self.runtime_role_arn,
})
}
}
impl std::fmt::Debug for Builder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Builder");
formatter.field("client_token", &self.client_token);
formatter.field("configuration", &self.configuration);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
formatter.field("initialization_scripts", &self.initialization_scripts);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("studio_component_id", &self.studio_component_id);
formatter.field("studio_id", &self.studio_id);
formatter.field("subtype", &self.subtype);
formatter.field("r#type", &self.r#type);
formatter.field(
"secure_initialization_role_arn",
&self.secure_initialization_role_arn,
);
formatter.field("runtime_role_arn", &self.runtime_role_arn);
formatter.finish()
}
}
}
impl UpdateStudioComponentInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
mut self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::UpdateStudioComponent,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let params_result = crate::endpoint::Params::builder()
.set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
.set_use_dual_stack(_config.use_dual_stack)
.set_use_fips(_config.use_fips)
.set_endpoint(_config.endpoint_url.clone())
.build()
.map_err(|err| {
aws_smithy_http::endpoint::ResolveEndpointError::from_source(
"could not construct endpoint parameters",
err,
)
});
let (endpoint_result, params) = match params_result {
Ok(params) => (
_config.endpoint_resolver.resolve_endpoint(¶ms),
Some(params),
),
Err(e) => (Err(e), None),
};
if self.client_token.is_none() {
self.client_token = Some(_config.make_token.make_idempotency_token());
}
let mut request = {
fn uri_base(
_input: &crate::input::UpdateStudioComponentInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_110 = &_input.studio_id;
let input_110 = input_110.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
)
})?;
let studio_id = aws_smithy_http::label::fmt_string(
input_110,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_id",
"cannot be empty or unset",
),
);
}
let input_111 = &_input.studio_component_id;
let input_111 = input_111.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
)
})?;
let studio_component_id = aws_smithy_http::label::fmt_string(
input_111,
aws_smithy_http::label::EncodingStrategy::Default,
);
if studio_component_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"studio_component_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}",
studioId = studio_id,
studioComponentId = studio_component_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::UpdateStudioComponentInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
let builder =
crate::http_serde::add_headers_update_studio_component(input, builder)?;
Ok(builder.method("PATCH").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_update_studio_component(
&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::UpdateStudioComponent::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"UpdateStudioComponent",
"nimble",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
pub fn builder() -> crate::input::update_studio_component_input::Builder {
crate::input::update_studio_component_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartStudioSsoConfigurationRepairInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl StartStudioSsoConfigurationRepairInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutStudioMembersInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub members: std::option::Option<std::vec::Vec<crate::model::NewStudioMember>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl PutStudioMembersInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn members(&self) -> std::option::Option<&[crate::model::NewStudioMember]> {
self.members.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStudioMembersInput {
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListStudioMembersInput {
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStudioMemberInput {
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStudioMemberInput {
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStudioMemberInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteStudioMemberInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStudiosInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListStudiosInput {
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)]
pub struct CreateStudioInput {
#[doc(hidden)]
pub admin_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_encryption_configuration:
std::option::Option<crate::model::StudioEncryptionConfiguration>,
#[doc(hidden)]
pub studio_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub user_role_arn: std::option::Option<std::string::String>,
}
impl CreateStudioInput {
pub fn admin_role_arn(&self) -> std::option::Option<&str> {
self.admin_role_arn.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn studio_encryption_configuration(
&self,
) -> std::option::Option<&crate::model::StudioEncryptionConfiguration> {
self.studio_encryption_configuration.as_ref()
}
pub fn studio_name(&self) -> std::option::Option<&str> {
self.studio_name.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn user_role_arn(&self) -> std::option::Option<&str> {
self.user_role_arn.as_deref()
}
}
impl std::fmt::Debug for CreateStudioInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateStudioInput");
formatter.field("admin_role_arn", &self.admin_role_arn);
formatter.field("client_token", &self.client_token);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field(
"studio_encryption_configuration",
&self.studio_encryption_configuration,
);
formatter.field("studio_name", &self.studio_name);
formatter.field("tags", &self.tags);
formatter.field("user_role_arn", &self.user_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStudioInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteStudioInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateStudioInput {
#[doc(hidden)]
pub admin_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub display_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub user_role_arn: std::option::Option<std::string::String>,
}
impl UpdateStudioInput {
pub fn admin_role_arn(&self) -> std::option::Option<&str> {
self.admin_role_arn.as_deref()
}
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn display_name(&self) -> std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn user_role_arn(&self) -> std::option::Option<&str> {
self.user_role_arn.as_deref()
}
}
impl std::fmt::Debug for UpdateStudioInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateStudioInput");
formatter.field("admin_role_arn", &self.admin_role_arn);
formatter.field("client_token", &self.client_token);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("user_role_arn", &self.user_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStudioInput {
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStudioInput {
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStudioComponentsInput {
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub states: std::option::Option<std::vec::Vec<crate::model::StudioComponentState>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub types: std::option::Option<std::vec::Vec<crate::model::StudioComponentType>>,
}
impl ListStudioComponentsInput {
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn states(&self) -> std::option::Option<&[crate::model::StudioComponentState]> {
self.states.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn types(&self) -> std::option::Option<&[crate::model::StudioComponentType]> {
self.types.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateStudioComponentInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configuration: std::option::Option<crate::model::StudioComponentConfiguration>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ec2_security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub initialization_scripts:
std::option::Option<std::vec::Vec<crate::model::StudioComponentInitializationScript>>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub script_parameters:
std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subtype: std::option::Option<crate::model::StudioComponentSubtype>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::StudioComponentType>,
#[doc(hidden)]
pub secure_initialization_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub runtime_role_arn: std::option::Option<std::string::String>,
}
impl CreateStudioComponentInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn configuration(
&self,
) -> std::option::Option<&crate::model::StudioComponentConfiguration> {
self.configuration.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn ec2_security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
self.ec2_security_group_ids.as_deref()
}
pub fn initialization_scripts(
&self,
) -> std::option::Option<&[crate::model::StudioComponentInitializationScript]> {
self.initialization_scripts.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn script_parameters(
&self,
) -> std::option::Option<&[crate::model::ScriptParameterKeyValue]> {
self.script_parameters.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn subtype(&self) -> std::option::Option<&crate::model::StudioComponentSubtype> {
self.subtype.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::StudioComponentType> {
self.r#type.as_ref()
}
pub fn secure_initialization_role_arn(&self) -> std::option::Option<&str> {
self.secure_initialization_role_arn.as_deref()
}
pub fn runtime_role_arn(&self) -> std::option::Option<&str> {
self.runtime_role_arn.as_deref()
}
}
impl std::fmt::Debug for CreateStudioComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateStudioComponentInput");
formatter.field("client_token", &self.client_token);
formatter.field("configuration", &self.configuration);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
formatter.field("initialization_scripts", &self.initialization_scripts);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("subtype", &self.subtype);
formatter.field("tags", &self.tags);
formatter.field("r#type", &self.r#type);
formatter.field(
"secure_initialization_role_arn",
&self.secure_initialization_role_arn,
);
formatter.field("runtime_role_arn", &self.runtime_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStudioComponentInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_component_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteStudioComponentInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn studio_component_id(&self) -> std::option::Option<&str> {
self.studio_component_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateStudioComponentInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub configuration: std::option::Option<crate::model::StudioComponentConfiguration>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ec2_security_group_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub initialization_scripts:
std::option::Option<std::vec::Vec<crate::model::StudioComponentInitializationScript>>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub script_parameters:
std::option::Option<std::vec::Vec<crate::model::ScriptParameterKeyValue>>,
#[doc(hidden)]
pub studio_component_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub subtype: std::option::Option<crate::model::StudioComponentSubtype>,
#[doc(hidden)]
pub r#type: std::option::Option<crate::model::StudioComponentType>,
#[doc(hidden)]
pub secure_initialization_role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub runtime_role_arn: std::option::Option<std::string::String>,
}
impl UpdateStudioComponentInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn configuration(
&self,
) -> std::option::Option<&crate::model::StudioComponentConfiguration> {
self.configuration.as_ref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn ec2_security_group_ids(&self) -> std::option::Option<&[std::string::String]> {
self.ec2_security_group_ids.as_deref()
}
pub fn initialization_scripts(
&self,
) -> std::option::Option<&[crate::model::StudioComponentInitializationScript]> {
self.initialization_scripts.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn script_parameters(
&self,
) -> std::option::Option<&[crate::model::ScriptParameterKeyValue]> {
self.script_parameters.as_deref()
}
pub fn studio_component_id(&self) -> std::option::Option<&str> {
self.studio_component_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn subtype(&self) -> std::option::Option<&crate::model::StudioComponentSubtype> {
self.subtype.as_ref()
}
pub fn r#type(&self) -> std::option::Option<&crate::model::StudioComponentType> {
self.r#type.as_ref()
}
pub fn secure_initialization_role_arn(&self) -> std::option::Option<&str> {
self.secure_initialization_role_arn.as_deref()
}
pub fn runtime_role_arn(&self) -> std::option::Option<&str> {
self.runtime_role_arn.as_deref()
}
}
impl std::fmt::Debug for UpdateStudioComponentInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateStudioComponentInput");
formatter.field("client_token", &self.client_token);
formatter.field("configuration", &self.configuration);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_security_group_ids", &self.ec2_security_group_ids);
formatter.field("initialization_scripts", &self.initialization_scripts);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("script_parameters", &"*** Sensitive Data Redacted ***");
formatter.field("studio_component_id", &self.studio_component_id);
formatter.field("studio_id", &self.studio_id);
formatter.field("subtype", &self.subtype);
formatter.field("r#type", &self.r#type);
formatter.field(
"secure_initialization_role_arn",
&self.secure_initialization_role_arn,
);
formatter.field("runtime_role_arn", &self.runtime_role_arn);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStudioComponentInput {
#[doc(hidden)]
pub studio_component_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStudioComponentInput {
pub fn studio_component_id(&self) -> std::option::Option<&str> {
self.studio_component_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StopStreamingSessionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub volume_retention_mode: std::option::Option<crate::model::VolumeRetentionMode>,
}
impl StopStreamingSessionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn volume_retention_mode(&self) -> std::option::Option<&crate::model::VolumeRetentionMode> {
self.volume_retention_mode.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartStreamingSessionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub backup_id: std::option::Option<std::string::String>,
}
impl StartStreamingSessionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn backup_id(&self) -> std::option::Option<&str> {
self.backup_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStreamingSessionStreamInput {
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub stream_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStreamingSessionStreamInput {
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn stream_id(&self) -> std::option::Option<&str> {
self.stream_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateStreamingSessionStreamInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub expiration_in_seconds: std::option::Option<i32>,
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl CreateStreamingSessionStreamInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn expiration_in_seconds(&self) -> std::option::Option<i32> {
self.expiration_in_seconds
}
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStreamingSessionsInput {
#[doc(hidden)]
pub created_by: std::option::Option<std::string::String>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owned_by: std::option::Option<std::string::String>,
#[doc(hidden)]
pub session_ids: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListStreamingSessionsInput {
pub fn created_by(&self) -> std::option::Option<&str> {
self.created_by.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn owned_by(&self) -> std::option::Option<&str> {
self.owned_by.as_deref()
}
pub fn session_ids(&self) -> std::option::Option<&str> {
self.session_ids.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateStreamingSessionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ec2_instance_type: std::option::Option<crate::model::StreamingInstanceType>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owned_by: std::option::Option<std::string::String>,
#[doc(hidden)]
pub streaming_image_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateStreamingSessionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn ec2_instance_type(&self) -> std::option::Option<&crate::model::StreamingInstanceType> {
self.ec2_instance_type.as_ref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn owned_by(&self) -> std::option::Option<&str> {
self.owned_by.as_deref()
}
pub fn streaming_image_id(&self) -> std::option::Option<&str> {
self.streaming_image_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStreamingSessionInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteStreamingSessionInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStreamingSessionInput {
#[doc(hidden)]
pub session_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStreamingSessionInput {
pub fn session_id(&self) -> std::option::Option<&str> {
self.session_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStreamingSessionBackupsInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owned_by: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListStreamingSessionBackupsInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn owned_by(&self) -> std::option::Option<&str> {
self.owned_by.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStreamingSessionBackupInput {
#[doc(hidden)]
pub backup_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStreamingSessionBackupInput {
pub fn backup_id(&self) -> std::option::Option<&str> {
self.backup_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListStreamingImagesInput {
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListStreamingImagesInput {
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn owner(&self) -> std::option::Option<&str> {
self.owner.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateStreamingImageInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ec2_image_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateStreamingImageInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn ec2_image_id(&self) -> std::option::Option<&str> {
self.ec2_image_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateStreamingImageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateStreamingImageInput");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_image_id", &self.ec2_image_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("studio_id", &self.studio_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteStreamingImageInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub streaming_image_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteStreamingImageInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn streaming_image_id(&self) -> std::option::Option<&str> {
self.streaming_image_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateStreamingImageInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub streaming_image_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl UpdateStreamingImageInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn streaming_image_id(&self) -> std::option::Option<&str> {
self.streaming_image_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
impl std::fmt::Debug for UpdateStreamingImageInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateStreamingImageInput");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("streaming_image_id", &self.streaming_image_id);
formatter.field("studio_id", &self.studio_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetStreamingImageInput {
#[doc(hidden)]
pub streaming_image_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetStreamingImageInput {
pub fn streaming_image_id(&self) -> std::option::Option<&str> {
self.streaming_image_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateLaunchProfileMemberInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub persona: std::option::Option<crate::model::LaunchProfilePersona>,
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl UpdateLaunchProfileMemberInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn persona(&self) -> std::option::Option<&crate::model::LaunchProfilePersona> {
self.persona.as_ref()
}
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutLaunchProfileMembersInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub identity_store_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub members: std::option::Option<std::vec::Vec<crate::model::NewLaunchProfileMember>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl PutLaunchProfileMembersInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn identity_store_id(&self) -> std::option::Option<&str> {
self.identity_store_id.as_deref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn members(&self) -> std::option::Option<&[crate::model::NewLaunchProfileMember]> {
self.members.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLaunchProfileMembersInput {
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListLaunchProfileMembersInput {
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLaunchProfileMemberInput {
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetLaunchProfileMemberInput {
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLaunchProfileInitializationInput {
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_protocol_versions: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub launch_purpose: std::option::Option<std::string::String>,
#[doc(hidden)]
pub platform: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetLaunchProfileInitializationInput {
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn launch_profile_protocol_versions(&self) -> std::option::Option<&[std::string::String]> {
self.launch_profile_protocol_versions.as_deref()
}
pub fn launch_purpose(&self) -> std::option::Option<&str> {
self.launch_purpose.as_deref()
}
pub fn platform(&self) -> std::option::Option<&str> {
self.platform.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLaunchProfileDetailsInput {
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetLaunchProfileDetailsInput {
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLaunchProfileMemberInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteLaunchProfileMemberInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLaunchProfilesInput {
#[doc(hidden)]
pub max_results: std::option::Option<i32>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub principal_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub states: std::option::Option<std::vec::Vec<crate::model::LaunchProfileState>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListLaunchProfilesInput {
pub fn max_results(&self) -> std::option::Option<i32> {
self.max_results
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn principal_id(&self) -> std::option::Option<&str> {
self.principal_id.as_deref()
}
pub fn states(&self) -> std::option::Option<&[crate::model::LaunchProfileState]> {
self.states.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CreateLaunchProfileInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ec2_subnet_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub launch_profile_protocol_versions: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub stream_configuration: std::option::Option<crate::model::StreamConfigurationCreate>,
#[doc(hidden)]
pub studio_component_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateLaunchProfileInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn ec2_subnet_ids(&self) -> std::option::Option<&[std::string::String]> {
self.ec2_subnet_ids.as_deref()
}
pub fn launch_profile_protocol_versions(&self) -> std::option::Option<&[std::string::String]> {
self.launch_profile_protocol_versions.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn stream_configuration(
&self,
) -> std::option::Option<&crate::model::StreamConfigurationCreate> {
self.stream_configuration.as_ref()
}
pub fn studio_component_ids(&self) -> std::option::Option<&[std::string::String]> {
self.studio_component_ids.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl std::fmt::Debug for CreateLaunchProfileInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CreateLaunchProfileInput");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("ec2_subnet_ids", &self.ec2_subnet_ids);
formatter.field(
"launch_profile_protocol_versions",
&self.launch_profile_protocol_versions,
);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("stream_configuration", &self.stream_configuration);
formatter.field("studio_component_ids", &self.studio_component_ids);
formatter.field("studio_id", &self.studio_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteLaunchProfileInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl DeleteLaunchProfileInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UpdateLaunchProfileInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub launch_profile_protocol_versions: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub stream_configuration: std::option::Option<crate::model::StreamConfigurationCreate>,
#[doc(hidden)]
pub studio_component_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl UpdateLaunchProfileInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn launch_profile_protocol_versions(&self) -> std::option::Option<&[std::string::String]> {
self.launch_profile_protocol_versions.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn stream_configuration(
&self,
) -> std::option::Option<&crate::model::StreamConfigurationCreate> {
self.stream_configuration.as_ref()
}
pub fn studio_component_ids(&self) -> std::option::Option<&[std::string::String]> {
self.studio_component_ids.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
impl std::fmt::Debug for UpdateLaunchProfileInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UpdateLaunchProfileInput");
formatter.field("client_token", &self.client_token);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("launch_profile_id", &self.launch_profile_id);
formatter.field(
"launch_profile_protocol_versions",
&self.launch_profile_protocol_versions,
);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("stream_configuration", &self.stream_configuration);
formatter.field("studio_component_ids", &self.studio_component_ids);
formatter.field("studio_id", &self.studio_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetLaunchProfileInput {
#[doc(hidden)]
pub launch_profile_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl GetLaunchProfileInput {
pub fn launch_profile_id(&self) -> std::option::Option<&str> {
self.launch_profile_id.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEulasInput {
#[doc(hidden)]
pub eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
}
impl ListEulasInput {
pub fn eula_ids(&self) -> std::option::Option<&[std::string::String]> {
self.eula_ids.as_deref()
}
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 GetEulaInput {
#[doc(hidden)]
pub eula_id: std::option::Option<std::string::String>,
}
impl GetEulaInput {
pub fn eula_id(&self) -> std::option::Option<&str> {
self.eula_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListEulaAcceptancesInput {
#[doc(hidden)]
pub eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl ListEulaAcceptancesInput {
pub fn eula_ids(&self) -> std::option::Option<&[std::string::String]> {
self.eula_ids.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceptEulasInput {
#[doc(hidden)]
pub client_token: std::option::Option<std::string::String>,
#[doc(hidden)]
pub eula_ids: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub studio_id: std::option::Option<std::string::String>,
}
impl AcceptEulasInput {
pub fn client_token(&self) -> std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn eula_ids(&self) -> std::option::Option<&[std::string::String]> {
self.eula_ids.as_deref()
}
pub fn studio_id(&self) -> std::option::Option<&str> {
self.studio_id.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UntagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tag_keys: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl UntagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tag_keys(&self) -> std::option::Option<&[std::string::String]> {
self.tag_keys.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TagResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListTagsForResourceInput {
#[doc(hidden)]
pub resource_arn: std::option::Option<std::string::String>,
}
impl ListTagsForResourceInput {
pub fn resource_arn(&self) -> std::option::Option<&str> {
self.resource_arn.as_deref()
}
}