aws_sdk_managedblockchain/operation/create_member/
_create_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 CreateMemberInput {
6    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
7    pub client_request_token: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
9    pub invitation_id: ::std::option::Option<::std::string::String>,
10    /// <p>The unique identifier of the network in which the member is created.</p>
11    pub network_id: ::std::option::Option<::std::string::String>,
12    /// <p>Member configuration parameters.</p>
13    pub member_configuration: ::std::option::Option<crate::types::MemberConfiguration>,
14}
15impl CreateMemberInput {
16    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
17    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
18        self.client_request_token.as_deref()
19    }
20    /// <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
21    pub fn invitation_id(&self) -> ::std::option::Option<&str> {
22        self.invitation_id.as_deref()
23    }
24    /// <p>The unique identifier of the network in which the member is created.</p>
25    pub fn network_id(&self) -> ::std::option::Option<&str> {
26        self.network_id.as_deref()
27    }
28    /// <p>Member configuration parameters.</p>
29    pub fn member_configuration(&self) -> ::std::option::Option<&crate::types::MemberConfiguration> {
30        self.member_configuration.as_ref()
31    }
32}
33impl CreateMemberInput {
34    /// Creates a new builder-style object to manufacture [`CreateMemberInput`](crate::operation::create_member::CreateMemberInput).
35    pub fn builder() -> crate::operation::create_member::builders::CreateMemberInputBuilder {
36        crate::operation::create_member::builders::CreateMemberInputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateMemberInput`](crate::operation::create_member::CreateMemberInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateMemberInputBuilder {
44    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
45    pub(crate) invitation_id: ::std::option::Option<::std::string::String>,
46    pub(crate) network_id: ::std::option::Option<::std::string::String>,
47    pub(crate) member_configuration: ::std::option::Option<crate::types::MemberConfiguration>,
48}
49impl CreateMemberInputBuilder {
50    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
51    /// This field is required.
52    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.client_request_token = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
57    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.client_request_token = input;
59        self
60    }
61    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
62    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
63        &self.client_request_token
64    }
65    /// <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
66    /// This field is required.
67    pub fn invitation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.invitation_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
72    pub fn set_invitation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.invitation_id = input;
74        self
75    }
76    /// <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
77    pub fn get_invitation_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.invitation_id
79    }
80    /// <p>The unique identifier of the network in which the member is created.</p>
81    /// This field is required.
82    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.network_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The unique identifier of the network in which the member is created.</p>
87    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.network_id = input;
89        self
90    }
91    /// <p>The unique identifier of the network in which the member is created.</p>
92    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.network_id
94    }
95    /// <p>Member configuration parameters.</p>
96    /// This field is required.
97    pub fn member_configuration(mut self, input: crate::types::MemberConfiguration) -> Self {
98        self.member_configuration = ::std::option::Option::Some(input);
99        self
100    }
101    /// <p>Member configuration parameters.</p>
102    pub fn set_member_configuration(mut self, input: ::std::option::Option<crate::types::MemberConfiguration>) -> Self {
103        self.member_configuration = input;
104        self
105    }
106    /// <p>Member configuration parameters.</p>
107    pub fn get_member_configuration(&self) -> &::std::option::Option<crate::types::MemberConfiguration> {
108        &self.member_configuration
109    }
110    /// Consumes the builder and constructs a [`CreateMemberInput`](crate::operation::create_member::CreateMemberInput).
111    pub fn build(
112        self,
113    ) -> ::std::result::Result<crate::operation::create_member::CreateMemberInput, ::aws_smithy_types::error::operation::BuildError> {
114        ::std::result::Result::Ok(crate::operation::create_member::CreateMemberInput {
115            client_request_token: self.client_request_token,
116            invitation_id: self.invitation_id,
117            network_id: self.network_id,
118            member_configuration: self.member_configuration,
119        })
120    }
121}