aws_sdk_proton/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)]
5pub struct UpdateServiceInput {
6    /// <p>The name of the service to edit.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The edited service description.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. <i>Don't</i> include edits to the existing service instances or pipeline. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html">Edit a service</a> in the <i>Proton User Guide</i>.</p>
11    pub spec: ::std::option::Option<::std::string::String>,
12}
13impl UpdateServiceInput {
14    /// <p>The name of the service to edit.</p>
15    pub fn name(&self) -> ::std::option::Option<&str> {
16        self.name.as_deref()
17    }
18    /// <p>The edited service description.</p>
19    pub fn description(&self) -> ::std::option::Option<&str> {
20        self.description.as_deref()
21    }
22    /// <p>Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. <i>Don't</i> include edits to the existing service instances or pipeline. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html">Edit a service</a> in the <i>Proton User Guide</i>.</p>
23    pub fn spec(&self) -> ::std::option::Option<&str> {
24        self.spec.as_deref()
25    }
26}
27impl ::std::fmt::Debug for UpdateServiceInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("UpdateServiceInput");
30        formatter.field("name", &self.name);
31        formatter.field("description", &"*** Sensitive Data Redacted ***");
32        formatter.field("spec", &"*** Sensitive Data Redacted ***");
33        formatter.finish()
34    }
35}
36impl UpdateServiceInput {
37    /// Creates a new builder-style object to manufacture [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
38    pub fn builder() -> crate::operation::update_service::builders::UpdateServiceInputBuilder {
39        crate::operation::update_service::builders::UpdateServiceInputBuilder::default()
40    }
41}
42
43/// A builder for [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct UpdateServiceInputBuilder {
47    pub(crate) name: ::std::option::Option<::std::string::String>,
48    pub(crate) description: ::std::option::Option<::std::string::String>,
49    pub(crate) spec: ::std::option::Option<::std::string::String>,
50}
51impl UpdateServiceInputBuilder {
52    /// <p>The name of the service to edit.</p>
53    /// This field is required.
54    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the service to edit.</p>
59    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.name = input;
61        self
62    }
63    /// <p>The name of the service to edit.</p>
64    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.name
66    }
67    /// <p>The edited service description.</p>
68    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.description = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The edited service description.</p>
73    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.description = input;
75        self
76    }
77    /// <p>The edited service description.</p>
78    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
79        &self.description
80    }
81    /// <p>Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. <i>Don't</i> include edits to the existing service instances or pipeline. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html">Edit a service</a> in the <i>Proton User Guide</i>.</p>
82    pub fn spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.spec = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. <i>Don't</i> include edits to the existing service instances or pipeline. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html">Edit a service</a> in the <i>Proton User Guide</i>.</p>
87    pub fn set_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.spec = input;
89        self
90    }
91    /// <p>Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. <i>Don't</i> include edits to the existing service instances or pipeline. For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-svc-update.html">Edit a service</a> in the <i>Proton User Guide</i>.</p>
92    pub fn get_spec(&self) -> &::std::option::Option<::std::string::String> {
93        &self.spec
94    }
95    /// Consumes the builder and constructs a [`UpdateServiceInput`](crate::operation::update_service::UpdateServiceInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<crate::operation::update_service::UpdateServiceInput, ::aws_smithy_types::error::operation::BuildError> {
99        ::std::result::Result::Ok(crate::operation::update_service::UpdateServiceInput {
100            name: self.name,
101            description: self.description,
102            spec: self.spec,
103        })
104    }
105}
106impl ::std::fmt::Debug for UpdateServiceInputBuilder {
107    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108        let mut formatter = f.debug_struct("UpdateServiceInputBuilder");
109        formatter.field("name", &self.name);
110        formatter.field("description", &"*** Sensitive Data Redacted ***");
111        formatter.field("spec", &"*** Sensitive Data Redacted ***");
112        formatter.finish()
113    }
114}