aws_sdk_servicediscovery/operation/update_service/_update_service_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 UpdateServiceInput {
6 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is 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>
7 pub id: ::std::option::Option<::std::string::String>,
8 /// <p>A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).</p>
9 pub service: ::std::option::Option<crate::types::ServiceChange>,
10}
11impl UpdateServiceInput {
12 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is 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>
13 pub fn id(&self) -> ::std::option::Option<&str> {
14 self.id.as_deref()
15 }
16 /// <p>A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).</p>
17 pub fn service(&self) -> ::std::option::Option<&crate::types::ServiceChange> {
18 self.service.as_ref()
19 }
20}
21impl UpdateServiceInput {
22 /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
23 pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
24 crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
25 }
26}
27
28/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateServiceInputBuilder {
32 pub(crate) id: ::std::option::Option<::std::string::String>,
33 pub(crate) service: ::std::option::Option<crate::types::ServiceChange>,
34}
35impl UpdateServiceInputBuilder {
36 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is 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>
37 /// This field is required.
38 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is 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>
43 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.id = input;
45 self
46 }
47 /// <p>The ID or Amazon Resource Name (ARN) of the service that you want to update. If the namespace associated with the service is 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>
48 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.id
50 }
51 /// <p>A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).</p>
52 /// This field is required.
53 pub fn service(mut self, input: crate::types::ServiceChange) -> Self {
54 self.service = ::std::option::Option::Some(input);
55 self
56 }
57 /// <p>A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).</p>
58 pub fn set_service(mut self, input: ::std::option::Option<crate::types::ServiceChange>) -> Self {
59 self.service = input;
60 self
61 }
62 /// <p>A complex type that contains the new settings for the service. You can specify a maximum of 30 attributes (key-value pairs).</p>
63 pub fn get_service(&self) -> &::std::option::Option<crate::types::ServiceChange> {
64 &self.service
65 }
66 /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
67 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
70 ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
71 id: self.id,
72 service: self.service,
73 })
74 }
75}