AWS SDK

AWS SDK

rev. dc1b11a614d928cff165eac12e20d37ae979d6cc

Files changed:

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content.rs

@@ -1,0 +404,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Orchestration and serialization glue logic for `SelectObjectContent`.
    3         -
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4         -
#[non_exhaustive]
    5         -
pub struct SelectObjectContent;
    6         -
impl SelectObjectContent {
    7         -
    /// Creates a new `SelectObjectContent`
    8         -
    pub fn new() -> Self {
    9         -
        Self
   10         -
    }
   11         -
    pub(crate) async fn orchestrate(
   12         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13         -
        input: crate::operation::select_object_content::SelectObjectContentInput,
   14         -
    ) -> ::std::result::Result<
   15         -
        crate::operation::select_object_content::SelectObjectContentOutput,
   16         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   17         -
            crate::operation::select_object_content::SelectObjectContentError,
   18         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19         -
        >,
   20         -
    > {
   21         -
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
   22         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   23         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   24         -
        >| {
   25         -
            err.map_service_error(|err| {
   26         -
                err.downcast::<crate::operation::select_object_content::SelectObjectContentError>()
   27         -
                    .expect("correct error type")
   28         -
            })
   29         -
        };
   30         -
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
   31         -
            .await
   32         -
            .map_err(map_err)?;
   33         -
        let output = context.finalize().map_err(map_err)?;
   34         -
        ::std::result::Result::Ok(
   35         -
            output
   36         -
                .downcast::<crate::operation::select_object_content::SelectObjectContentOutput>()
   37         -
                .expect("correct output type"),
   38         -
        )
   39         -
    }
   40         -
   41         -
    pub(crate) async fn orchestrate_with_stop_point(
   42         -
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   43         -
        input: crate::operation::select_object_content::SelectObjectContentInput,
   44         -
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
   45         -
    ) -> ::std::result::Result<
   46         -
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
   47         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   48         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   49         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   50         -
        >,
   51         -
    > {
   52         -
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
   53         -
        use ::tracing::Instrument;
   54         -
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("S3", "SelectObjectContent", input, runtime_plugins, stop_point)
   55         -
            // Create a parent span for the entire operation. Includes a random, internal-only,
   56         -
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
   57         -
            .instrument(::tracing::debug_span!(
   58         -
                "S3.SelectObjectContent",
   59         -
                "rpc.service" = "S3",
   60         -
                "rpc.method" = "SelectObjectContent",
   61         -
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
   62         -
                "rpc.system" = "aws-api",
   63         -
            ))
   64         -
            .await
   65         -
    }
   66         -
   67         -
    pub(crate) fn operation_runtime_plugins(
   68         -
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   69         -
        client_config: &crate::config::Config,
   70         -
        config_override: ::std::option::Option<crate::config::Builder>,
   71         -
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
   72         -
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
   73         -
   74         -
        if let ::std::option::Option::Some(config_override) = config_override {
   75         -
            for plugin in config_override.runtime_plugins.iter().cloned() {
   76         -
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   77         -
            }
   78         -
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   79         -
                config_override,
   80         -
                client_config.config.clone(),
   81         -
                &client_config.runtime_components,
   82         -
            ));
   83         -
        }
   84         -
        runtime_plugins
   85         -
    }
   86         -
}
   87         -
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for SelectObjectContent {
   88         -
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   89         -
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("SelectObjectContent");
   90         -
   91         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   92         -
            SelectObjectContentRequestSerializer,
   93         -
        ));
   94         -
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   95         -
            SelectObjectContentResponseDeserializer,
   96         -
        ));
   97         -
   98         -
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   99         -
            crate::config::auth::Params::builder()
  100         -
                .operation_name("SelectObjectContent")
  101         -
                .build()
  102         -
                .expect("required fields set"),
  103         -
        ));
  104         -
  105         -
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("SelectObjectContent", "S3"));
  106         -
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
  107         -
        signing_options.double_uri_encode = false;
  108         -
        signing_options.content_sha256_header = true;
  109         -
        signing_options.normalize_uri_path = false;
  110         -
        signing_options.payload_override = None;
  111         -
  112         -
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
  113         -
            signing_options,
  114         -
            ..::std::default::Default::default()
  115         -
        });
  116         -
  117         -
        ::std::option::Option::Some(cfg.freeze())
  118         -
    }
  119         -
  120         -
    fn runtime_components(
  121         -
        &self,
  122         -
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  123         -
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  124         -
        #[allow(unused_mut)]
  125         -
                    let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("SelectObjectContent")
  126         -
                            .with_interceptor(SelectObjectContentEndpointParamsInterceptor)
  127         -
                            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<crate::operation::select_object_content::SelectObjectContentError>::new())
  128         -
.with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<crate::operation::select_object_content::SelectObjectContentError>::new())
  129         -
.with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<crate::operation::select_object_content::SelectObjectContentError>::builder().transient_errors({
  130         -
                                            let mut transient_errors: Vec<&'static str> = ::aws_runtime::retries::classifiers::TRANSIENT_ERRORS.into();
  131         -
                                            transient_errors.push("InternalError");
  132         -
                                            ::std::borrow::Cow::Owned(transient_errors)
  133         -
                                            }).build());
  134         -
  135         -
        ::std::borrow::Cow::Owned(rcb)
  136         -
    }
  137         -
}
  138         -
  139         -
#[derive(Debug)]
  140         -
struct SelectObjectContentResponseDeserializer;
  141         -
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SelectObjectContentResponseDeserializer {
  142         -
    fn deserialize_streaming(
  143         -
        &self,
  144         -
        response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  145         -
    ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
  146         -
        #[allow(unused_mut)]
  147         -
        let mut force_error = false;
  148         -
        ::tracing::debug!(extended_request_id = ?crate::s3_request_id::RequestIdExt::extended_request_id(response));
  149         -
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
  150         -
  151         -
        // If this is an error, defer to the non-streaming parser
  152         -
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  153         -
            return ::std::option::Option::None;
  154         -
        }
  155         -
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  156         -
            crate::protocol_serde::shape_select_object_content::de_select_object_content_http_response(response),
  157         -
        ))
  158         -
    }
  159         -
  160         -
    fn deserialize_nonstreaming(
  161         -
        &self,
  162         -
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  163         -
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  164         -
        // For streaming operations, we only hit this case if its an error
  165         -
        let body = response.body().bytes().expect("body loaded");
  166         -
        crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_select_object_content::de_select_object_content_http_error(
  167         -
            response.status().as_u16(),
  168         -
            response.headers(),
  169         -
            body,
  170         -
        ))
  171         -
    }
  172         -
}
  173         -
#[derive(Debug)]
  174         -
