aws_sdk_workmail/operation/update_availability_configuration/_update_availability_configuration_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 UpdateAvailabilityConfigurationInput {
6 /// <p>The WorkMail organization for which the <code>AvailabilityConfiguration</code> will be updated.</p>
7 pub organization_id: ::std::option::Option<::std::string::String>,
8 /// <p>The domain to which the provider applies the availability configuration.</p>
9 pub domain_name: ::std::option::Option<::std::string::String>,
10 /// <p>The EWS availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
11 pub ews_provider: ::std::option::Option<crate::types::EwsAvailabilityProvider>,
12 /// <p>The Lambda availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
13 pub lambda_provider: ::std::option::Option<crate::types::LambdaAvailabilityProvider>,
14}
15impl UpdateAvailabilityConfigurationInput {
16 /// <p>The WorkMail organization for which the <code>AvailabilityConfiguration</code> will be updated.</p>
17 pub fn organization_id(&self) -> ::std::option::Option<&str> {
18 self.organization_id.as_deref()
19 }
20 /// <p>The domain to which the provider applies the availability configuration.</p>
21 pub fn domain_name(&self) -> ::std::option::Option<&str> {
22 self.domain_name.as_deref()
23 }
24 /// <p>The EWS availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
25 pub fn ews_provider(&self) -> ::std::option::Option<&crate::types::EwsAvailabilityProvider> {
26 self.ews_provider.as_ref()
27 }
28 /// <p>The Lambda availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
29 pub fn lambda_provider(&self) -> ::std::option::Option<&crate::types::LambdaAvailabilityProvider> {
30 self.lambda_provider.as_ref()
31 }
32}
33impl UpdateAvailabilityConfigurationInput {
34 /// Creates a new builder-style object to manufacture [`UpdateAvailabilityConfigurationInput`](crate::operation::update_availability_configuration::UpdateAvailabilityConfigurationInput).
35 pub fn builder() -> crate::operation::update_availability_configuration::builders::UpdateAvailabilityConfigurationInputBuilder {
36 crate::operation::update_availability_configuration::builders::UpdateAvailabilityConfigurationInputBuilder::default()
37 }
38}
39
40/// A builder for [`UpdateAvailabilityConfigurationInput`](crate::operation::update_availability_configuration::UpdateAvailabilityConfigurationInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateAvailabilityConfigurationInputBuilder {
44 pub(crate) organization_id: ::std::option::Option<::std::string::String>,
45 pub(crate) domain_name: ::std::option::Option<::std::string::String>,
46 pub(crate) ews_provider: ::std::option::Option<crate::types::EwsAvailabilityProvider>,
47 pub(crate) lambda_provider: ::std::option::Option<crate::types::LambdaAvailabilityProvider>,
48}
49impl UpdateAvailabilityConfigurationInputBuilder {
50 /// <p>The WorkMail organization for which the <code>AvailabilityConfiguration</code> will be updated.</p>
51 /// This field is required.
52 pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.organization_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The WorkMail organization for which the <code>AvailabilityConfiguration</code> will be updated.</p>
57 pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.organization_id = input;
59 self
60 }
61 /// <p>The WorkMail organization for which the <code>AvailabilityConfiguration</code> will be updated.</p>
62 pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.organization_id
64 }
65 /// <p>The domain to which the provider applies the availability configuration.</p>
66 /// This field is required.
67 pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.domain_name = ::std::option::Option::Some(input.into());
69 self
70 }
71 /// <p>The domain to which the provider applies the availability configuration.</p>
72 pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.domain_name = input;
74 self
75 }
76 /// <p>The domain to which the provider applies the availability configuration.</p>
77 pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
78 &self.domain_name
79 }
80 /// <p>The EWS availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
81 pub fn ews_provider(mut self, input: crate::types::EwsAvailabilityProvider) -> Self {
82 self.ews_provider = ::std::option::Option::Some(input);
83 self
84 }
85 /// <p>The EWS availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
86 pub fn set_ews_provider(mut self, input: ::std::option::Option<crate::types::EwsAvailabilityProvider>) -> Self {
87 self.ews_provider = input;
88 self
89 }
90 /// <p>The EWS availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
91 pub fn get_ews_provider(&self) -> &::std::option::Option<crate::types::EwsAvailabilityProvider> {
92 &self.ews_provider
93 }
94 /// <p>The Lambda availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
95 pub fn lambda_provider(mut self, input: crate::types::LambdaAvailabilityProvider) -> Self {
96 self.lambda_provider = ::std::option::Option::Some(input);
97 self
98 }
99 /// <p>The Lambda availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
100 pub fn set_lambda_provider(mut self, input: ::std::option::Option<crate::types::LambdaAvailabilityProvider>) -> Self {
101 self.lambda_provider = input;
102 self
103 }
104 /// <p>The Lambda availability provider definition. The request must contain exactly one provider definition, either <code>EwsProvider</code> or <code>LambdaProvider</code>. The previously stored provider will be overridden by the one provided.</p>
105 pub fn get_lambda_provider(&self) -> &::std::option::Option<crate::types::LambdaAvailabilityProvider> {
106 &self.lambda_provider
107 }
108 /// Consumes the builder and constructs a [`UpdateAvailabilityConfigurationInput`](crate::operation::update_availability_configuration::UpdateAvailabilityConfigurationInput).
109 pub fn build(
110 self,
111 ) -> ::std::result::Result<
112 crate::operation::update_availability_configuration::UpdateAvailabilityConfigurationInput,
113 ::aws_smithy_types::error::operation::BuildError,
114 > {
115 ::std::result::Result::Ok(
116 crate::operation::update_availability_configuration::UpdateAvailabilityConfigurationInput {
117 organization_id: self.organization_id,
118 domain_name: self.domain_name,
119 ews_provider: self.ews_provider,
120 lambda_provider: self.lambda_provider,
121 },
122 )
123 }
124}