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
// 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 DeleteServiceAttributesInput {
/// <p>The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
pub service_id: ::std::option::Option<::std::string::String>,
/// <p>A list of keys corresponding to each attribute that you want to delete.</p>
pub attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeleteServiceAttributesInput {
/// <p>The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
pub fn service_id(&self) -> ::std::option::Option<&str> {
self.service_id.as_deref()
}
/// <p>A list of keys corresponding to each attribute that you want to delete.</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 `.attributes.is_none()`.
pub fn attributes(&self) -> &[::std::string::String] {
self.attributes.as_deref().unwrap_or_default()
}
}
impl DeleteServiceAttributesInput {
/// Creates a new builder-style object to manufacture [`DeleteServiceAttributesInput`](crate::operation::delete_service_attributes::DeleteServiceAttributesInput).
pub fn builder() -> crate::operation::delete_service_attributes::builders::DeleteServiceAttributesInputBuilder {
crate::operation::delete_service_attributes::builders::DeleteServiceAttributesInputBuilder::default()
}
}
/// A builder for [`DeleteServiceAttributesInput`](crate::operation::delete_service_attributes::DeleteServiceAttributesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteServiceAttributesInputBuilder {
pub(crate) service_id: ::std::option::Option<::std::string::String>,
pub(crate) attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeleteServiceAttributesInputBuilder {
/// <p>The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
/// This field is required.
pub fn service_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
pub fn set_service_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_id = input;
self
}
/// <p>The ID or Amazon Resource Name (ARN) of the service from which the attributes will be deleted. For services created in a namespace shared with your Amazon Web Services account, specify the service ARN. For more information about shared namespaces, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/sharing-namespaces.html">Cross-account Cloud Map namespace sharing</a> in the <i>Cloud Map Developer Guide</i>.</p>
pub fn get_service_id(&self) -> &::std::option::Option<::std::string::String> {
&self.service_id
}
/// Appends an item to `attributes`.
///
/// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
///
/// <p>A list of keys corresponding to each attribute that you want to delete.</p>
pub fn attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.attributes.unwrap_or_default();
v.push(input.into());
self.attributes = ::std::option::Option::Some(v);
self
}
/// <p>A list of keys corresponding to each attribute that you want to delete.</p>
pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.attributes = input;
self
}
/// <p>A list of keys corresponding to each attribute that you want to delete.</p>
pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.attributes
}
/// Consumes the builder and constructs a [`DeleteServiceAttributesInput`](crate::operation::delete_service_attributes::DeleteServiceAttributesInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::delete_service_attributes::DeleteServiceAttributesInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::delete_service_attributes::DeleteServiceAttributesInput {
service_id: self.service_id,
attributes: self.attributes,
})
}
}