struct SelectObjectContentRequestSerializer;
  175         -
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SelectObjectContentRequestSerializer {
  176         -
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  177         -
    fn serialize_input(
  178         -
        &self,
  179         -
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  180         -
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  181         -
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  182         -
        let input = input
  183         -
            .downcast::<crate::operation::select_object_content::SelectObjectContentInput>()
  184         -
            .expect("correct type");
  185         -
        let _header_serialization_settings = _cfg
  186         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  187         -
            .cloned()
  188         -
            .unwrap_or_default();
  189         -
        let mut request_builder = {
  190         -
            #[allow(clippy::uninlined_format_args)]
  191         -
            fn uri_base(
  192         -
                _input: &crate::operation::select_object_content::SelectObjectContentInput,
  193         -
                output: &mut ::std::string::String,
  194         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  195         -
                use ::std::fmt::Write as _;
  196         -
                let input_1 = &_input.key;
  197         -
                let input_1 = input_1
  198         -
                    .as_ref()
  199         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("key", "cannot be empty or unset"))?;
  200         -
                let key = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Greedy);
  201         -
                if key.is_empty() {
  202         -
                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
  203         -
                        "key",
  204         -
                        "cannot be empty or unset",
  205         -
                    ));
  206         -
                }
  207         -
                ::std::write!(output, "/{Key}", Key = key).expect("formatting should succeed");
  208         -
                ::std::result::Result::Ok(())
  209         -
            }
  210         -
            fn uri_query(
  211         -
                _input: &crate::operation::select_object_content::SelectObjectContentInput,
  212         -
                mut output: &mut ::std::string::String,
  213         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  214         -
                let mut query = ::aws_smithy_http::query::Writer::new(output);
  215         -
                query.push_v("select");
  216         -
                query.push_kv("select-type", "2");
  217         -
                ::std::result::Result::Ok(())
  218         -
            }
  219         -
            #[allow(clippy::unnecessary_wraps)]
  220         -
            fn update_http_builder(
  221         -
                input: &crate::operation::select_object_content::SelectObjectContentInput,
  222         -
                builder: ::http::request::Builder,
  223         -
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  224         -
                let mut uri = ::std::string::String::new();
  225         -
                uri_base(input, &mut uri)?;
  226         -
                uri_query(input, &mut uri)?;
  227         -
                let builder = crate::protocol_serde::shape_select_object_content::ser_select_object_content_headers(input, builder)?;
  228         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  229         -
            }
  230         -
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  231         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  232         -
            builder
  233         -
        };
  234         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_select_object_content::ser_select_object_content_op_input(
  235         -
            &input,
  236         -
        )?);
  237         -
        if let Some(content_length) = body.content_length() {
  238         -
            let content_length = content_length.to_string();
  239         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  240         -
        }
  241         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  242         -
    }
  243         -
}
  244         -
#[derive(Debug)]
  245         -
struct SelectObjectContentEndpointParamsInterceptor;
  246         -
  247         -
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SelectObjectContentEndpointParamsInterceptor {
  248         -
    fn name(&self) -> &'static str {
  249         -
        "SelectObjectContentEndpointParamsInterceptor"
  250         -
    }
  251         -
  252         -
    fn read_before_execution(
  253         -
        &self,
  254         -
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  255         -
            '_,
  256         -
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  257         -
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  258         -
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  259         -
        >,
  260         -
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  261         -
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  262         -
        let _input = context
  263         -
            .input()
  264         -
            .downcast_ref::<SelectObjectContentInput>()
  265         -
            .ok_or("failed to downcast to SelectObjectContentInput")?;
  266         -
  267         -
        let params = crate::config::endpoint::Params::builder()
  268         -
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
  269         -
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
  270         -
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
  271         -
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
  272         -
            .set_force_path_style(cfg.load::<crate::config::ForcePathStyle>().map(|ty| ty.0))
  273         -
            .set_use_arn_region(cfg.load::<crate::config::UseArnRegion>().map(|ty| ty.0))
  274         -
            .set_disable_multi_region_access_points(cfg.load::<crate::config::DisableMultiRegionAccessPoints>().map(|ty| ty.0))
  275         -
            .set_accelerate(cfg.load::<crate::config::Accelerate>().map(|ty| ty.0))
  276         -
            .set_disable_s3_express_session_auth(cfg.load::<crate::config::DisableS3ExpressSessionAuth>().map(|ty| ty.0))
  277         -
            .set_bucket(Some(
  278         -
                _input
  279         -
                    .bucket
  280         -
                    .clone()
  281         -
                    .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
  282         -
                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bucket", "A required field was not set"))?,
  283         -
            ))
  284         -
            .build()
  285         -
            .map_err(|err| {
  286         -
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  287         -
            })?;
  288         -
        cfg.interceptor_state()
  289         -
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  290         -
        ::std::result::Result::Ok(())
  291         -
    }
  292         -
}
  293         -
  294         -
// The get_* functions below are generated from JMESPath expressions in the
  295         -
// operationContextParams trait. They target the operation's input shape.
  296         -
  297         -
/// Error type for the `SelectObjectContentError` operation.
  298         -
#[non_exhaustive]
  299         -
#[derive(::std::fmt::Debug)]
  300         -
pub enum SelectObjectContentError {
  301         -
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  302         -
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  303         -
    variable wildcard pattern and check `.code()`:
  304         -
     \
  305         -
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  306         -
     \
  307         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SelectObjectContentError) for what information is available for the error.")]
  308         -
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  309         -
}
  310         -
impl SelectObjectContentError {
  311         -
    /// Creates the `SelectObjectContentError::Unhandled` variant from any error type.
  312         -
    pub fn unhandled(
  313         -
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  314         -
    ) -> Self {
  315         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  316         -
            source: err.into(),
  317         -
            meta: ::std::default::Default::default(),
  318         -
        })
  319         -
    }
  320         -
  321         -
    /// Creates the `SelectObjectContentError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  322         -
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  323         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  324         -
            source: err.clone().into(),
  325         -
            meta: err,
  326         -
        })
  327         -
    }
  328         -
    ///
  329         -
    /// Returns error metadata, which includes the error code, message,
  330         -
    /// request ID, and potentially additional information.
  331         -
    ///
  332         -
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  333         -
        match self {
  334         -
            Self::Unhandled(e) => &e.meta,
  335         -
        }
  336         -
    }
  337         -
}
  338         -
impl ::std::error::Error for SelectObjectContentError {
  339         -
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  340         -
        match self {
  341         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  342         -
        }
  343         -
    }
  344         -
}
  345         -
impl ::std::fmt::Display for SelectObjectContentError {
  346         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  347         -
        match self {
  348         -
            Self::Unhandled(_inner) => {
  349         -
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  350         -
                    write!(f, "unhandled error ({code})")
  351         -
                } else {
  352         -
                    f.write_str("unhandled error")
  353         -
                }
  354         -
            }
  355         -
        }
  356         -
    }
  357         -
}
  358         -
impl ::aws_smithy_types::retry::ProvideErrorKind for SelectObjectContentError {
  359         -
    fn code(&self) -> ::std::option::Option<&str> {
  360         -
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  361         -
    }
  362         -
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  363         -
        ::std::option::Option::None
  364         -
    }
  365         -
}
  366         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SelectObjectContentError {
  367         -
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  368         -
        match self {
  369         -
            Self::Unhandled(_inner) => &_inner.meta,
  370         -
        }
  371         -
    }
  372         -
}
  373         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SelectObjectContentError {
  374         -
    fn create_unhandled_error(
  375         -
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  376         -
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  377         -
    ) -> Self {
  378         -
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  379         -
            source,
  380         -
            meta: meta.unwrap_or_default(),
  381         -
        })
  382         -
    }
  383         -
}
  384         -
