aws-sdk-sagemakerfeaturestoreruntime 0.24.0

AWS SDK for Amazon SageMaker Feature Store Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
use std::fmt::Write;

/// See [`BatchGetRecordInput`](crate::input::BatchGetRecordInput).
pub mod batch_get_record_input {

    /// A builder for [`BatchGetRecordInput`](crate::input::BatchGetRecordInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) identifiers:
            std::option::Option<std::vec::Vec<crate::model::BatchGetRecordIdentifier>>,
    }
    impl Builder {
        /// Appends an item to `identifiers`.
        ///
        /// To override the contents of this collection use [`set_identifiers`](Self::set_identifiers).
        ///
        /// <p>A list of <code>FeatureGroup</code> names, with their corresponding <code>RecordIdentifier</code> value, and Feature name that have been requested to be retrieved in batch.</p>
        pub fn identifiers(mut self, input: crate::model::BatchGetRecordIdentifier) -> Self {
            let mut v = self.identifiers.unwrap_or_default();
            v.push(input);
            self.identifiers = Some(v);
            self
        }
        /// <p>A list of <code>FeatureGroup</code> names, with their corresponding <code>RecordIdentifier</code> value, and Feature name that have been requested to be retrieved in batch.</p>
        pub fn set_identifiers(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::BatchGetRecordIdentifier>>,
        ) -> Self {
            self.identifiers = input;
            self
        }
        /// Consumes the builder and constructs a [`BatchGetRecordInput`](crate::input::BatchGetRecordInput).
        pub fn build(
            self,
        ) -> Result<crate::input::BatchGetRecordInput, aws_smithy_http::operation::error::BuildError>
        {
            Ok(crate::input::BatchGetRecordInput {
                identifiers: self.identifiers,
            })
        }
    }
}
impl BatchGetRecordInput {
    /// Consumes the builder and constructs an Operation<[`BatchGetRecord`](crate::operation::BatchGetRecord)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::BatchGetRecord,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::BatchGetRecordInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                write!(output, "/BatchGetRecord").expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::BatchGetRecordInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("POST").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder = aws_smithy_http::header::set_request_header_if_absent(
                builder,
                http::header::CONTENT_TYPE,
                "application/json",
            );
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from(
            crate::operation_ser::serialize_operation_crate_operation_batch_get_record(&self)?,
        );
        if let Some(content_length) = body.content_length() {
            request = aws_smithy_http::header::set_request_header_if_absent(
                request,
                http::header::CONTENT_LENGTH,
                content_length,
            );
        }
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::BatchGetRecord::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "BatchGetRecord",
            "sagemakerfeaturestoreruntime",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`BatchGetRecordInput`](crate::input::BatchGetRecordInput).
    pub fn builder() -> crate::input::batch_get_record_input::Builder {
        crate::input::batch_get_record_input::Builder::default()
    }
}

/// See [`DeleteRecordInput`](crate::input::DeleteRecordInput).
pub mod delete_record_input {

