use std::fmt::Write;
pub mod batch_get_record_input {
#[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 {
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
}
pub fn set_identifiers(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::BatchGetRecordIdentifier>>,
) -> Self {
self.identifiers = input;
self
}
pub fn build(
self,
) -> Result<crate::input::BatchGetRecordInput, aws_smithy_http::operation::error::BuildError>
{
Ok(crate::input::BatchGetRecordInput {
identifiers: self.identifiers,
})
}
}
}
impl BatchGetRecordInput {
#[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(¶ms),
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)
}
pub fn builder() -> crate::input::batch_get_record_input::Builder {
crate::input::batch_get_record_input::Builder::default()
}
}
pub mod delete_record_input {
#[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 {
pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.feature_group_name = Some(input.into());
self
}
pub fn set_feature_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.feature_group_name = input;
self
}
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
}
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
}
pub fn event_time(mut self, input: impl Into<std::string::String>) -> Self {
self.event_time = Some(input.into());
self
}
pub fn set_event_time(mut self, input: std::option::Option<std::string::String>) -> Self {
self.event_time = input;
self
}
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
}
pub fn set_target_stores(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
) -> Self {
self.target_stores = input;
self
}
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 {
#[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(¶ms),
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)
}
pub fn builder() -> crate::input::delete_record_input::Builder {
crate::input::delete_record_input::Builder::default()
}
}
pub mod get_record_input {
#[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 {
pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.feature_group_name = Some(input.into());
self
}
pub fn set_feature_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.feature_group_name = input;
self
}
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
}
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
}
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
}
pub fn set_feature_names(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.feature_names = input;
self
}
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 {
#[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(¶ms),
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)
}
pub fn builder() -> crate::input::get_record_input::Builder {
crate::input::get_record_input::Builder::default()
}
}
pub mod put_record_input {
#[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 {
pub fn feature_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.feature_group_name = Some(input.into());
self
}
pub fn set_feature_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.feature_group_name = input;
self
}
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
}
pub fn set_record(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::FeatureValue>>,
) -> Self {
self.record = input;
self
}
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
}
pub fn set_target_stores(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
) -> Self {
self.target_stores = input;
self
}
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 {
#[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(¶ms),
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)
}
pub fn builder() -> crate::input::put_record_input::Builder {
crate::input::put_record_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PutRecordInput {
#[doc(hidden)]
pub feature_group_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub record: std::option::Option<std::vec::Vec<crate::model::FeatureValue>>,
#[doc(hidden)]
pub target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
}
impl PutRecordInput {
pub fn feature_group_name(&self) -> std::option::Option<&str> {
self.feature_group_name.as_deref()
}
pub fn record(&self) -> std::option::Option<&[crate::model::FeatureValue]> {
self.record.as_deref()
}
pub fn target_stores(&self) -> std::option::Option<&[crate::model::TargetStore]> {
self.target_stores.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetRecordInput {
#[doc(hidden)]
pub feature_group_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub record_identifier_value_as_string: std::option::Option<std::string::String>,
#[doc(hidden)]
pub feature_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl GetRecordInput {
pub fn feature_group_name(&self) -> std::option::Option<&str> {
self.feature_group_name.as_deref()
}
pub fn record_identifier_value_as_string(&self) -> std::option::Option<&str> {
self.record_identifier_value_as_string.as_deref()
}
pub fn feature_names(&self) -> std::option::Option<&[std::string::String]> {
self.feature_names.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteRecordInput {
#[doc(hidden)]
pub feature_group_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub record_identifier_value_as_string: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_time: std::option::Option<std::string::String>,
#[doc(hidden)]
pub target_stores: std::option::Option<std::vec::Vec<crate::model::TargetStore>>,
}
impl DeleteRecordInput {
pub fn feature_group_name(&self) -> std::option::Option<&str> {
self.feature_group_name.as_deref()
}
pub fn record_identifier_value_as_string(&self) -> std::option::Option<&str> {
self.record_identifier_value_as_string.as_deref()
}
pub fn event_time(&self) -> std::option::Option<&str> {
self.event_time.as_deref()
}
pub fn target_stores(&self) -> std::option::Option<&[crate::model::TargetStore]> {
self.target_stores.as_deref()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchGetRecordInput {
#[doc(hidden)]
pub identifiers: std::option::Option<std::vec::Vec<crate::model::BatchGetRecordIdentifier>>,
}
impl BatchGetRecordInput {
pub fn identifiers(&self) -> std::option::Option<&[crate::model::BatchGetRecordIdentifier]> {
self.identifiers.as_deref()
}
}