Struct aws_sdk_quicksight::operation::ListThemeVersions
source · pub struct ListThemeVersions { /* private fields */ }Expand description
Operation shape for ListThemeVersions.
This is usually constructed for you using the the fluent builder returned by
list_theme_versions.
See crate::client::fluent_builders::ListThemeVersions for more details about the operation.
Implementations§
source§impl ListThemeVersions
impl ListThemeVersions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ListThemeVersionsInput.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ListThemeVersions operation.
Examples found in repository?
src/input.rs (line 19638)
19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListThemeVersions,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListThemeVersionsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_236 = &_input.aws_account_id;
let input_236 = input_236.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"aws_account_id",
"cannot be empty or unset",
)
})?;
let aws_account_id = aws_smithy_http::label::fmt_string(
input_236,
aws_smithy_http::label::EncodingStrategy::Default,
);
if aws_account_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"aws_account_id",
"cannot be empty or unset",
),
);
}
let input_237 = &_input.theme_id;
let input_237 = input_237.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"theme_id",
"cannot be empty or unset",
)
})?;
let theme_id = aws_smithy_http::label::fmt_string(
input_237,
aws_smithy_http::label::EncodingStrategy::Default,
);
if theme_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"theme_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/accounts/{AwsAccountId}/themes/{ThemeId}/versions",
AwsAccountId = aws_account_id,
ThemeId = theme_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListThemeVersionsInput,
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_238) = &_input.next_token {
{
query.push_kv(
"next-token",
&aws_smithy_http::query::fmt_string(&inner_238),
);
}
}
if let Some(inner_239) = &_input.max_results {
if *inner_239 != 0 {
query.push_kv(
"max-results",
aws_smithy_types::primitive::Encoder::from(*inner_239).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListThemeVersionsInput,
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(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()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::ListThemeVersions::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListThemeVersions",
"quicksight",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}Trait Implementations§
source§impl Clone for ListThemeVersions
impl Clone for ListThemeVersions
source§fn clone(&self) -> ListThemeVersions
fn clone(&self) -> ListThemeVersions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ListThemeVersions
impl Debug for ListThemeVersions
source§impl Default for ListThemeVersions
impl Default for ListThemeVersions
source§fn default() -> ListThemeVersions
fn default() -> ListThemeVersions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ListThemeVersions
impl Send for ListThemeVersions
impl Sync for ListThemeVersions
impl Unpin for ListThemeVersions
impl UnwindSafe for ListThemeVersions
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
§type Output = <T as ParseStrictResponse>::Output
type Output = <T as ParseStrictResponse>::Output
Output type of the HttpResponse. Read more
source§fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
Parse an HTTP request without reading the body. If the body must be provided to proceed,
return
None Read moresource§fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
Parse an HTTP request from a fully loaded body. This is for standard request/response style
APIs like AwsJson 1.0/1.1 and the error path of most streaming APIs Read more