aws_sdk_sagemaker/operation/create_endpoint/_create_endpoint_input.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 CreateEndpointInput {
6 /// <p>The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in <code>CreateEndpoint</code>, but the case is preserved and must be matched in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html">InvokeEndpoint</a>.</p>
7 pub endpoint_name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of an endpoint configuration. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a>.</p>
9 pub endpoint_config_name: ::std::option::Option<::std::string::String>,
10 /// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
11 pub deployment_config: ::std::option::Option<crate::types::DeploymentConfig>,
12 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p>
13 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
14}
15impl CreateEndpointInput {
16 /// <p>The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in <code>CreateEndpoint</code>, but the case is preserved and must be matched in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html">InvokeEndpoint</a>.</p>
17 pub fn endpoint_name(&self) -> ::std::option::Option<&str> {
18 self.endpoint_name.as_deref()
19 }
20 /// <p>The name of an endpoint configuration. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a>.</p>
21 pub fn endpoint_config_name(&self) -> ::std::option::Option<&str> {
22 self.endpoint_config_name.as_deref()
23 }
24 /// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
25 pub fn deployment_config(&self) -> ::std::option::Option<&crate::types::DeploymentConfig> {
26 self.deployment_config.as_ref()
27 }
28 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p>
29 ///
30 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
31 pub fn tags(&self) -> &[crate::types::Tag] {
32 self.tags.as_deref().unwrap_or_default()
33 }
34}
35impl CreateEndpointInput {
36 /// Creates a new builder-style object to manufacture [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
37 pub fn builder() -> crate::operation::create_endpoint::builders::CreateEndpointInputBuilder {
38 crate::operation::create_endpoint::builders::CreateEndpointInputBuilder::default()
39 }
40}
41
42/// A builder for [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateEndpointInputBuilder {
46 pub(crate) endpoint_name: ::std::option::Option<::std::string::String>,
47 pub(crate) endpoint_config_name: ::std::option::Option<::std::string::String>,
48 pub(crate) deployment_config: ::std::option::Option<crate::types::DeploymentConfig>,
49 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
50}
51impl CreateEndpointInputBuilder {
52 /// <p>The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in <code>CreateEndpoint</code>, but the case is preserved and must be matched in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html">InvokeEndpoint</a>.</p>
53 /// This field is required.
54 pub fn endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.endpoint_name = ::std::option::Option::Some(input.into());
56 self
57 }
58 /// <p>The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in <code>CreateEndpoint</code>, but the case is preserved and must be matched in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html">InvokeEndpoint</a>.</p>
59 pub fn set_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.endpoint_name = input;
61 self
62 }
63 /// <p>The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in <code>CreateEndpoint</code>, but the case is preserved and must be matched in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html">InvokeEndpoint</a>.</p>
64 pub fn get_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
65 &self.endpoint_name
66 }
67 /// <p>The name of an endpoint configuration. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a>.</p>
68 /// This field is required.
69 pub fn endpoint_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70 self.endpoint_config_name = ::std::option::Option::Some(input.into());
71 self
72 }
73 /// <p>The name of an endpoint configuration. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a>.</p>
74 pub fn set_endpoint_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75 self.endpoint_config_name = input;
76 self
77 }
78 /// <p>The name of an endpoint configuration. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpointConfig.html">CreateEndpointConfig</a>.</p>
79 pub fn get_endpoint_config_name(&self) -> &::std::option::Option<::std::string::String> {
80 &self.endpoint_config_name
81 }
82 /// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
83 pub fn deployment_config(mut self, input: crate::types::DeploymentConfig) -> Self {
84 self.deployment_config = ::std::option::Option::Some(input);
85 self
86 }
87 /// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
88 pub fn set_deployment_config(mut self, input: ::std::option::Option<crate::types::DeploymentConfig>) -> Self {
89 self.deployment_config = input;
90 self
91 }
92 /// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
93 pub fn get_deployment_config(&self) -> &::std::option::Option<crate::types::DeploymentConfig> {
94 &self.deployment_config
95 }
96 /// Appends an item to `tags`.
97 ///
98 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
99 ///
100 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p>
101 pub fn tags(mut self, input: crate::types::Tag) -> Self {
102 let mut v = self.tags.unwrap_or_default();
103 v.push(input);
104 self.tags = ::std::option::Option::Some(v);
105 self
106 }
107 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p>
108 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
109 self.tags = input;
110 self
111 }
112 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>.</p>
113 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
114 &self.tags
115 }
116 /// Consumes the builder and constructs a [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
117 pub fn build(
118 self,
119 ) -> ::std::result::Result<crate::operation::create_endpoint::CreateEndpointInput, ::aws_smithy_types::error::operation::BuildError> {
120 ::std::result::Result::Ok(crate::operation::create_endpoint::CreateEndpointInput {
121 endpoint_name: self.endpoint_name,
122 endpoint_config_name: self.endpoint_config_name,
123 deployment_config: self.deployment_config,
124 tags: self.tags,
125 })
126 }
127}