aws_sdk_workspacesweb/types/
_identity_provider_summary.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct IdentityProviderSummary {
7 pub identity_provider_arn: ::std::string::String,
9 pub identity_provider_name: ::std::option::Option<::std::string::String>,
11 pub identity_provider_type: ::std::option::Option<crate::types::IdentityProviderType>,
13}
14impl IdentityProviderSummary {
15 pub fn identity_provider_arn(&self) -> &str {
17 use std::ops::Deref;
18 self.identity_provider_arn.deref()
19 }
20 pub fn identity_provider_name(&self) -> ::std::option::Option<&str> {
22 self.identity_provider_name.as_deref()
23 }
24 pub fn identity_provider_type(&self) -> ::std::option::Option<&crate::types::IdentityProviderType> {
26 self.identity_provider_type.as_ref()
27 }
28}
29impl ::std::fmt::Debug for IdentityProviderSummary {
30 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
31 let mut formatter = f.debug_struct("IdentityProviderSummary");
32 formatter.field("identity_provider_arn", &self.identity_provider_arn);
33 formatter.field("identity_provider_name", &"*** Sensitive Data Redacted ***");
34 formatter.field("identity_provider_type", &self.identity_provider_type);
35 formatter.finish()
36 }
37}
38impl IdentityProviderSummary {
39 pub fn builder() -> crate::types::builders::IdentityProviderSummaryBuilder {
41 crate::types::builders::IdentityProviderSummaryBuilder::default()
42 }
43}
44
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
47#[non_exhaustive]
48pub struct IdentityProviderSummaryBuilder {
49 pub(crate) identity_provider_arn: ::std::option::Option<::std::string::String>,
50 pub(crate) identity_provider_name: ::std::option::Option<::std::string::String>,
51 pub(crate) identity_provider_type: ::std::option::Option<crate::types::IdentityProviderType>,
52}
53impl IdentityProviderSummaryBuilder {
54 pub fn identity_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.identity_provider_arn = ::std::option::Option::Some(input.into());
58 self
59 }
60 pub fn set_identity_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.identity_provider_arn = input;
63 self
64 }
65 pub fn get_identity_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
67 &self.identity_provider_arn
68 }
69 pub fn identity_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.identity_provider_name = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_identity_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.identity_provider_name = input;
77 self
78 }
79 pub fn get_identity_provider_name(&self) -> &::std::option::Option<::std::string::String> {
81 &self.identity_provider_name
82 }
83 pub fn identity_provider_type(mut self, input: crate::types::IdentityProviderType) -> Self {
85 self.identity_provider_type = ::std::option::Option::Some(input);
86 self
87 }
88 pub fn set_identity_provider_type(mut self, input: ::std::option::Option<crate::types::IdentityProviderType>) -> Self {
90 self.identity_provider_type = input;
91 self
92 }
93 pub fn get_identity_provider_type(&self) -> &::std::option::Option<crate::types::IdentityProviderType> {
95 &self.identity_provider_type
96 }
97 pub fn build(self) -> ::std::result::Result<crate::types::IdentityProviderSummary, ::aws_smithy_types::error::operation::BuildError> {
101 ::std::result::Result::Ok(crate::types::IdentityProviderSummary {
102 identity_provider_arn: self.identity_provider_arn.ok_or_else(|| {
103 ::aws_smithy_types::error::operation::BuildError::missing_field(
104 "identity_provider_arn",
105 "identity_provider_arn was not specified but it is required when building IdentityProviderSummary",
106 )
107 })?,
108 identity_provider_name: self.identity_provider_name,
109 identity_provider_type: self.identity_provider_type,
110 })
111 }
112}
113impl ::std::fmt::Debug for IdentityProviderSummaryBuilder {
114 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
115 let mut formatter = f.debug_struct("IdentityProviderSummaryBuilder");
116 formatter.field("identity_provider_arn", &self.identity_provider_arn);
117 formatter.field("identity_provider_name", &"*** Sensitive Data Redacted ***");
118 formatter.field("identity_provider_type", &self.identity_provider_type);
119 formatter.finish()
120 }
121}