aws_sdk_managedblockchain/operation/update_member/
_update_member_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 UpdateMemberInput {
6    /// <p>The unique identifier of the Managed Blockchain network to which the member belongs.</p>
7    pub network_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the member.</p>
9    pub member_id: ::std::option::Option<::std::string::String>,
10    /// <p>Configuration properties for publishing to Amazon CloudWatch Logs.</p>
11    pub log_publishing_configuration: ::std::option::Option<crate::types::MemberLogPublishingConfiguration>,
12}
13impl UpdateMemberInput {
14    /// <p>The unique identifier of the Managed Blockchain network to which the member belongs.</p>
15    pub fn network_id(&self) -> ::std::option::Option<&str> {
16        self.network_id.as_deref()
17    }
18    /// <p>The unique identifier of the member.</p>
19    pub fn member_id(&self) -> ::std::option::Option<&str> {
20        self.member_id.as_deref()
21    }
22    /// <p>Configuration properties for publishing to Amazon CloudWatch Logs.</p>
23    pub fn log_publishing_configuration(&self) -> ::std::option::Option<&crate::types::MemberLogPublishingConfiguration> {
24        self.log_publishing_configuration.as_ref()
25    }
26}
27impl UpdateMemberInput {
28    /// Creates a new builder-style object to manufacture [`UpdateMemberInput`](crate::operation::update_member::UpdateMemberInput).
29    pub fn builder() -> crate::operation::update_member::builders::UpdateMemberInputBuilder {
30        crate::operation::update_member::builders::UpdateMemberInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateMemberInput`](crate::operation::update_member::UpdateMemberInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateMemberInputBuilder {
38    pub(crate) network_id: ::std::option::Option<::std::string::String>,
39    pub(crate) member_id: ::std::option::Option<::std::string::String>,
40    pub(crate) log_publishing_configuration: ::std::option::Option<crate::types::MemberLogPublishingConfiguration>,
41}
42impl UpdateMemberInputBuilder {
43    /// <p>The unique identifier of the Managed Blockchain network to which the member belongs.</p>
44    /// This field is required.
45    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.network_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The unique identifier of the Managed Blockchain network to which the member belongs.</p>
50    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.network_id = input;
52        self
53    }
54    /// <p>The unique identifier of the Managed Blockchain network to which the member belongs.</p>
55    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.network_id
57    }
58    /// <p>The unique identifier of the member.</p>
59    /// This field is required.
60    pub fn member_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.member_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The unique identifier of the member.</p>
65    pub fn set_member_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.member_id = input;
67        self
68    }
69    /// <p>The unique identifier of the member.</p>
70    pub fn get_member_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.member_id
72    }
73    /// <p>Configuration properties for publishing to Amazon CloudWatch Logs.</p>
74    pub fn log_publishing_configuration(mut self, input: crate::types::MemberLogPublishingConfiguration) -> Self {
75        self.log_publishing_configuration = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>Configuration properties for publishing to Amazon CloudWatch Logs.</p>
79    pub fn set_log_publishing_configuration(mut self, input: ::std::option::Option<crate::types::MemberLogPublishingConfiguration>) -> Self {
80        self.log_publishing_configuration = input;
81        self
82    }
83    /// <p>Configuration properties for publishing to Amazon CloudWatch Logs.</p>
84    pub fn get_log_publishing_configuration(&self) -> &::std::option::Option<crate::types::MemberLogPublishingConfiguration> {
85        &self.log_publishing_configuration
86    }
87    /// Consumes the builder and constructs a [`UpdateMemberInput`](crate::operation::update_member::UpdateMemberInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::update_member::UpdateMemberInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::update_member::UpdateMemberInput {
92            network_id: self.network_id,
93            member_id: self.member_id,
94            log_publishing_configuration: self.log_publishing_configuration,
95        })
96    }
97}