{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.WorkMail.Types.OrganizationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data OrganizationSummary = OrganizationSummary'
{
OrganizationSummary -> Maybe Text
alias :: Prelude.Maybe Prelude.Text,
OrganizationSummary -> Maybe Text
defaultMailDomain :: Prelude.Maybe Prelude.Text,
OrganizationSummary -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
OrganizationSummary -> Maybe Text
organizationId :: Prelude.Maybe Prelude.Text,
OrganizationSummary -> Maybe Text
state :: Prelude.Maybe Prelude.Text
}
deriving (OrganizationSummary -> OrganizationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationSummary -> OrganizationSummary -> Bool
$c/= :: OrganizationSummary -> OrganizationSummary -> Bool
== :: OrganizationSummary -> OrganizationSummary -> Bool
$c== :: OrganizationSummary -> OrganizationSummary -> Bool
Prelude.Eq, ReadPrec [OrganizationSummary]
ReadPrec OrganizationSummary
Int -> ReadS OrganizationSummary
ReadS [OrganizationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationSummary]
$creadListPrec :: ReadPrec [OrganizationSummary]
readPrec :: ReadPrec OrganizationSummary
$creadPrec :: ReadPrec OrganizationSummary
readList :: ReadS [OrganizationSummary]
$creadList :: ReadS [OrganizationSummary]
readsPrec :: Int -> ReadS OrganizationSummary
$creadsPrec :: Int -> ReadS OrganizationSummary
Prelude.Read, Int -> OrganizationSummary -> ShowS
[OrganizationSummary] -> ShowS
OrganizationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationSummary] -> ShowS
$cshowList :: [OrganizationSummary] -> ShowS
show :: OrganizationSummary -> String
$cshow :: OrganizationSummary -> String
showsPrec :: Int -> OrganizationSummary -> ShowS
$cshowsPrec :: Int -> OrganizationSummary -> ShowS
Prelude.Show, forall x. Rep OrganizationSummary x -> OrganizationSummary
forall x. OrganizationSummary -> Rep OrganizationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrganizationSummary x -> OrganizationSummary
$cfrom :: forall x. OrganizationSummary -> Rep OrganizationSummary x
Prelude.Generic)
newOrganizationSummary ::
OrganizationSummary
newOrganizationSummary :: OrganizationSummary
newOrganizationSummary =
OrganizationSummary'
{ $sel:alias:OrganizationSummary' :: Maybe Text
alias = forall a. Maybe a
Prelude.Nothing,
$sel:defaultMailDomain:OrganizationSummary' :: Maybe Text
defaultMailDomain = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:OrganizationSummary' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:organizationId:OrganizationSummary' :: Maybe Text
organizationId = forall a. Maybe a
Prelude.Nothing,
$sel:state:OrganizationSummary' :: Maybe Text
state = forall a. Maybe a
Prelude.Nothing
}
organizationSummary_alias :: Lens.Lens' OrganizationSummary (Prelude.Maybe Prelude.Text)
organizationSummary_alias :: Lens' OrganizationSummary (Maybe Text)
organizationSummary_alias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationSummary' {Maybe Text
alias :: Maybe Text
$sel:alias:OrganizationSummary' :: OrganizationSummary -> Maybe Text
alias} -> Maybe Text
alias) (\s :: OrganizationSummary
s@OrganizationSummary' {} Maybe Text
a -> OrganizationSummary
s {$sel:alias:OrganizationSummary' :: Maybe Text
alias = Maybe Text
a} :: OrganizationSummary)
organizationSummary_defaultMailDomain :: Lens.Lens' OrganizationSummary (Prelude.Maybe Prelude.Text)
organizationSummary_defaultMailDomain :: Lens' OrganizationSummary (Maybe Text)
organizationSummary_defaultMailDomain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationSummary' {Maybe Text
defaultMailDomain :: Maybe Text
$sel:defaultMailDomain:OrganizationSummary' :: OrganizationSummary -> Maybe Text
defaultMailDomain} -> Maybe Text
defaultMailDomain) (\s :: OrganizationSummary
s@OrganizationSummary' {} Maybe Text
a -> OrganizationSummary
s {$sel:defaultMailDomain:OrganizationSummary' :: Maybe Text
defaultMailDomain = Maybe Text
a} :: OrganizationSummary)
organizationSummary_errorMessage :: Lens.Lens' OrganizationSummary (Prelude.Maybe Prelude.Text)
organizationSummary_errorMessage :: Lens' OrganizationSummary (Maybe Text)
organizationSummary_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationSummary' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:OrganizationSummary' :: OrganizationSummary -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: OrganizationSummary
s@OrganizationSummary' {} Maybe Text
a -> OrganizationSummary
s {$sel:errorMessage:OrganizationSummary' :: Maybe Text
errorMessage = Maybe Text
a} :: OrganizationSummary)
organizationSummary_organizationId :: Lens.Lens' OrganizationSummary (Prelude.Maybe Prelude.Text)
organizationSummary_organizationId :: Lens' OrganizationSummary (Maybe Text)
organizationSummary_organizationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationSummary' {Maybe Text
organizationId :: Maybe Text
$sel:organizationId:OrganizationSummary' :: OrganizationSummary -> Maybe Text
organizationId} -> Maybe Text
organizationId) (\s :: OrganizationSummary
s@OrganizationSummary' {} Maybe Text
a -> OrganizationSummary
s {$sel:organizationId:OrganizationSummary' :: Maybe Text
organizationId = Maybe Text
a} :: OrganizationSummary)
organizationSummary_state :: Lens.Lens' OrganizationSummary (Prelude.Maybe Prelude.Text)
organizationSummary_state :: Lens' OrganizationSummary (Maybe Text)
organizationSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationSummary' {Maybe Text
state :: Maybe Text
$sel:state:OrganizationSummary' :: OrganizationSummary -> Maybe Text
state} -> Maybe Text
state) (\s :: OrganizationSummary
s@OrganizationSummary' {} Maybe Text
a -> OrganizationSummary
s {$sel:state:OrganizationSummary' :: Maybe Text
state = Maybe Text
a} :: OrganizationSummary)
instance Data.FromJSON OrganizationSummary where
parseJSON :: Value -> Parser OrganizationSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OrganizationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OrganizationSummary
OrganizationSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Alias")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DefaultMailDomain")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OrganizationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
)
instance Prelude.Hashable OrganizationSummary where
hashWithSalt :: Int -> OrganizationSummary -> Int
hashWithSalt Int
_salt OrganizationSummary' {Maybe Text
state :: Maybe Text
organizationId :: Maybe Text
errorMessage :: Maybe Text
defaultMailDomain :: Maybe Text
alias :: Maybe Text
$sel:state:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:organizationId:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:errorMessage:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:defaultMailDomain:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:alias:OrganizationSummary' :: OrganizationSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
alias
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultMailDomain
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
organizationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
state
instance Prelude.NFData OrganizationSummary where
rnf :: OrganizationSummary -> ()
rnf OrganizationSummary' {Maybe Text
state :: Maybe Text
organizationId :: Maybe Text
errorMessage :: Maybe Text
defaultMailDomain :: Maybe Text
alias :: Maybe Text
$sel:state:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:organizationId:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:errorMessage:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:defaultMailDomain:OrganizationSummary' :: OrganizationSummary -> Maybe Text
$sel:alias:OrganizationSummary' :: OrganizationSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
alias
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultMailDomain
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
organizationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
state