impl crate::s3_request_id::RequestIdExt for crate::operation::select_object_content::SelectObjectContentError {
  385         -
    fn extended_request_id(&self) -> Option<&str> {
  386         -
        self.meta().extended_request_id()
  387         -
    }
  388         -
}
  389         -
impl ::aws_types::request_id::RequestId for crate::operation::select_object_content::SelectObjectContentError {
  390         -
    fn request_id(&self) -> Option<&str> {
  391         -
        self.meta().request_id()
  392         -
    }
  393         -
}
  394         -
  395         -
pub use crate::operation::select_object_content::_select_object_content_output::SelectObjectContentOutput;
  396         -
  397         -
pub use crate::operation::select_object_content::_select_object_content_input::SelectObjectContentInput;
  398         -
  399         -
mod _select_object_content_input;
  400         -
  401         -
mod _select_object_content_output;
  402         -
  403         -
/// Builders
  404         -
pub mod builders;

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content/_select_object_content_input.rs

@@ -1,0 +460,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <note>
    4         -
/// <p>Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
    5         -
/// </note>
    6         -
/// <p>Request to filter the contents of an Amazon S3 object based on a simple Structured Query Language (SQL) statement. In the request, along with the SQL expression, you must specify a data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data into records. It returns only records that match the specified SQL expression. You must also specify the data serialization format for the response. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html">S3Select API Documentation</a>.</p>
    7         -
#[non_exhaustive]
    8         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
    9         -
pub struct SelectObjectContentInput {
   10         -
    /// <p>The S3 bucket.</p>
   11         -
    pub bucket: ::std::option::Option<::std::string::String>,
   12         -
    /// <p>The object key.</p>
   13         -
    pub key: ::std::option::Option<::std::string::String>,
   14         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   15         -
    pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
   16         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   17         -
    pub sse_customer_key: ::std::option::Option<::std::string::String>,
   18         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   19         -
    pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
   20         -
    /// <p>The expression that is used to query the object.</p>
   21         -
    pub expression: ::std::option::Option<::std::string::String>,
   22         -
    /// <p>The type of the provided expression (for example, SQL).</p>
   23         -
    pub expression_type: ::std::option::Option<crate::types::ExpressionType>,
   24         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
   25         -
    pub request_progress: ::std::option::Option<crate::types::RequestProgress>,
   26         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
   27         -
    pub input_serialization: ::std::option::Option<crate::types::InputSerialization>,
   28         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
   29         -
    pub output_serialization: ::std::option::Option<crate::types::OutputSerialization>,
   30         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
   31         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
   32         -
    /// <ul>
   33         -
    /// <li>
   34         -
    /// <p><code><scanrange>
   35         -
    /// <start>
   36         -
    /// 50
   37         -
    /// </start>
   38         -
    /// <end>
   39         -
    /// 100
   40         -
    /// </end>
   41         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
   42         -
    /// <li>
   43         -
    /// <p><code><scanrange>
   44         -
    /// <start>
   45         -
    /// 50
   46         -
    /// </start>
   47         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
   48         -
    /// <li>
   49         -
    /// <p><code><scanrange>
   50         -
    /// <end>
   51         -
    /// 50
   52         -
    /// </end>
   53         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
   54         -
    /// </ul>
   55         -
    pub scan_range: ::std::option::Option<crate::types::ScanRange>,
   56         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
   57         -
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
   58         -
}
   59         -
impl SelectObjectContentInput {
   60         -
    /// <p>The S3 bucket.</p>
   61         -
    pub fn bucket(&self) -> ::std::option::Option<&str> {
   62         -
        self.bucket.as_deref()
   63         -
    }
   64         -
    /// <p>The object key.</p>
   65         -
    pub fn key(&self) -> ::std::option::Option<&str> {
   66         -
        self.key.as_deref()
   67         -
    }
   68         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   69         -
    pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
   70         -
        self.sse_customer_algorithm.as_deref()
   71         -
    }
   72         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   73         -
    pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
   74         -
        self.sse_customer_key.as_deref()
   75         -
    }
   76         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
   77         -
    pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
   78         -
        self.sse_customer_key_md5.as_deref()
   79         -
    }
   80         -
    /// <p>The expression that is used to query the object.</p>
   81         -
    pub fn expression(&self) -> ::std::option::Option<&str> {
   82         -
        self.expression.as_deref()
   83         -
    }
   84         -
    /// <p>The type of the provided expression (for example, SQL).</p>
   85         -
    pub fn expression_type(&self) -> ::std::option::Option<&crate::types::ExpressionType> {
   86         -
        self.expression_type.as_ref()
   87         -
    }
   88         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
   89         -
    pub fn request_progress(&self) -> ::std::option::Option<&crate::types::RequestProgress> {
   90         -
        self.request_progress.as_ref()
   91         -
    }
   92         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
   93         -
    pub fn input_serialization(&self) -> ::std::option::Option<&crate::types::InputSerialization> {
   94         -
        self.input_serialization.as_ref()
   95         -
    }
   96         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
   97         -
    pub fn output_serialization(&self) -> ::std::option::Option<&crate::types::OutputSerialization> {
   98         -
        self.output_serialization.as_ref()
   99         -
    }
  100         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  101         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  102         -
    /// <ul>
  103         -
    /// <li>
  104         -
    /// <p><code><scanrange>
  105         -
    /// <start>
  106         -
    /// 50
  107         -
    /// </start>
  108         -
    /// <end>
  109         -
    /// 100
  110         -
    /// </end>
  111         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  112         -
    /// <li>
  113         -
    /// <p><code><scanrange>
  114         -
    /// <start>
  115         -
    /// 50
  116         -
    /// </start>
  117         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  118         -
    /// <li>
  119         -
    /// <p><code><scanrange>
  120         -
    /// <end>
  121         -
    /// 50
  122         -
    /// </end>
  123         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  124         -
    /// </ul>
  125         -
    pub fn scan_range(&self) -> ::std::option::Option<&crate::types::ScanRange> {
  126         -
        self.scan_range.as_ref()
  127         -
    }
  128         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  129         -
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
  130         -
        self.expected_bucket_owner.as_deref()
  131         -
    }
  132         -
}
  133         -
impl ::std::fmt::Debug for SelectObjectContentInput {
  134         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  135         -
        let mut formatter = f.debug_struct("SelectObjectContentInput");
  136         -
        formatter.field("bucket", &self.bucket);
  137         -
        formatter.field("key", &self.key);
  138         -
        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
  139         -
        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
  140         -
        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
  141         -
        formatter.field("expression", &self.expression);
  142         -
        formatter.field("expression_type", &self.expression_type);
  143         -
        formatter.field("request_progress", &self.request_progress);
  144         -
        formatter.field("input_serialization", &self.input_serialization);
  145         -
        formatter.field("output_serialization", &self.output_serialization);
  146         -
        formatter.field("scan_range", &self.scan_range);
  147         -
        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
  148         -
        formatter.finish()
  149         -
    }
  150         -
}
  151         -
impl SelectObjectContentInput {
  152         -
    /// Creates a new builder-style object to manufacture [`SelectObjectContentInput`](crate::operation::select_object_content::SelectObjectContentInput).
  153         -
    pub fn builder() -> crate::operation::select_object_content::builders::SelectObjectContentInputBuilder {
  154         -
        crate::operation::select_object_content::builders::SelectObjectContentInputBuilder::default()
  155         -
    }
  156         -
}
  157         -
  158         -
