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
// 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 CreateEndpointInput {
/// <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 .</p>
#[doc(hidden)]
pub endpoint_name: std::option::Option<std::string::String>,
/// <p>The name of an endpoint configuration. For more information, see <code>CreateEndpointConfig</code>. </p>
#[doc(hidden)]
pub endpoint_config_name: std::option::Option<std::string::String>,
/// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
#[doc(hidden)]
pub deployment_config: std::option::Option<crate::types::DeploymentConfig>,
/// <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>
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
}
impl CreateEndpointInput {
/// <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 .</p>
pub fn endpoint_name(&self) -> std::option::Option<&str> {
self.endpoint_name.as_deref()
}
/// <p>The name of an endpoint configuration. For more information, see <code>CreateEndpointConfig</code>. </p>
pub fn endpoint_config_name(&self) -> std::option::Option<&str> {
self.endpoint_config_name.as_deref()
}
/// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
pub fn deployment_config(&self) -> std::option::Option<&crate::types::DeploymentConfig> {
self.deployment_config.as_ref()
}
/// <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>
pub fn tags(&self) -> std::option::Option<&[crate::types::Tag]> {
self.tags.as_deref()
}
}
impl CreateEndpointInput {
/// Creates a new builder-style object to manufacture [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
pub fn builder() -> crate::operation::create_endpoint::builders::CreateEndpointInputBuilder {
crate::operation::create_endpoint::builders::CreateEndpointInputBuilder::default()
}
}
/// A builder for [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateEndpointInputBuilder {
pub(crate) endpoint_name: std::option::Option<std::string::String>,
pub(crate) endpoint_config_name: std::option::Option<std::string::String>,
pub(crate) deployment_config: std::option::Option<crate::types::DeploymentConfig>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
}
impl CreateEndpointInputBuilder {
/// <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 .</p>
pub fn endpoint_name(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_name = Some(input.into());
self
}
/// <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 .</p>
pub fn set_endpoint_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.endpoint_name = input;
self
}
/// <p>The name of an endpoint configuration. For more information, see <code>CreateEndpointConfig</code>. </p>
pub fn endpoint_config_name(mut self, input: impl Into<std::string::String>) -> Self {
self.endpoint_config_name = Some(input.into());
self
}
/// <p>The name of an endpoint configuration. For more information, see <code>CreateEndpointConfig</code>. </p>
pub fn set_endpoint_config_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.endpoint_config_name = input;
self
}
/// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
pub fn deployment_config(mut self, input: crate::types::DeploymentConfig) -> Self {
self.deployment_config = Some(input);
self
}
/// <p>The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.</p>
pub fn set_deployment_config(
mut self,
input: std::option::Option<crate::types::DeploymentConfig>,
) -> Self {
self.deployment_config = input;
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <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>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
/// <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>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
) -> Self {
self.tags = input;
self
}
/// Consumes the builder and constructs a [`CreateEndpointInput`](crate::operation::create_endpoint::CreateEndpointInput).
pub fn build(
self,
) -> Result<
crate::operation::create_endpoint::CreateEndpointInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::create_endpoint::CreateEndpointInput {
endpoint_name: self.endpoint_name,
endpoint_config_name: self.endpoint_config_name,
deployment_config: self.deployment_config,
tags: self.tags,
})
}
}