    /// A builder for [`DeleteRecordInput`](crate::input::DeleteRecordInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) feature_group_name: std::option::Option<std::string::String>,
        pub(crate) record_identifier_value_as_string: std::option::Option<std::string::String>,
        pub(crate) event_time: std::option::Option<std::string::String>,
        pub(crate) target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
    }
    impl Builder {
        /// <p>The name of the feature group to delete the record from. </p>
        pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.feature_group_name = Some(input.into());
            self
        }
        /// <p>The name of the feature group to delete the record from. </p>
        pub fn set_feature_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.feature_group_name = input;
            self
        }
        /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format. </p>
        pub fn record_identifier_value_as_string(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.record_identifier_value_as_string = Some(input.into());
            self
        }
        /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format. </p>
        pub fn set_record_identifier_value_as_string(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.record_identifier_value_as_string = input;
            self
        }
        /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
        pub fn event_time(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_time = Some(input.into());
            self
        }
        /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
        pub fn set_event_time(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_time = input;
            self
        }
        /// Appends an item to `target_stores`.
        ///
        /// To override the contents of this collection use [`set_target_stores`](Self::set_target_stores).
        ///
        /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
        pub fn target_stores(mut self, input: crate::model::TargetStore) -> Self {
            let mut v = self.target_stores.unwrap_or_default();
            v.push(input);
            self.target_stores = Some(v);
            self
        }
        /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
        pub fn set_target_stores(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
        ) -> Self {
            self.target_stores = input;
            self
        }
        /// Consumes the builder and constructs a [`DeleteRecordInput`](crate::input::DeleteRecordInput).
        pub fn build(
            self,
        ) -> Result<crate::input::DeleteRecordInput, aws_smithy_http::operation::error::BuildError>
        {
            Ok(crate::input::DeleteRecordInput {
                feature_group_name: self.feature_group_name,
                record_identifier_value_as_string: self.record_identifier_value_as_string,
                event_time: self.event_time,
                target_stores: self.target_stores,
            })
        }
    }
}
impl DeleteRecordInput {
    /// Consumes the builder and constructs an Operation<[`DeleteRecord`](crate::operation::DeleteRecord)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::DeleteRecord,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::DeleteRecordInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                let input_1 = &_input.feature_group_name;
                let input_1 = input_1.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "feature_group_name",
                        "cannot be empty or unset",
                    )
                })?;
                let feature_group_name = aws_smithy_http::label::fmt_string(
                    input_1,
                    aws_smithy_http::label::EncodingStrategy::Default,
                );
                if feature_group_name.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "feature_group_name",
                            "cannot be empty or unset",
                        ),
                    );
                }
                write!(
                    output,
                    "/FeatureGroup/{FeatureGroupName}",
                    FeatureGroupName = feature_group_name
                )
                .expect("formatting should succeed");
                Ok(())
            }
            fn uri_query(
                _input: &crate::input::DeleteRecordInput,
                mut output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                let mut query = aws_smithy_http::query::Writer::new(&mut output);
                let inner_2 = &_input.record_identifier_value_as_string;
                let inner_2 = inner_2.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "record_identifier_value_as_string",
                        "cannot be empty or unset",
                    )
                })?;
                if inner_2.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "record_identifier_value_as_string",
                            "cannot be empty or unset",
                        ),
                    );
                }
                query.push_kv(
                    "RecordIdentifierValueAsString",
                    &aws_smithy_http::query::fmt_string(&inner_2),
                );
                let inner_3 = &_input.event_time;
                let inner_3 = inner_3.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "event_time",
                        "cannot be empty or unset",
                    )
                })?;
                if inner_3.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "event_time",
                            "cannot be empty or unset",
                        ),
                    );
                }
                query.push_kv("EventTime", &aws_smithy_http::query::fmt_string(&inner_3));
                if let Some(inner_4) = &_input.target_stores {
                    {
                        for inner_5 in inner_4 {
                            query.push_kv(
                                "TargetStores",
                                &aws_smithy_http::query::fmt_string(&inner_5),
                            );
                        }
                    }
                }
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::DeleteRecordInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                uri_query(input, &mut uri)?;
                Ok(builder.method("DELETE").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from("");
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::DeleteRecord::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "DeleteRecord",
            "sagemakerfeaturestoreruntime",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`DeleteRecordInput`](crate::input::DeleteRecordInput).
    pub fn builder() -> crate::input::delete_record_input::Builder {
        crate::input::delete_record_input::Builder::default()
    }
}

/// See [`GetRecordInput`](crate::input::GetRecordInput).
pub mod get_record_input {