/// A builder for [`SelectObjectContentInput`](crate::operation::select_object_content::SelectObjectContentInput).
  159         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
  160         -
#[non_exhaustive]
  161         -
pub struct SelectObjectContentInputBuilder {
  162         -
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
  163         -
    pub(crate) key: ::std::option::Option<::std::string::String>,
  164         -
    pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
  165         -
    pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
  166         -
    pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
  167         -
    pub(crate) expression: ::std::option::Option<::std::string::String>,
  168         -
    pub(crate) expression_type: ::std::option::Option<crate::types::ExpressionType>,
  169         -
    pub(crate) request_progress: ::std::option::Option<crate::types::RequestProgress>,
  170         -
    pub(crate) input_serialization: ::std::option::Option<crate::types::InputSerialization>,
  171         -
    pub(crate) output_serialization: ::std::option::Option<crate::types::OutputSerialization>,
  172         -
    pub(crate) scan_range: ::std::option::Option<crate::types::ScanRange>,
  173         -
    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
  174         -
}
  175         -
impl SelectObjectContentInputBuilder {
  176         -
    /// <p>The S3 bucket.</p>
  177         -
    /// This field is required.
  178         -
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  179         -
        self.bucket = ::std::option::Option::Some(input.into());
  180         -
        self
  181         -
    }
  182         -
    /// <p>The S3 bucket.</p>
  183         -
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  184         -
        self.bucket = input;
  185         -
        self
  186         -
    }
  187         -
    /// <p>The S3 bucket.</p>
  188         -
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
  189         -
        &self.bucket
  190         -
    }
  191         -
    /// <p>The object key.</p>
  192         -
    /// This field is required.
  193         -
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  194         -
        self.key = ::std::option::Option::Some(input.into());
  195         -
        self
  196         -
    }
  197         -
    /// <p>The object key.</p>
  198         -
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  199         -
        self.key = input;
  200         -
        self
  201         -
    }
  202         -
    /// <p>The object key.</p>
  203         -
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
  204         -
        &self.key
  205         -
    }
  206         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  207         -
    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  208         -
        self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
  209         -
        self
  210         -
    }
  211         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  212         -
    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  213         -
        self.sse_customer_algorithm = input;
  214         -
        self
  215         -
    }
  216         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  217         -
    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
  218         -
        &self.sse_customer_algorithm
  219         -
    }
  220         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  221         -
    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  222         -
        self.sse_customer_key = ::std::option::Option::Some(input.into());
  223         -
        self
  224         -
    }
  225         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  226         -
    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  227         -
        self.sse_customer_key = input;
  228         -
        self
  229         -
    }
  230         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  231         -
    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
  232         -
        &self.sse_customer_key
  233         -
    }
  234         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  235         -
    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  236         -
        self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
  237         -
        self
  238         -
    }
  239         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  240         -
    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  241         -
        self.sse_customer_key_md5 = input;
  242         -
        self
  243         -
    }
  244         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  245         -
    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
  246         -
        &self.sse_customer_key_md5
  247         -
    }
  248         -
    /// <p>The expression that is used to query the object.</p>
  249         -
    /// This field is required.
  250         -
    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  251         -
        self.expression = ::std::option::Option::Some(input.into());
  252         -
        self
  253         -
    }
  254         -
    /// <p>The expression that is used to query the object.</p>
  255         -
    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  256         -
        self.expression = input;
  257         -
        self
  258         -
    }
  259         -
    /// <p>The expression that is used to query the object.</p>
  260         -
    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
  261         -
        &self.expression
  262         -
    }
  263         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  264         -
    /// This field is required.
  265         -
    pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
  266         -
        self.expression_type = ::std::option::Option::Some(input);
  267         -
        self
  268         -
    }
  269         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  270         -
    pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
  271         -
        self.expression_type = input;
  272         -
        self
  273         -
    }
  274         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  275         -
    pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
  276         -
        &self.expression_type
  277         -
    }
  278         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  279         -
    pub fn request_progress(mut self, input: crate::types::RequestProgress) -> Self {
  280         -
        self.request_progress = ::std::option::Option::Some(input);
  281         -
        self
  282         -
    }
  283         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  284         -
    pub fn set_request_progress(mut self, input: ::std::option::Option<crate::types::RequestProgress>) -> Self {
  285         -
        self.request_progress = input;
  286         -
        self
  287         -
    }
  288         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  289         -
    pub fn get_request_progress(&self) -> &::std::option::Option<crate::types::RequestProgress> {
  290         -
        &self.request_progress
  291         -
    }
  292         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  293         -
    /// This field is required.
  294         -
    pub fn input_serialization(mut self, input: crate::types::InputSerialization) -> Self {
  295         -
        self.input_serialization = ::std::option::Option::Some(input);
  296         -
        self
  297         -
    }
  298         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  299         -
    pub fn set_input_serialization(mut self, input: ::std::option::Option<crate::types::InputSerialization>) -> Self {
  300         -
        self.input_serialization = input;
  301         -
        self
  302         -
    }
  303         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  304         -
    pub fn get_input_serialization(&self) -> &::std::option::Option<crate::types::InputSerialization> {
  305         -
        &self.input_serialization
  306         -
    }
  307         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  308         -
    /// This field is required.
  309         -
    pub fn output_serialization(mut self, input: crate::types::OutputSerialization) -> Self {
  310         -
        self.output_serialization = ::std::option::Option::Some(input);
  311         -
        self
  312         -
    }
  313         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  314         -
    pub fn set_output_serialization(mut self, input: ::std::option::Option<crate::types::OutputSerialization>) -> Self {
  315         -
        self.output_serialization = input;
  316         -
        self
  317         -
    }
  318         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  319         -
    pub fn get_output_serialization(&self) -> &::std::option::Option<crate::types::OutputSerialization> {
  320         -
        &self.output_serialization
  321         -
    }
  322         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  323         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  324         -
    /// <ul>
  325         -
    /// <li>
  326         -
    /// <p><code><scanrange>
  327         -
    /// <start>
  328         -
    /// 50
  329         -
    /// </start>
  330         -
    /// <end>
  331         -
    /// 100
  332         -
    /// </end>
  333         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  334         -
    /// <li>
  335         -
    /// <p><code><scanrange>
  336         -
    /// <start>
  337         -
    /// 50
  338         -
    /// </start>
  339         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  340         -
    /// <li>
  341         -
    /// <p><code><scanrange>
  342         -
    /// <end>
  343         -
    /// 50
  344         -
    /// </end>
  345         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  346         -
    /// </ul>
  347         -
    pub fn scan_range(mut self, input: crate::types::ScanRange) -> Self {
  348         -
        self.scan_range = ::std::option::Option::Some(input);
  349         -
        self
  350         -
    }
  351         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  352         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  353         -
    /// <ul>
  354         -
    /// <li>
  355         -
    /// <p><code><scanrange>
  356         -
    /// <start>
  357         -
    /// 50
  358         -
    /// </start>
  359         -
    /// <end>
  360         -
    /// 100
  361         -
    /// </end>
  362         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  363         -
    /// <li>
  364         -
    /// <p><code><scanrange>
  365         -
    /// <start>
  366         -
    /// 50
  367         -
    /// </start>
  368         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  369         -
    /// <li>
  370         -
    /// <p><code><scanrange>
  371         -
    /// <end>
  372         -
    /// 50
  373         -
    /// </end>
  374         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  375         -
    /// </ul>
  376         -
    pub fn set_scan_range(mut self, input: ::std::option::Option<crate::types::ScanRange>) -> Self {
  377         -
        self.scan_range = input;
  378         -
        self
  379         -
    }
  380         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  381         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  382         -
    /// <ul>
  383         -
    /// <li>
  384         -
    /// <p><code><scanrange>
  385         -
    /// <start>
  386         -
    /// 50
  387         -
    /// </start>
  388         -
    /// <end>
  389         -
    /// 100
  390         -
    /// </end>
  391         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  392         -
    /// <li>
  393         -
    /// <p><code><scanrange>
  394         -
    /// <start>
  395         -
    /// 50
  396         -
    /// </start>
  397         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  398         -
    /// <li>
  399         -
    /// <p><code><scanrange>
  400         -
    /// <end>
  401         -
    /// 50
  402         -
    /// </end>
  403         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  404         -
    /// </ul>
  405         -
    pub fn get_scan_range(&self) -> &::std::option::Option<crate::types::ScanRange> {
  406         -
        &self.scan_range
  407         -
    }
  408         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  409         -
    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  410         -
        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
  411         -
        self
  412         -
    }
  413         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  414         -
    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  415         -
        self.expected_bucket_owner = input;
  416         -
        self
  417         -
    }
  418         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  419         -
    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
  420         -
        &self.expected_bucket_owner
  421         -
    }
  422         -
    /// Consumes the builder and constructs a [`SelectObjectContentInput`](crate::operation::select_object_content::SelectObjectContentInput).
  423         -
    pub fn build(
  424         -
        self,
  425         -
    ) -> ::std::result::Result<crate::operation::select_object_content::SelectObjectContentInput, ::aws_smithy_types::error::operation::BuildError>
  426         -
    {
  427         -
        ::std::result::Result::Ok(crate::operation::select_object_content::SelectObjectContentInput {
  428         -
            bucket: self.bucket,
  429         -
            key: self.key,
  430         -
            sse_customer_algorithm: self.sse_customer_algorithm,
  431         -
            sse_customer_key: self.sse_customer_key,
  432         -
            sse_customer_key_md5: self.sse_customer_key_md5,
  433         -
            expression: self.expression,
  434         -
            expression_type: self.expression_type,
  435         -
            request_progress: self.request_progress,
  436         -
            input_serialization: self.input_serialization,
  437         -
            output_serialization: self.output_serialization,
  438         -
            scan_range: self.scan_range,
  439         -
            expected_bucket_owner: self.expected_bucket_owner,
  440         -
        })
  441         -
    }
  442         -
}
  443         -
