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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateInferenceComponentInput {
/// <p>The name of the inference component.</p>
pub inference_component_name: ::std::option::Option<::std::string::String>,
/// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
pub specification: ::std::option::Option<crate::types::InferenceComponentSpecification>,
/// <p>A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular <code>Specification</code> parameter, but not both.</p>
pub specifications: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecification>>,
/// <p>Runtime settings for a model that is deployed with an inference component.</p>
pub runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>,
/// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
pub deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
}
impl UpdateInferenceComponentInput {
/// <p>The name of the inference component.</p>
pub fn inference_component_name(&self) -> ::std::option::Option<&str> {
self.inference_component_name.as_deref()
}
/// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
pub fn specification(&self) -> ::std::option::Option<&crate::types::InferenceComponentSpecification> {
self.specification.as_ref()
}
/// <p>A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular <code>Specification</code> parameter, but not both.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.specifications.is_none()`.
pub fn specifications(&self) -> &[crate::types::InferenceComponentSpecification] {
self.specifications.as_deref().unwrap_or_default()
}
/// <p>Runtime settings for a model that is deployed with an inference component.</p>
pub fn runtime_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentRuntimeConfig> {
self.runtime_config.as_ref()
}
/// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
pub fn deployment_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentDeploymentConfig> {
self.deployment_config.as_ref()
}
}
impl UpdateInferenceComponentInput {
/// Creates a new builder-style object to manufacture [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
pub fn builder() -> crate::operation::update_inference_component::builders::UpdateInferenceComponentInputBuilder {
crate::operation::update_inference_component::builders::UpdateInferenceComponentInputBuilder::default()
}
}
/// A builder for [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateInferenceComponentInputBuilder {
pub(crate) inference_component_name: ::std::option::Option<::std::string::String>,
pub(crate) specification: ::std::option::Option<crate::types::InferenceComponentSpecification>,
pub(crate) specifications: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecification>>,
pub(crate) runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>,
pub(crate) deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
}
impl UpdateInferenceComponentInputBuilder {
/// <p>The name of the inference component.</p>
/// This field is required.
pub fn inference_component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inference_component_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the inference component.</p>
pub fn set_inference_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inference_component_name = input;
self
}
/// <p>The name of the inference component.</p>
pub fn get_inference_component_name(&self) -> &::std::option::Option<::std::string::String> {
&self.inference_component_name
}
/// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
pub fn specification(mut self, input: crate::types::InferenceComponentSpecification) -> Self {
self.specification = ::std::option::Option::Some(input);
self
}
/// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
pub fn set_specification(mut self, input: ::std::option::Option<crate::types::InferenceComponentSpecification>) -> Self {
self.specification = input;
self
}
/// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
pub fn get_specification(&self) -> &::std::option::Option<crate::types::InferenceComponentSpecification> {
&self.specification
}
/// Appends an item to `specifications`.
///
/// To override the contents of this collection use [`set_specifications`](Self::set_specifications).
///
/// <p>A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular <code>Specification</code> parameter, but not both.</p>
pub fn specifications(mut self, input: crate::types::InferenceComponentSpecification) -> Self {
let mut v = self.specifications.unwrap_or_default();
v.push(input);
self.specifications = ::std::option::Option::Some(v);
self
}
/// <p>A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular <code>Specification</code> parameter, but not both.</p>
pub fn set_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecification>>) -> Self {
self.specifications = input;
self
}
/// <p>A list of specification objects for the inference component, one per instance type. Use this parameter when you want to specify different model or resource configurations for the inference component on each instance type. You can use either this parameter or the singular <code>Specification</code> parameter, but not both.</p>
pub fn get_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecification>> {
&self.specifications
}
/// <p>Runtime settings for a model that is deployed with an inference component.</p>
pub fn runtime_config(mut self, input: crate::types::InferenceComponentRuntimeConfig) -> Self {
self.runtime_config = ::std::option::Option::Some(input);
self
}
/// <p>Runtime settings for a model that is deployed with an inference component.</p>
pub fn set_runtime_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>) -> Self {
self.runtime_config = input;
self
}
/// <p>Runtime settings for a model that is deployed with an inference component.</p>
pub fn get_runtime_config(&self) -> &::std::option::Option<crate::types::InferenceComponentRuntimeConfig> {
&self.runtime_config
}
/// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
pub fn deployment_config(mut self, input: crate::types::InferenceComponentDeploymentConfig) -> Self {
self.deployment_config = ::std::option::Option::Some(input);
self
}
/// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
pub fn set_deployment_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>) -> Self {
self.deployment_config = input;
self
}
/// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
pub fn get_deployment_config(&self) -> &::std::option::Option<crate::types::InferenceComponentDeploymentConfig> {
&self.deployment_config
}
/// Consumes the builder and constructs a [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_inference_component::UpdateInferenceComponentInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_inference_component::UpdateInferenceComponentInput {
inference_component_name: self.inference_component_name,
specification: self.specification,
specifications: self.specifications,
runtime_config: self.runtime_config,
deployment_config: self.deployment_config,
})
}
}