aws_sdk_sagemaker/operation/describe_model/
_describe_model_output.rs

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::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeModelOutput {
6    /// <p>Name of the SageMaker model.</p>
7    pub model_name: ::std::option::Option<::std::string::String>,
8    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
9    pub primary_container: ::std::option::Option<crate::types::ContainerDefinition>,
10    /// <p>The containers in the inference pipeline.</p>
11    pub containers: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>,
12    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
13    pub inference_execution_config: ::std::option::Option<crate::types::InferenceExecutionConfig>,
14    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
15    pub execution_role_arn: ::std::option::Option<::std::string::String>,
16    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
17    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
18    /// <p>A timestamp that shows when the model was created.</p>
19    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The Amazon Resource Name (ARN) of the model.</p>
21    pub model_arn: ::std::option::Option<::std::string::String>,
22    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
23    pub enable_network_isolation: ::std::option::Option<bool>,
24    /// <p>A set of recommended deployment configurations for the model.</p>
25    pub deployment_recommendation: ::std::option::Option<crate::types::DeploymentRecommendation>,
26    _request_id: Option<String>,
27}
28impl DescribeModelOutput {
29    /// <p>Name of the SageMaker model.</p>
30    pub fn model_name(&self) -> ::std::option::Option<&str> {
31        self.model_name.as_deref()
32    }
33    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
34    pub fn primary_container(&self) -> ::std::option::Option<&crate::types::ContainerDefinition> {
35        self.primary_container.as_ref()
36    }
37    /// <p>The containers in the inference pipeline.</p>
38    ///
39    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.containers.is_none()`.
40    pub fn containers(&self) -> &[crate::types::ContainerDefinition] {
41        self.containers.as_deref().unwrap_or_default()
42    }
43    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
44    pub fn inference_execution_config(&self) -> ::std::option::Option<&crate::types::InferenceExecutionConfig> {
45        self.inference_execution_config.as_ref()
46    }
47    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
48    pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
49        self.execution_role_arn.as_deref()
50    }
51    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
52    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
53        self.vpc_config.as_ref()
54    }
55    /// <p>A timestamp that shows when the model was created.</p>
56    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57        self.creation_time.as_ref()
58    }
59    /// <p>The Amazon Resource Name (ARN) of the model.</p>
60    pub fn model_arn(&self) -> ::std::option::Option<&str> {
61        self.model_arn.as_deref()
62    }
63    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
64    pub fn enable_network_isolation(&self) -> ::std::option::Option<bool> {
65        self.enable_network_isolation
66    }
67    /// <p>A set of recommended deployment configurations for the model.</p>
68    pub fn deployment_recommendation(&self) -> ::std::option::Option<&crate::types::DeploymentRecommendation> {
69        self.deployment_recommendation.as_ref()
70    }
71}
72impl ::aws_types::request_id::RequestId for DescribeModelOutput {
73    fn request_id(&self) -> Option<&str> {
74        self._request_id.as_deref()
75    }
76}
77impl DescribeModelOutput {
78    /// Creates a new builder-style object to manufacture [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
79    pub fn builder() -> crate::operation::describe_model::builders::DescribeModelOutputBuilder {
80        crate::operation::describe_model::builders::DescribeModelOutputBuilder::default()
81    }
82}
83
84/// A builder for [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct DescribeModelOutputBuilder {
88    pub(crate) model_name: ::std::option::Option<::std::string::String>,
89    pub(crate) primary_container: ::std::option::Option<crate::types::ContainerDefinition>,
90    pub(crate) containers: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>,
91    pub(crate) inference_execution_config: ::std::option::Option<crate::types::InferenceExecutionConfig>,
92    pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
93    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
94    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
95    pub(crate) model_arn: ::std::option::Option<::std::string::String>,
96    pub(crate) enable_network_isolation: ::std::option::Option<bool>,
97    pub(crate) deployment_recommendation: ::std::option::Option<crate::types::DeploymentRecommendation>,
98    _request_id: Option<String>,
99}
100impl DescribeModelOutputBuilder {
101    /// <p>Name of the SageMaker model.</p>
102    /// This field is required.
103    pub fn model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.model_name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>Name of the SageMaker model.</p>
108    pub fn set_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.model_name = input;
110        self
111    }
112    /// <p>Name of the SageMaker model.</p>
113    pub fn get_model_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.model_name
115    }
116    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
117    pub fn primary_container(mut self, input: crate::types::ContainerDefinition) -> Self {
118        self.primary_container = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
122    pub fn set_primary_container(mut self, input: ::std::option::Option<crate::types::ContainerDefinition>) -> Self {
123        self.primary_container = input;
124        self
125    }
126    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
127    pub fn get_primary_container(&self) -> &::std::option::Option<crate::types::ContainerDefinition> {
128        &self.primary_container
129    }
130    /// Appends an item to `containers`.
131    ///
132    /// To override the contents of this collection use [`set_containers`](Self::set_containers).
133    ///
134    /// <p>The containers in the inference pipeline.</p>
135    pub fn containers(mut self, input: crate::types::ContainerDefinition) -> Self {
136        let mut v = self.containers.unwrap_or_default();
137        v.push(input);
138        self.containers = ::std::option::Option::Some(v);
139        self
140    }
141    /// <p>The containers in the inference pipeline.</p>
142    pub fn set_containers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>) -> Self {
143        self.containers = input;
144        self
145    }
146    /// <p>The containers in the inference pipeline.</p>
147    pub fn get_containers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>> {
148        &self.containers
149    }
150    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
151    pub fn inference_execution_config(mut self, input: crate::types::InferenceExecutionConfig) -> Self {
152        self.inference_execution_config = ::std::option::Option::Some(input);
153        self
154    }
155    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
156    pub fn set_inference_execution_config(mut self, input: ::std::option::Option<crate::types::InferenceExecutionConfig>) -> Self {
157        self.inference_execution_config = input;
158        self
159    }
160    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
161    pub fn get_inference_execution_config(&self) -> &::std::option::Option<crate::types::InferenceExecutionConfig> {
162        &self.inference_execution_config
163    }
164    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
165    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.execution_role_arn = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
170    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.execution_role_arn = input;
172        self
173    }
174    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
175    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
176        &self.execution_role_arn
177    }
178    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
179    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
180        self.vpc_config = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
184    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
185        self.vpc_config = input;
186        self
187    }
188    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
189    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
190        &self.vpc_config
191    }
192    /// <p>A timestamp that shows when the model was created.</p>
193    /// This field is required.
194    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
195        self.creation_time = ::std::option::Option::Some(input);
196        self
197    }
198    /// <p>A timestamp that shows when the model was created.</p>
199    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
200        self.creation_time = input;
201        self
202    }
203    /// <p>A timestamp that shows when the model was created.</p>
204    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
205        &self.creation_time
206    }
207    /// <p>The Amazon Resource Name (ARN) of the model.</p>
208    /// This field is required.
209    pub fn model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.model_arn = ::std::option::Option::Some(input.into());
211        self
212    }
213    /// <p>The Amazon Resource Name (ARN) of the model.</p>
214    pub fn set_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.model_arn = input;
216        self
217    }
218    /// <p>The Amazon Resource Name (ARN) of the model.</p>
219    pub fn get_model_arn(&self) -> &::std::option::Option<::std::string::String> {
220        &self.model_arn
221    }
222    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
223    pub fn enable_network_isolation(mut self, input: bool) -> Self {
224        self.enable_network_isolation = ::std::option::Option::Some(input);
225        self
226    }
227    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
228    pub fn set_enable_network_isolation(mut self, input: ::std::option::Option<bool>) -> Self {
229        self.enable_network_isolation = input;
230        self
231    }
232    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
233    pub fn get_enable_network_isolation(&self) -> &::std::option::Option<bool> {
234        &self.enable_network_isolation
235    }
236    /// <p>A set of recommended deployment configurations for the model.</p>
237    pub fn deployment_recommendation(mut self, input: crate::types::DeploymentRecommendation) -> Self {
238        self.deployment_recommendation = ::std::option::Option::Some(input);
239        self
240    }
241    /// <p>A set of recommended deployment configurations for the model.</p>
242    pub fn set_deployment_recommendation(mut self, input: ::std::option::Option<crate::types::DeploymentRecommendation>) -> Self {
243        self.deployment_recommendation = input;
244        self
245    }
246    /// <p>A set of recommended deployment configurations for the model.</p>
247    pub fn get_deployment_recommendation(&self) -> &::std::option::Option<crate::types::DeploymentRecommendation> {
248        &self.deployment_recommendation
249    }
250    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
251        self._request_id = Some(request_id.into());
252        self
253    }
254
255    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
256        self._request_id = request_id;
257        self
258    }
259    /// Consumes the builder and constructs a [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
260    pub fn build(self) -> crate::operation::describe_model::DescribeModelOutput {
261        crate::operation::describe_model::DescribeModelOutput {
262            model_name: self.model_name,
263            primary_container: self.primary_container,
264            containers: self.containers,
265            inference_execution_config: self.inference_execution_config,
266            execution_role_arn: self.execution_role_arn,
267            vpc_config: self.vpc_config,
268            creation_time: self.creation_time,
269            model_arn: self.model_arn,
270            enable_network_isolation: self.enable_network_isolation,
271            deployment_recommendation: self.deployment_recommendation,
272            _request_id: self._request_id,
273        }
274    }
275}