impl ::std::fmt::Debug for SelectObjectContentInputBuilder {
  444         -
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  445         -
        let mut formatter = f.debug_struct("SelectObjectContentInputBuilder");
  446         -
        formatter.field("bucket", &self.bucket);
  447         -
        formatter.field("key", &self.key);
  448         -
        formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
  449         -
        formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
  450         -
        formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
  451         -
        formatter.field("expression", &self.expression);
  452         -
        formatter.field("expression_type", &self.expression_type);
  453         -
        formatter.field("request_progress", &self.request_progress);
  454         -
        formatter.field("input_serialization", &self.input_serialization);
  455         -
        formatter.field("output_serialization", &self.output_serialization);
  456         -
        formatter.field("scan_range", &self.scan_range);
  457         -
        formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
  458         -
        formatter.finish()
  459         -
    }
  460         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content/_select_object_content_output.rs

@@ -1,0 +117,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(missing_docs)] // documentation missing in model
    3         -
#[non_exhaustive]
    4         -
#[derive(::std::fmt::Debug)]
    5         -
pub struct SelectObjectContentOutput {
    6         -
    /// <p>The array of results.</p>
    7         -
    pub payload:
    8         -
        crate::event_receiver::EventReceiver<crate::types::SelectObjectContentEventStream, crate::types::error::SelectObjectContentEventStreamError>,
    9         -
    _extended_request_id: Option<String>,
   10         -
    _request_id: Option<String>,
   11         -
}
   12         -
impl SelectObjectContentOutput {
   13         -
    /// <p>The array of results.</p>
   14         -
    pub fn payload(
   15         -
        &self,
   16         -
    ) -> &crate::event_receiver::EventReceiver<crate::types::SelectObjectContentEventStream, crate::types::error::SelectObjectContentEventStreamError>
   17         -
    {
   18         -
        &self.payload
   19         -
    }
   20         -
}
   21         -
impl crate::s3_request_id::RequestIdExt for SelectObjectContentOutput {
   22         -
    fn extended_request_id(&self) -> Option<&str> {
   23         -
        self._extended_request_id.as_deref()
   24         -
    }
   25         -
}
   26         -
impl ::aws_types::request_id::RequestId for SelectObjectContentOutput {
   27         -
    fn request_id(&self) -> Option<&str> {
   28         -
        self._request_id.as_deref()
   29         -
    }
   30         -
}
   31         -
impl SelectObjectContentOutput {
   32         -
    /// Creates a new builder-style object to manufacture [`SelectObjectContentOutput`](crate::operation::select_object_content::SelectObjectContentOutput).
   33         -
    pub fn builder() -> crate::operation::select_object_content::builders::SelectObjectContentOutputBuilder {
   34         -
        crate::operation::select_object_content::builders::SelectObjectContentOutputBuilder::default()
   35         -
    }
   36         -
}
   37         -
   38         -
/// A builder for [`SelectObjectContentOutput`](crate::operation::select_object_content::SelectObjectContentOutput).
   39         -
#[derive(::std::default::Default, ::std::fmt::Debug)]
   40         -
#[non_exhaustive]
   41         -
pub struct SelectObjectContentOutputBuilder {
   42         -
    pub(crate) payload: ::std::option::Option<
   43         -
        crate::event_receiver::EventReceiver<crate::types::SelectObjectContentEventStream, crate::types::error::SelectObjectContentEventStreamError>,
   44         -
    >,
   45         -
    _extended_request_id: Option<String>,
   46         -
    _request_id: Option<String>,
   47         -
}
   48         -