    /// A builder for [`GetRecordInput`](crate::input::GetRecordInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) feature_group_name: std::option::Option<std::string::String>,
        pub(crate) record_identifier_value_as_string: std::option::Option<std::string::String>,
        pub(crate) feature_names: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The name of the feature group from which you want to retrieve a record.</p>
        pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.feature_group_name = Some(input.into());
            self
        }
        /// <p>The name of the feature group from which you want to retrieve a record.</p>
        pub fn set_feature_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.feature_group_name = input;
            self
        }
        /// <p>The value that corresponds to <code>RecordIdentifier</code> type and uniquely identifies the record in the <code>FeatureGroup</code>. </p>
        pub fn record_identifier_value_as_string(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.record_identifier_value_as_string = Some(input.into());
            self
        }
        /// <p>The value that corresponds to <code>RecordIdentifier</code> type and uniquely identifies the record in the <code>FeatureGroup</code>. </p>
        pub fn set_record_identifier_value_as_string(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.record_identifier_value_as_string = input;
            self
        }
        /// Appends an item to `feature_names`.
        ///
        /// To override the contents of this collection use [`set_feature_names`](Self::set_feature_names).
        ///
        /// <p>List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.</p>
        pub fn feature_names(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.feature_names.unwrap_or_default();
            v.push(input.into());
            self.feature_names = Some(v);
            self
        }
        /// <p>List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.</p>
        pub fn set_feature_names(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.feature_names = input;
            self
        }
        /// Consumes the builder and constructs a [`GetRecordInput`](crate::input::GetRecordInput).
        pub fn build(
            self,
        ) -> Result<crate::input::GetRecordInput, aws_smithy_http::operation::error::BuildError>
        {
            Ok(crate::input::GetRecordInput {
                feature_group_name: self.feature_group_name,
                record_identifier_value_as_string: self.record_identifier_value_as_string,
                feature_names: self.feature_names,
            })
        }
    }
}
impl GetRecordInput {
    /// Consumes the builder and constructs an Operation<[`GetRecord`](crate::operation::GetRecord)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::GetRecord,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::GetRecordInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                let input_6 = &_input.feature_group_name;
                let input_6 = input_6.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "feature_group_name",
                        "cannot be empty or unset",
                    )
                })?;
                let feature_group_name = aws_smithy_http::label::fmt_string(
                    input_6,
                    aws_smithy_http::label::EncodingStrategy::Default,
                );
                if feature_group_name.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "feature_group_name",
                            "cannot be empty or unset",
                        ),
                    );
                }
                write!(
                    output,
                    "/FeatureGroup/{FeatureGroupName}",
                    FeatureGroupName = feature_group_name
                )
                .expect("formatting should succeed");
                Ok(())
            }
            fn uri_query(
                _input: &crate::input::GetRecordInput,
                mut output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                let mut query = aws_smithy_http::query::Writer::new(&mut output);
                let inner_7 = &_input.record_identifier_value_as_string;
                let inner_7 = inner_7.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "record_identifier_value_as_string",
                        "cannot be empty or unset",
                    )
                })?;
                if inner_7.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "record_identifier_value_as_string",
                            "cannot be empty or unset",
                        ),
                    );
                }
                query.push_kv(
                    "RecordIdentifierValueAsString",
                    &aws_smithy_http::query::fmt_string(&inner_7),
                );
                if let Some(inner_8) = &_input.feature_names {
                    {
                        for inner_9 in inner_8 {
                            query.push_kv(
                                "FeatureName",
                                &aws_smithy_http::query::fmt_string(&inner_9),
                            );
                        }
                    }
                }
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::GetRecordInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                uri_query(input, &mut uri)?;
                Ok(builder.method("GET").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from("");
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op =
            aws_smithy_http::operation::Operation::new(request, crate::operation::GetRecord::new())
                .with_metadata(aws_smithy_http::operation::Metadata::new(
                    "GetRecord",
                    "sagemakerfeaturestoreruntime",
                ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`GetRecordInput`](crate::input::GetRecordInput).
    pub fn builder() -> crate::input::get_record_input::Builder {
        crate::input::get_record_input::Builder::default()
    }
}

/// See [`PutRecordInput`](crate::input::PutRecordInput).
pub mod put_record_input {

    /// A builder for [`PutRecordInput`](crate::input::PutRecordInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) feature_group_name: std::option::Option<std::string::String>,
        pub(crate) record: std::option::Option<std::vec::Vec<crate::model::FeatureValue>>,
        pub(crate) target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
    }
    impl Builder {
        /// <p>The name of the feature group that you want to insert the record into.</p>
        pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.feature_group_name = Some(input.into());
            self
        }
        /// <p>The name of the feature group that you want to insert the record into.</p>
        pub fn set_feature_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.feature_group_name = input;
            self
        }
        /// Appends an item to `record`.
        ///
        /// To override the contents of this collection use [`set_record`](Self::set_record).
        ///
        /// <p>List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:</p>
        /// <ul>
        /// <li> <p>Use <code>GetRecord</code> to retrieve the latest record.</p> </li>
        /// <li> <p>Update the record returned from <code>GetRecord</code>. </p> </li>
        /// <li> <p>Use <code>PutRecord</code> to update feature values.</p> </li>
        /// </ul>
        pub fn record(mut self, input: crate::model::FeatureValue) -> Self {
            let mut v = self.record.unwrap_or_default();
            v.push(input);
            self.record = Some(v);
            self
        }
        /// <p>List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:</p>
        /// <ul>
        /// <li> <p>Use <code>GetRecord</code> to retrieve the latest record.</p> </li>
        /// <li> <p>Update the record returned from <code>GetRecord</code>. </p> </li>
        /// <li> <p>Use <code>PutRecord</code> to update feature values.</p> </li>
        /// </ul>
        pub fn set_record(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FeatureValue>>,
        ) -> Self {
            self.record = input;
            self
        }
        /// Appends an item to `target_stores`.
        ///
        /// To override the contents of this collection use [`set_target_stores`](Self::set_target_stores).
        ///
        /// <p>A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the <code>FeatureGroup</code>.</p>
        pub fn target_stores(mut self, input: crate::model::TargetStore) -> Self {
            let mut v = self.target_stores.unwrap_or_default();
            v.push(input);
            self.target_stores = Some(v);
            self
        }
        /// <p>A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the <code>FeatureGroup</code>.</p>
        pub fn set_target_stores(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
        ) -> Self {
            self.target_stores = input;
            self
        }
        /// Consumes the builder and constructs a [`PutRecordInput`](crate::input::PutRecordInput).
        pub fn build(
            self,
        ) -> Result<crate::input::PutRecordInput, aws_smithy_http::operation::error::BuildError>
        {
            Ok(crate::input::PutRecordInput {
                feature_group_name: self.feature_group_name,
                record: self.record,
                target_stores: self.target_stores,
            })
        }
    }
}
impl PutRecordInput {
    /// Consumes the builder and constructs an Operation<[`PutRecord`](crate::operation::PutRecord)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::PutRecord,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::PutRecordInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                let input_10 = &_input.feature_group_name;
                let input_10 = input_10.as_ref().ok_or_else(|| {
                    aws_smithy_http::operation::error::BuildError::missing_field(
                        "feature_group_name",
                        "cannot be empty or unset",
                    )
                })?;
                let feature_group_name = aws_smithy_http::label::fmt_string(
                    input_10,
                    aws_smithy_http::label::EncodingStrategy::Default,
                );
                if feature_group_name.is_empty() {
                    return Err(
                        aws_smithy_http::operation::error::BuildError::missing_field(
                            "feature_group_name",
                            "cannot be empty or unset",
                        ),
                    );
                }
                write!(
                    output,
                    "/FeatureGroup/{FeatureGroupName}",
                    FeatureGroupName = feature_group_name
                )
                .expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::PutRecordInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("PUT").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder = aws_smithy_http::header::set_request_header_if_absent(
                builder,
                http::header::CONTENT_TYPE,
                "application/json",
            );
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from(
            crate::operation_ser::serialize_operation_crate_operation_put_record(&self)?,
        );
        if let Some(content_length) = body.content_length() {
            request = aws_smithy_http::header::set_request_header_if_absent(
                request,
                http::header::CONTENT_LENGTH,
                content_length,
            );
        }
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op =
            aws_smithy_http::operation::Operation::new(request, crate::operation::PutRecord::new())
                .with_metadata(aws_smithy_http::operation::Metadata::new(
                    "PutRecord",
                    "sagemakerfeaturestoreruntime",
                ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`PutRecordInput`](crate::input::PutRecordInput).
    pub fn builder() -> crate::input::put_record_input::Builder {
        crate::input::put_record_input::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutRecordInput {
    /// <p>The name of the feature group that you want to insert the record into.</p>
    #[doc(hidden)]
    pub feature_group_name: std::option::Option<std::string::String>,
    /// <p>List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:</p>
    /// <ul>
    /// <li> <p>Use <code>GetRecord</code> to retrieve the latest record.</p> </li>
    /// <li> <p>Update the record returned from <code>GetRecord</code>. </p> </li>
    /// <li> <p>Use <code>PutRecord</code> to update feature values.</p> </li>
    /// </ul>
    #[doc(hidden)]
    pub record: std::option::Option<std::vec::Vec<crate::model::FeatureValue>>,
    /// <p>A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    #[doc(hidden)]
    pub target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
}
impl PutRecordInput {
    /// <p>The name of the feature group that you want to insert the record into.</p>
    pub fn feature_group_name(&self) -> std::option::Option<&str> {
        self.feature_group_name.as_deref()
    }
    /// <p>List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:</p>
    /// <ul>
    /// <li> <p>Use <code>GetRecord</code> to retrieve the latest record.</p> </li>
    /// <li> <p>Update the record returned from <code>GetRecord</code>. </p> </li>
    /// <li> <p>Use <code>PutRecord</code> to update feature values.</p> </li>
    /// </ul>
    pub fn record(&self) -> std::option::Option<&[crate::model::FeatureValue]> {
        self.record.as_deref()
    }
    /// <p>A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    pub fn target_stores(&self) -> std::option::Option<&[crate::model::TargetStore]> {
        self.target_stores.as_deref()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetRecordInput {
    /// <p>The name of the feature group from which you want to retrieve a record.</p>
    #[doc(hidden)]
    pub feature_group_name: std::option::Option<std::string::String>,
    /// <p>The value that corresponds to <code>RecordIdentifier</code> type and uniquely identifies the record in the <code>FeatureGroup</code>. </p>
    #[doc(hidden)]
    pub record_identifier_value_as_string: std::option::Option<std::string::String>,
    /// <p>List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.</p>
    #[doc(hidden)]
    pub feature_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl GetRecordInput {
    /// <p>The name of the feature group from which you want to retrieve a record.</p>
    pub fn feature_group_name(&self) -> std::option::Option<&str> {
        self.feature_group_name.as_deref()
    }
    /// <p>The value that corresponds to <code>RecordIdentifier</code> type and uniquely identifies the record in the <code>FeatureGroup</code>. </p>
    pub fn record_identifier_value_as_string(&self) -> std::option::Option<&str> {
        self.record_identifier_value_as_string.as_deref()
    }
    /// <p>List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned.</p>
    pub fn feature_names(&self) -> std::option::Option<&[std::string::String]> {
        self.feature_names.as_deref()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRecordInput {
    /// <p>The name of the feature group to delete the record from. </p>
    #[doc(hidden)]
    pub feature_group_name: std::option::Option<std::string::String>,
    /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format. </p>
    #[doc(hidden)]
    pub record_identifier_value_as_string: std::option::Option<std::string::String>,
    /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
    #[doc(hidden)]
    pub event_time: std::option::Option<std::string::String>,
    /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    #[doc(hidden)]
    pub target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
}
impl DeleteRecordInput {
    /// <p>The name of the feature group to delete the record from. </p>
    pub fn feature_group_name(&self) -> std::option::Option<&str> {
        self.feature_group_name.as_deref()
    }
    /// <p>The value for the <code>RecordIdentifier</code> that uniquely identifies the record, in string format. </p>
    pub fn record_identifier_value_as_string(&self) -> std::option::Option<&str> {
        self.record_identifier_value_as_string.as_deref()
    }
    /// <p>Timestamp indicating when the deletion event occurred. <code>EventTime</code> can be used to query data at a certain point in time.</p>
    pub fn event_time(&self) -> std::option::Option<&str> {
        self.event_time.as_deref()
    }
    /// <p>A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the <code>FeatureGroup</code>.</p>
    pub fn target_stores(&self) -> std::option::Option<&[crate::model::TargetStore]> {
        self.target_stores.as_deref()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGetRecordInput {
    /// <p>A list of <code>FeatureGroup</code> names, with their corresponding <code>RecordIdentifier</code> value, and Feature name that have been requested to be retrieved in batch.</p>
    #[doc(hidden)]
    pub identifiers: std::option::Option<std::vec::Vec<crate::model::BatchGetRecordIdentifier>>,
}
impl BatchGetRecordInput {
    /// <p>A list of <code>FeatureGroup</code> names, with their corresponding <code>RecordIdentifier</code> value, and Feature name that have been requested to be retrieved in batch.</p>
    pub fn identifiers(&self) -> std::option::Option<&[crate::model::BatchGetRecordIdentifier]> {
        self.identifiers.as_deref()
    }
}