1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AsyncInferenceClientConfig {
/// <p>The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.</p>
pub max_concurrent_invocations_per_instance: ::std::option::Option<i32>,
}
impl AsyncInferenceClientConfig {
/// <p>The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.</p>
pub fn max_concurrent_invocations_per_instance(&self) -> ::std::option::Option<i32> {
self.max_concurrent_invocations_per_instance
}
}
impl AsyncInferenceClientConfig {
/// Creates a new builder-style object to manufacture [`AsyncInferenceClientConfig`](crate::types::AsyncInferenceClientConfig).
pub fn builder() -> crate::types::builders::AsyncInferenceClientConfigBuilder {
crate::types::builders::AsyncInferenceClientConfigBuilder::default()
}
}
/// A builder for [`AsyncInferenceClientConfig`](crate::types::AsyncInferenceClientConfig).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AsyncInferenceClientConfigBuilder {
pub(crate) max_concurrent_invocations_per_instance: ::std::option::Option<i32>,
}
impl AsyncInferenceClientConfigBuilder {
/// <p>The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.</p>
pub fn max_concurrent_invocations_per_instance(mut self, input: i32) -> Self {
self.max_concurrent_invocations_per_instance = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.</p>
pub fn set_max_concurrent_invocations_per_instance(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_concurrent_invocations_per_instance = input;
self
}
/// <p>The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.</p>
pub fn get_max_concurrent_invocations_per_instance(&self) -> &::std::option::Option<i32> {
&self.max_concurrent_invocations_per_instance
}
/// Consumes the builder and constructs a [`AsyncInferenceClientConfig`](crate::types::AsyncInferenceClientConfig).
pub fn build(self) -> crate::types::AsyncInferenceClientConfig {
crate::types::AsyncInferenceClientConfig {
max_concurrent_invocations_per_instance: self.max_concurrent_invocations_per_instance,
}
}
}