impl SelectObjectContentOutputBuilder {
   49         -
    /// <p>The array of results.</p>
   50         -
    pub fn payload(
   51         -
        mut self,
   52         -
        input: crate::event_receiver::EventReceiver<
   53         -
            crate::types::SelectObjectContentEventStream,
   54         -
            crate::types::error::SelectObjectContentEventStreamError,
   55         -
        >,
   56         -
    ) -> Self {
   57         -
        self.payload = ::std::option::Option::Some(input);
   58         -
        self
   59         -
    }
   60         -
    /// <p>The array of results.</p>
   61         -
    pub fn set_payload(
   62         -
        mut self,
   63         -
        input: ::std::option::Option<
   64         -
            crate::event_receiver::EventReceiver<
   65         -
                crate::types::SelectObjectContentEventStream,
   66         -
                crate::types::error::SelectObjectContentEventStreamError,
   67         -
            >,
   68         -
        >,
   69         -
    ) -> Self {
   70         -
        self.payload = input;
   71         -
        self
   72         -
    }
   73         -
    /// <p>The array of results.</p>
   74         -
    pub fn get_payload(
   75         -
        &self,
   76         -
    ) -> &::std::option::Option<
   77         -
        crate::event_receiver::EventReceiver<crate::types::SelectObjectContentEventStream, crate::types::error::SelectObjectContentEventStreamError>,
   78         -
    > {
   79         -
        &self.payload
   80         -
    }
   81         -
    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
   82         -
        self._extended_request_id = Some(extended_request_id.into());
   83         -
        self
   84         -
    }
   85         -
   86         -
    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
   87         -
        self._extended_request_id = extended_request_id;
   88         -
        self
   89         -
    }
   90         -
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
   91         -
        self._request_id = Some(request_id.into());
   92         -
        self
   93         -
    }
   94         -
   95         -
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
   96         -
        self._request_id = request_id;
   97         -
        self
   98         -
    }
   99         -
    /// Consumes the builder and constructs a [`SelectObjectContentOutput`](crate::operation::select_object_content::SelectObjectContentOutput).
  100         -
    /// This method will fail if any of the following fields are not set:
  101         -
    /// - [`payload`](crate::operation::select_object_content::builders::SelectObjectContentOutputBuilder::payload)
  102         -
    pub fn build(
  103         -
        self,
  104         -
    ) -> ::std::result::Result<crate::operation::select_object_content::SelectObjectContentOutput, ::aws_smithy_types::error::operation::BuildError>
  105         -
    {
  106         -
        ::std::result::Result::Ok(crate::operation::select_object_content::SelectObjectContentOutput {
  107         -
            payload: self.payload.ok_or_else(|| {
  108         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  109         -
                    "payload",
  110         -
                    "payload was not specified but it is required when building SelectObjectContentOutput",
  111         -
                )
  112         -
            })?,
  113         -
            _extended_request_id: self._extended_request_id,
  114         -
            _request_id: self._request_id,
  115         -
        })
  116         -
    }
  117         -
}

tmp-codegen-diff/aws-sdk/sdk/s3/src/operation/select_object_content/builders.rs

@@ -1,0 +446,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::select_object_content::_select_object_content_output::SelectObjectContentOutputBuilder;
    3         -
    4         -
pub use crate::operation::select_object_content::_select_object_content_input::SelectObjectContentInputBuilder;
    5         -
    6         -
impl crate::operation::select_object_content::builders::SelectObjectContentInputBuilder {
    7         -
    /// Sends a request with this input using the given client.
    8         -
    pub async fn send_with(
    9         -
        self,
   10         -
        client: &crate::Client,
   11         -
    ) -> ::std::result::Result<
   12         -
        crate::operation::select_object_content::SelectObjectContentOutput,
   13         -
        ::aws_smithy_runtime_api::client::result::SdkError<
   14         -
            crate::operation::select_object_content::SelectObjectContentError,
   15         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16         -
        >,
   17         -
    > {
   18         -
        let mut fluent_builder = client.select_object_content();
   19         -
        fluent_builder.inner = self;
   20         -
        fluent_builder.send().await
   21         -
    }
   22         -
}
   23         -
/// Fluent builder constructing a request to `SelectObjectContent`.
   24         -
///
   25         -
/// <note>
   26         -
/// <p>This operation is not supported for directory buckets.</p>
   27         -
/// </note>
   28         -
/// <p>This action filters the contents of an Amazon S3 object based on a simple structured query language (SQL) statement. In the request, along with the SQL expression, you must also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.</p>
   29         -
/// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
   30         -
/// <p>For more information about Amazon S3 Select, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html">Selecting Content from Objects</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html">SELECT Command</a> in the <i>Amazon S3 User Guide</i>.</p>
   31         -
/// <p></p>
   32         -
/// <dl>
   33         -
/// <dt>
   34         -
/// Permissions
   35         -
/// </dt>
   36         -
/// <dd>
   37         -
/// <p>You must have the <code>s3:GetObject</code> permission for this operation.&nbsp;Amazon S3 Select does not support anonymous access. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying Permissions in a Policy</a> in the <i>Amazon S3 User Guide</i>.</p>
   38         -
/// </dd>
   39         -
/// <dt>
   40         -
/// Object Data Formats
   41         -
/// </dt>
   42         -
/// <dd>
   43         -
/// <p>You can use Amazon S3 Select to query objects that have the following format properties:</p>
   44         -
/// <ul>
   45         -
/// <li>
   46         -
/// <p><i>CSV, JSON, and Parquet</i> - Objects must be in CSV, JSON, or Parquet format.</p></li>
   47         -
/// <li>
   48         -
/// <p><i>UTF-8</i> - UTF-8 is the only encoding type Amazon S3 Select supports.</p></li>
   49         -
/// <li>
   50         -
/// <p><i>GZIP or BZIP2</i> - CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.</p></li>
   51         -
/// <li>
   52         -
/// <p><i>Server-side encryption</i> - Amazon S3 Select supports querying objects that are protected with server-side encryption.</p>
   53         -
/// <p>For objects that are encrypted with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use the headers that are documented in the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>. For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p>
   54         -
/// <p>For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, so you don't need to specify anything. For more information about server-side encryption, including SSE-S3 and SSE-KMS, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
   55         -
/// </ul>
   56         -
/// </dd>
   57         -
/// <dt>
   58         -
/// Working with the Response Body
   59         -
/// </dt>
   60         -
/// <dd>
   61         -
/// <p>Given the response size is unknown, Amazon S3 Select streams the response as a series of messages and includes a <code>Transfer-Encoding</code> header with <code>chunked</code> as its value in the response. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html">Appendix: SelectObjectContent Response</a>.</p>
   62         -
/// </dd>
   63         -
/// <dt>
   64         -
/// GetObject Support
   65         -
/// </dt>
   66         -
/// <dd>
   67         -
/// <p>The <code>SelectObjectContent</code> action does not support the following <code>GetObject</code> functionality. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>.</p>
   68         -
/// <ul>
   69         -
/// <li>
   70         -
/// <p><code>Range</code>: Although you can specify a scan range for an Amazon S3 Select request (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange">SelectObjectContentRequest - ScanRange</a> in the request parameters), you cannot specify the range of bytes of an object to return.</p></li>
   71         -
/// <li>
   72         -
/// <p>The <code>GLACIER</code>, <code>DEEP_ARCHIVE</code>, and <code>REDUCED_REDUNDANCY</code> storage classes, or the <code>ARCHIVE_ACCESS</code> and <code>DEEP_ARCHIVE_ACCESS</code> access tiers of the <code>INTELLIGENT_TIERING</code> storage class: You cannot query objects in the <code>GLACIER</code>, <code>DEEP_ARCHIVE</code>, or <code>REDUCED_REDUNDANCY</code> storage classes, nor objects in the <code>ARCHIVE_ACCESS</code> or <code>DEEP_ARCHIVE_ACCESS</code> access tiers of the <code>INTELLIGENT_TIERING</code> storage class. For more information about storage classes, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html">Using Amazon S3 storage classes</a> in the <i>Amazon S3 User Guide</i>.</p></li>
   73         -
