aws_sdk_partnercentralchannel/operation/update_relationship/
_update_relationship_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 UpdateRelationshipInput {
6    /// <p>The catalog identifier for the relationship.</p>
7    pub catalog: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the relationship to update.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the program management account associated with the relationship.</p>
11    pub program_management_account_identifier: ::std::option::Option<::std::string::String>,
12    /// <p>The current revision number of the relationship.</p>
13    pub revision: ::std::option::Option<::std::string::String>,
14    /// <p>The new display name for the relationship.</p>
15    pub display_name: ::std::option::Option<::std::string::String>,
16    /// <p>The updated support plan for the relationship.</p>
17    pub requested_support_plan: ::std::option::Option<crate::types::SupportPlan>,
18}
19impl UpdateRelationshipInput {
20    /// <p>The catalog identifier for the relationship.</p>
21    pub fn catalog(&self) -> ::std::option::Option<&str> {
22        self.catalog.as_deref()
23    }
24    /// <p>The unique identifier of the relationship to update.</p>
25    pub fn identifier(&self) -> ::std::option::Option<&str> {
26        self.identifier.as_deref()
27    }
28    /// <p>The identifier of the program management account associated with the relationship.</p>
29    pub fn program_management_account_identifier(&self) -> ::std::option::Option<&str> {
30        self.program_management_account_identifier.as_deref()
31    }
32    /// <p>The current revision number of the relationship.</p>
33    pub fn revision(&self) -> ::std::option::Option<&str> {
34        self.revision.as_deref()
35    }
36    /// <p>The new display name for the relationship.</p>
37    pub fn display_name(&self) -> ::std::option::Option<&str> {
38        self.display_name.as_deref()
39    }
40    /// <p>The updated support plan for the relationship.</p>
41    pub fn requested_support_plan(&self) -> ::std::option::Option<&crate::types::SupportPlan> {
42        self.requested_support_plan.as_ref()
43    }
44}
45impl UpdateRelationshipInput {
46    /// Creates a new builder-style object to manufacture [`UpdateRelationshipInput`](crate::operation::update_relationship::UpdateRelationshipInput).
47    pub fn builder() -> crate::operation::update_relationship::builders::UpdateRelationshipInputBuilder {
48        crate::operation::update_relationship::builders::UpdateRelationshipInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateRelationshipInput`](crate::operation::update_relationship::UpdateRelationshipInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateRelationshipInputBuilder {
56    pub(crate) catalog: ::std::option::Option<::std::string::String>,
57    pub(crate) identifier: ::std::option::Option<::std::string::String>,
58    pub(crate) program_management_account_identifier: ::std::option::Option<::std::string::String>,
59    pub(crate) revision: ::std::option::Option<::std::string::String>,
60    pub(crate) display_name: ::std::option::Option<::std::string::String>,
61    pub(crate) requested_support_plan: ::std::option::Option<crate::types::SupportPlan>,
62}
63impl UpdateRelationshipInputBuilder {
64    /// <p>The catalog identifier for the relationship.</p>
65    /// This field is required.
66    pub fn catalog(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.catalog = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The catalog identifier for the relationship.</p>
71    pub fn set_catalog(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.catalog = input;
73        self
74    }
75    /// <p>The catalog identifier for the relationship.</p>
76    pub fn get_catalog(&self) -> &::std::option::Option<::std::string::String> {
77        &self.catalog
78    }
79    /// <p>The unique identifier of the relationship to update.</p>
80    /// This field is required.
81    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.identifier = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The unique identifier of the relationship to update.</p>
86    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.identifier = input;
88        self
89    }
90    /// <p>The unique identifier of the relationship to update.</p>
91    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
92        &self.identifier
93    }
94    /// <p>The identifier of the program management account associated with the relationship.</p>
95    /// This field is required.
96    pub fn program_management_account_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.program_management_account_identifier = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The identifier of the program management account associated with the relationship.</p>
101    pub fn set_program_management_account_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.program_management_account_identifier = input;
103        self
104    }
105    /// <p>The identifier of the program management account associated with the relationship.</p>
106    pub fn get_program_management_account_identifier(&self) -> &::std::option::Option<::std::string::String> {
107        &self.program_management_account_identifier
108    }
109    /// <p>The current revision number of the relationship.</p>
110    pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.revision = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The current revision number of the relationship.</p>
115    pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.revision = input;
117        self
118    }
119    /// <p>The current revision number of the relationship.</p>
120    pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
121        &self.revision
122    }
123    /// <p>The new display name for the relationship.</p>
124    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.display_name = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The new display name for the relationship.</p>
129    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.display_name = input;
131        self
132    }
133    /// <p>The new display name for the relationship.</p>
134    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
135        &self.display_name
136    }
137    /// <p>The updated support plan for the relationship.</p>
138    pub fn requested_support_plan(mut self, input: crate::types::SupportPlan) -> Self {
139        self.requested_support_plan = ::std::option::Option::Some(input);
140        self
141    }
142    /// <p>The updated support plan for the relationship.</p>
143    pub fn set_requested_support_plan(mut self, input: ::std::option::Option<crate::types::SupportPlan>) -> Self {
144        self.requested_support_plan = input;
145        self
146    }
147    /// <p>The updated support plan for the relationship.</p>
148    pub fn get_requested_support_plan(&self) -> &::std::option::Option<crate::types::SupportPlan> {
149        &self.requested_support_plan
150    }
151    /// Consumes the builder and constructs a [`UpdateRelationshipInput`](crate::operation::update_relationship::UpdateRelationshipInput).
152    pub fn build(
153        self,
154    ) -> ::std::result::Result<crate::operation::update_relationship::UpdateRelationshipInput, ::aws_smithy_types::error::operation::BuildError> {
155        ::std::result::Result::Ok(crate::operation::update_relationship::UpdateRelationshipInput {
156            catalog: self.catalog,
157            identifier: self.identifier,
158            program_management_account_identifier: self.program_management_account_identifier,
159            revision: self.revision,
160            display_name: self.display_name,
161            requested_support_plan: self.requested_support_plan,
162        })
163    }
164}