/// </ul>
   74         -
/// </dd>
   75         -
/// <dt>
   76         -
/// Special Errors
   77         -
/// </dt>
   78         -
/// <dd>
   79         -
/// <p>For a list of special errors for this operation, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList">List of SELECT Object Content Error Codes</a></p>
   80         -
/// </dd>
   81         -
/// </dl>
   82         -
/// <p>The following operations are related to <code>SelectObjectContent</code>:</p>
   83         -
/// <ul>
   84         -
/// <li>
   85         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
   86         -
/// <li>
   87         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html">GetBucketLifecycleConfiguration</a></p></li>
   88         -
/// <li>
   89         -
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html">PutBucketLifecycleConfiguration</a></p></li>
   90         -
/// </ul>
   91         -
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   92         -
pub struct SelectObjectContentFluentBuilder {
   93         -
    handle: ::std::sync::Arc<crate::client::Handle>,
   94         -
    inner: crate::operation::select_object_content::builders::SelectObjectContentInputBuilder,
   95         -
    config_override: ::std::option::Option<crate::config::Builder>,
   96         -
}
   97         -
impl
   98         -
    crate::client::customize::internal::CustomizableSend<
   99         -
        crate::operation::select_object_content::SelectObjectContentOutput,
  100         -
        crate::operation::select_object_content::SelectObjectContentError,
  101         -
    > for SelectObjectContentFluentBuilder
  102         -
{
  103         -
    fn send(
  104         -
        self,
  105         -
        config_override: crate::config::Builder,
  106         -
    ) -> crate::client::customize::internal::BoxFuture<
  107         -
        crate::client::customize::internal::SendResult<
  108         -
            crate::operation::select_object_content::SelectObjectContentOutput,
  109         -
            crate::operation::select_object_content::SelectObjectContentError,
  110         -
        >,
  111         -
    > {
  112         -
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
  113         -
    }
  114         -
}
  115         -
impl SelectObjectContentFluentBuilder {
  116         -
    /// Creates a new `SelectObjectContentFluentBuilder`.
  117         -
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
  118         -
        Self {
  119         -
            handle,
  120         -
            inner: ::std::default::Default::default(),
  121         -
            config_override: ::std::option::Option::None,
  122         -
        }
  123         -
    }
  124         -
    /// Access the SelectObjectContent as a reference.
  125         -
    pub fn as_input(&self) -> &crate::operation::select_object_content::builders::SelectObjectContentInputBuilder {
  126         -
        &self.inner
  127         -
    }
  128         -
    /// Sends the request and returns the response.
  129         -
    ///
  130         -
    /// If an error occurs, an `SdkError` will be returned with additional details that
  131         -
    /// can be matched against.
  132         -
    ///
  133         -
    /// By default, any retryable failures will be retried twice. Retry behavior
  134         -
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
  135         -
    /// set when configuring the client.
  136         -
    pub async fn send(
  137         -
        self,
  138         -
    ) -> ::std::result::Result<
  139         -
        crate::operation::select_object_content::SelectObjectContentOutput,
  140         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  141         -
            crate::operation::select_object_content::SelectObjectContentError,
  142         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  143         -
        >,
  144         -
    > {
  145         -
        let input = self
  146         -
            .inner
  147         -
            .build()
  148         -
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  149         -
        let runtime_plugins = crate::operation::select_object_content::SelectObjectContent::operation_runtime_plugins(
  150         -
            self.handle.runtime_plugins.clone(),
  151         -
            &self.handle.conf,
  152         -
            self.config_override,
  153         -
        );
  154         -
        let mut output = crate::operation::select_object_content::SelectObjectContent::orchestrate(&runtime_plugins, input).await?;
  155         -
  156         -
        // Converts any error encountered beyond this point into an `SdkError` response error
  157         -
        // with an `HttpResponse`. However, since we have already exited the `orchestrate`
  158         -
        // function, the original `HttpResponse` is no longer available and cannot be restored.
  159         -
        // This means that header information from the original response has been lost.
  160         -
        //
  161         -
        // Note that the response body would have been consumed by the deserializer
  162         -
        // regardless, even if the initial message was hypothetically processed during
  163         -
        // the orchestrator's deserialization phase but later resulted in an error.
  164         -
        fn response_error(
  165         -
            err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
  166         -
        ) -> ::aws_smithy_runtime_api::client::result::SdkError<
  167         -
            crate::operation::select_object_content::SelectObjectContentError,
  168         -
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  169         -
        > {
  170         -
            ::aws_smithy_runtime_api::client::result::SdkError::response_error(
  171         -
                err,
  172         -
                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
  173         -
                    ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
  174         -
                    ::aws_smithy_types::body::SdkBody::empty(),
  175         -
                ),
  176         -
            )
  177         -
        }
  178         -
  179         -
        let message = output.payload.try_recv_initial_response().await.map_err(response_error)?;
  180         -
  181         -
        match message {
  182         -
            ::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
  183         -
            ::std::option::Option::None => ::std::result::Result::Ok(output),
  184         -
        }
  185         -
    }
  186         -
  187         -
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  188         -
    pub fn customize(
  189         -
        self,
  190         -
    ) -> crate::client::customize::CustomizableOperation<
  191         -
        crate::operation::select_object_content::SelectObjectContentOutput,
  192         -
        crate::operation::select_object_content::SelectObjectContentError,
  193         -
        Self,
  194         -
    > {
  195         -
        crate::client::customize::CustomizableOperation::new(self)
  196         -
    }
  197         -
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  198         -
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  199         -
        self
  200         -
    }
  201         -
  202         -
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  203         -
        self.config_override = config_override;
  204         -
        self
  205         -
    }
  206         -
    /// <p>The S3 bucket.</p>
  207         -
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  208         -
        self.inner = self.inner.bucket(input.into());
  209         -
        self
  210         -
    }
  211         -
    /// <p>The S3 bucket.</p>
  212         -
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  213         -
        self.inner = self.inner.set_bucket(input);
  214         -
        self
  215         -
    }
  216         -
    /// <p>The S3 bucket.</p>
  217         -
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
  218         -
        self.inner.get_bucket()
  219         -
    }
  220         -
    /// <p>The object key.</p>
  221         -
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  222         -
        self.inner = self.inner.key(input.into());
  223         -
        self
  224         -
    }
  225         -
    /// <p>The object key.</p>
  226         -
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  227         -
        self.inner = self.inner.set_key(input);
  228         -
        self
  229         -
    }
  230         -
    /// <p>The object key.</p>
  231         -
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
  232         -
        self.inner.get_key()
  233         -
    }
  234         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  235         -
    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  236         -
        self.inner = self.inner.sse_customer_algorithm(input.into());
  237         -
        self
  238         -
    }
  239         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  240         -
    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  241         -
        self.inner = self.inner.set_sse_customer_algorithm(input);
  242         -
        self
  243         -
    }
  244         -
    /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  245         -
    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
  246         -
        self.inner.get_sse_customer_algorithm()
  247         -
    }
  248         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  249         -
    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  250         -
        self.inner = self.inner.sse_customer_key(input.into());
  251         -
        self
  252         -
    }
  253         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  254         -
    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  255         -
        self.inner = self.inner.set_sse_customer_key(input);
  256         -
        self
  257         -
    }
  258         -
    /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  259         -
    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
  260         -
        self.inner.get_sse_customer_key()
  261         -
    }
  262         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  263         -
    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  264         -
        self.inner = self.inner.sse_customer_key_md5(input.into());
  265         -
        self
  266         -
    }
  267         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  268         -
    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  269         -
        self.inner = self.inner.set_sse_customer_key_md5(input);
  270         -
        self
  271         -
    }
  272         -
    /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p>
  273         -
    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
  274         -
        self.inner.get_sse_customer_key_md5()
  275         -
    }
  276         -
    /// <p>The expression that is used to query the object.</p>
  277         -
    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  278         -
        self.inner = self.inner.expression(input.into());
  279         -
        self
  280         -
    }
  281         -
    /// <p>The expression that is used to query the object.</p>
  282         -
    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  283         -
        self.inner = self.inner.set_expression(input);
  284         -
        self
  285         -
    }
  286         -
    /// <p>The expression that is used to query the object.</p>
  287         -
    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
  288         -
        self.inner.get_expression()
  289         -
    }
  290         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  291         -
    pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
  292         -
        self.inner = self.inner.expression_type(input);
  293         -
        self
  294         -
    }
  295         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  296         -
    pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
  297         -
        self.inner = self.inner.set_expression_type(input);
  298         -
        self
  299         -
    }
  300         -
    /// <p>The type of the provided expression (for example, SQL).</p>
  301         -
    pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
  302         -
        self.inner.get_expression_type()
  303         -
    }
  304         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  305         -
    pub fn request_progress(mut self, input: crate::types::RequestProgress) -> Self {
  306         -
        self.inner = self.inner.request_progress(input);
  307         -
        self
  308         -
    }
  309         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  310         -
    pub fn set_request_progress(mut self, input: ::std::option::Option<crate::types::RequestProgress>) -> Self {
  311         -
        self.inner = self.inner.set_request_progress(input);
  312         -
        self
  313         -
    }
  314         -
    /// <p>Specifies if periodic request progress information should be enabled.</p>
  315         -
    pub fn get_request_progress(&self) -> &::std::option::Option<crate::types::RequestProgress> {
  316         -
        self.inner.get_request_progress()
  317         -
    }
  318         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  319         -
    pub fn input_serialization(mut self, input: crate::types::InputSerialization) -> Self {
  320         -
        self.inner = self.inner.input_serialization(input);
  321         -
        self
  322         -
    }
  323         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  324         -
    pub fn set_input_serialization(mut self, input: ::std::option::Option<crate::types::InputSerialization>) -> Self {
  325         -
        self.inner = self.inner.set_input_serialization(input);
  326         -
        self
  327         -
    }
  328         -
    /// <p>Describes the format of the data in the object that is being queried.</p>
  329         -
    pub fn get_input_serialization(&self) -> &::std::option::Option<crate::types::InputSerialization> {
  330         -
        self.inner.get_input_serialization()
  331         -
    }
  332         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  333         -
    pub fn output_serialization(mut self, input: crate::types::OutputSerialization) -> Self {
  334         -
        self.inner = self.inner.output_serialization(input);
  335         -
        self
  336         -
    }
  337         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  338         -
    pub fn set_output_serialization(mut self, input: ::std::option::Option<crate::types::OutputSerialization>) -> Self {
  339         -
        self.inner = self.inner.set_output_serialization(input);
  340         -
        self
  341         -
    }
  342         -
    /// <p>Describes the format of the data that you want Amazon S3 to return in response.</p>
  343         -
    pub fn get_output_serialization(&self) -> &::std::option::Option<crate::types::OutputSerialization> {
  344         -
        self.inner.get_output_serialization()
  345         -
    }
  346         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  347         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  348         -
    /// <ul>
  349         -
    /// <li>
  350         -
    /// <p><code><scanrange>
  351         -
    /// <start>
  352         -
    /// 50
  353         -
    /// </start>
  354         -
    /// <end>
  355         -
    /// 100
  356         -
    /// </end>
  357         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  358         -
    /// <li>
  359         -
    /// <p><code><scanrange>
  360         -
    /// <start>
  361         -
    /// 50
  362         -
    /// </start>
  363         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  364         -
    /// <li>
  365         -
    /// <p><code><scanrange>
  366         -
    /// <end>
  367         -
    /// 50
  368         -
    /// </end>
  369         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  370         -
    /// </ul>
  371         -
    pub fn scan_range(mut self, input: crate::types::ScanRange) -> Self {
  372         -
        self.inner = self.inner.scan_range(input);
  373         -
        self
  374         -
    }
  375         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  376         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  377         -
    /// <ul>
  378         -
    /// <li>
  379         -
    /// <p><code><scanrange>
  380         -
    /// <start>
  381         -
    /// 50
  382         -
    /// </start>
  383         -
    /// <end>
  384         -
    /// 100
  385         -
    /// </end>
  386         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  387         -
    /// <li>
  388         -
    /// <p><code><scanrange>
  389         -
    /// <start>
  390         -
    /// 50
  391         -
    /// </start>
  392         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  393         -
    /// <li>
  394         -
    /// <p><code><scanrange>
  395         -
    /// <end>
  396         -
    /// 50
  397         -
    /// </end>
  398         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  399         -
    /// </ul>
  400         -
    pub fn set_scan_range(mut self, input: ::std::option::Option<crate::types::ScanRange>) -> Self {
  401         -
        self.inner = self.inner.set_scan_range(input);
  402         -
        self
  403         -
    }
  404         -
    /// <p>Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.</p>
  405         -
    /// <p><code>ScanRange</code>may be used in the following ways:</p>
  406         -
    /// <ul>
  407         -
    /// <li>
  408         -
    /// <p><code><scanrange>
  409         -
    /// <start>
  410         -
    /// 50
  411         -
    /// </start>
  412         -
    /// <end>
  413         -
    /// 100
  414         -
    /// </end>
  415         -
    /// </scanrange></code> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)</p></li>
  416         -
    /// <li>
  417         -
    /// <p><code><scanrange>
  418         -
    /// <start>
  419         -
    /// 50
  420         -
    /// </start>
  421         -
    /// </scanrange></code> - process only the records starting after the byte 50</p></li>
  422         -
    /// <li>
  423         -
    /// <p><code><scanrange>
  424         -
    /// <end>
  425         -
    /// 50
  426         -
    /// </end>
  427         -
    /// </scanrange></code> - process only the records within the last 50 bytes of the file.</p></li>
  428         -
    /// </ul>
  429         -
    pub fn get_scan_range(&self) -> &::std::option::Option<crate::types::ScanRange> {
  430         -
        self.inner.get_scan_range()
  431         -
    }
  432         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  433         -
    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  434         -
        self.inner = self.inner.expected_bucket_owner(input.into());
  435         -
        self
  436         -
    }
  437         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  438         -
    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  439         -
        self.inner = self.inner.set_expected_bucket_owner(input);
  440         -
        self
  441         -
    }
  442         -
    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
  443         -
    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
  444         -
        self.inner.get_expected_bucket_owner()
  445         -
    }
  446         -
}