{-# 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.QuickSight.Types.NamespaceInfoV2 where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.IdentityStore
import Amazonka.QuickSight.Types.NamespaceError
import Amazonka.QuickSight.Types.NamespaceStatus
data NamespaceInfoV2 = NamespaceInfoV2'
{
NamespaceInfoV2 -> Maybe Text
capacityRegion :: Prelude.Maybe Prelude.Text,
NamespaceInfoV2 -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
NamespaceInfoV2 -> Maybe NamespaceStatus
creationStatus :: Prelude.Maybe NamespaceStatus,
NamespaceInfoV2 -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
NamespaceInfoV2 -> Maybe NamespaceError
namespaceError :: Prelude.Maybe NamespaceError,
NamespaceInfoV2 -> Maybe IdentityStore
identityStore :: Prelude.Maybe IdentityStore
}
deriving (NamespaceInfoV2 -> NamespaceInfoV2 -> Bool
(NamespaceInfoV2 -> NamespaceInfoV2 -> Bool)
-> (NamespaceInfoV2 -> NamespaceInfoV2 -> Bool)
-> Eq NamespaceInfoV2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NamespaceInfoV2 -> NamespaceInfoV2 -> Bool
$c/= :: NamespaceInfoV2 -> NamespaceInfoV2 -> Bool
== :: NamespaceInfoV2 -> NamespaceInfoV2 -> Bool
$c== :: NamespaceInfoV2 -> NamespaceInfoV2 -> Bool
Prelude.Eq, ReadPrec [NamespaceInfoV2]
ReadPrec NamespaceInfoV2
Int -> ReadS NamespaceInfoV2
ReadS [NamespaceInfoV2]
(Int -> ReadS NamespaceInfoV2)
-> ReadS [NamespaceInfoV2]
-> ReadPrec NamespaceInfoV2
-> ReadPrec [NamespaceInfoV2]
-> Read NamespaceInfoV2
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NamespaceInfoV2]
$creadListPrec :: ReadPrec [NamespaceInfoV2]
readPrec :: ReadPrec NamespaceInfoV2
$creadPrec :: ReadPrec NamespaceInfoV2
readList :: ReadS [NamespaceInfoV2]
$creadList :: ReadS [NamespaceInfoV2]
readsPrec :: Int -> ReadS NamespaceInfoV2
$creadsPrec :: Int -> ReadS NamespaceInfoV2
Prelude.Read, Int -> NamespaceInfoV2 -> ShowS
[NamespaceInfoV2] -> ShowS
NamespaceInfoV2 -> String
(Int -> NamespaceInfoV2 -> ShowS)
-> (NamespaceInfoV2 -> String)
-> ([NamespaceInfoV2] -> ShowS)
-> Show NamespaceInfoV2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NamespaceInfoV2] -> ShowS
$cshowList :: [NamespaceInfoV2] -> ShowS
show :: NamespaceInfoV2 -> String
$cshow :: NamespaceInfoV2 -> String
showsPrec :: Int -> NamespaceInfoV2 -> ShowS
$cshowsPrec :: Int -> NamespaceInfoV2 -> ShowS
Prelude.Show, (forall x. NamespaceInfoV2 -> Rep NamespaceInfoV2 x)
-> (forall x. Rep NamespaceInfoV2 x -> NamespaceInfoV2)
-> Generic NamespaceInfoV2
forall x. Rep NamespaceInfoV2 x -> NamespaceInfoV2
forall x. NamespaceInfoV2 -> Rep NamespaceInfoV2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NamespaceInfoV2 x -> NamespaceInfoV2
$cfrom :: forall x. NamespaceInfoV2 -> Rep NamespaceInfoV2 x
Prelude.Generic)
newNamespaceInfoV2 ::
NamespaceInfoV2
newNamespaceInfoV2 :: NamespaceInfoV2
newNamespaceInfoV2 =
NamespaceInfoV2' :: Maybe Text
-> Maybe Text
-> Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2
NamespaceInfoV2'
{ $sel:capacityRegion:NamespaceInfoV2' :: Maybe Text
capacityRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:NamespaceInfoV2' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationStatus:NamespaceInfoV2' :: Maybe NamespaceStatus
creationStatus = Maybe NamespaceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:name:NamespaceInfoV2' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceError:NamespaceInfoV2' :: Maybe NamespaceError
namespaceError = Maybe NamespaceError
forall a. Maybe a
Prelude.Nothing,
$sel:identityStore:NamespaceInfoV2' :: Maybe IdentityStore
identityStore = Maybe IdentityStore
forall a. Maybe a
Prelude.Nothing
}
namespaceInfoV2_capacityRegion :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe Prelude.Text)
namespaceInfoV2_capacityRegion :: (Maybe Text -> f (Maybe Text))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_capacityRegion = (NamespaceInfoV2 -> Maybe Text)
-> (NamespaceInfoV2 -> Maybe Text -> NamespaceInfoV2)
-> Lens NamespaceInfoV2 NamespaceInfoV2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe Text
capacityRegion :: Maybe Text
$sel:capacityRegion:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe Text
capacityRegion} -> Maybe Text
capacityRegion) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe Text
a -> NamespaceInfoV2
s {$sel:capacityRegion:NamespaceInfoV2' :: Maybe Text
capacityRegion = Maybe Text
a} :: NamespaceInfoV2)
namespaceInfoV2_arn :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe Prelude.Text)
namespaceInfoV2_arn :: (Maybe Text -> f (Maybe Text))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_arn = (NamespaceInfoV2 -> Maybe Text)
-> (NamespaceInfoV2 -> Maybe Text -> NamespaceInfoV2)
-> Lens NamespaceInfoV2 NamespaceInfoV2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe Text
arn :: Maybe Text
$sel:arn:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe Text
arn} -> Maybe Text
arn) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe Text
a -> NamespaceInfoV2
s {$sel:arn:NamespaceInfoV2' :: Maybe Text
arn = Maybe Text
a} :: NamespaceInfoV2)
namespaceInfoV2_creationStatus :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe NamespaceStatus)
namespaceInfoV2_creationStatus :: (Maybe NamespaceStatus -> f (Maybe NamespaceStatus))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_creationStatus = (NamespaceInfoV2 -> Maybe NamespaceStatus)
-> (NamespaceInfoV2 -> Maybe NamespaceStatus -> NamespaceInfoV2)
-> Lens
NamespaceInfoV2
NamespaceInfoV2
(Maybe NamespaceStatus)
(Maybe NamespaceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe NamespaceStatus
creationStatus :: Maybe NamespaceStatus
$sel:creationStatus:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe NamespaceStatus
creationStatus} -> Maybe NamespaceStatus
creationStatus) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe NamespaceStatus
a -> NamespaceInfoV2
s {$sel:creationStatus:NamespaceInfoV2' :: Maybe NamespaceStatus
creationStatus = Maybe NamespaceStatus
a} :: NamespaceInfoV2)
namespaceInfoV2_name :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe Prelude.Text)
namespaceInfoV2_name :: (Maybe Text -> f (Maybe Text))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_name = (NamespaceInfoV2 -> Maybe Text)
-> (NamespaceInfoV2 -> Maybe Text -> NamespaceInfoV2)
-> Lens NamespaceInfoV2 NamespaceInfoV2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe Text
name :: Maybe Text
$sel:name:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe Text
name} -> Maybe Text
name) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe Text
a -> NamespaceInfoV2
s {$sel:name:NamespaceInfoV2' :: Maybe Text
name = Maybe Text
a} :: NamespaceInfoV2)
namespaceInfoV2_namespaceError :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe NamespaceError)
namespaceInfoV2_namespaceError :: (Maybe NamespaceError -> f (Maybe NamespaceError))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_namespaceError = (NamespaceInfoV2 -> Maybe NamespaceError)
-> (NamespaceInfoV2 -> Maybe NamespaceError -> NamespaceInfoV2)
-> Lens
NamespaceInfoV2
NamespaceInfoV2
(Maybe NamespaceError)
(Maybe NamespaceError)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe NamespaceError
namespaceError :: Maybe NamespaceError
$sel:namespaceError:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe NamespaceError
namespaceError} -> Maybe NamespaceError
namespaceError) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe NamespaceError
a -> NamespaceInfoV2
s {$sel:namespaceError:NamespaceInfoV2' :: Maybe NamespaceError
namespaceError = Maybe NamespaceError
a} :: NamespaceInfoV2)
namespaceInfoV2_identityStore :: Lens.Lens' NamespaceInfoV2 (Prelude.Maybe IdentityStore)
namespaceInfoV2_identityStore :: (Maybe IdentityStore -> f (Maybe IdentityStore))
-> NamespaceInfoV2 -> f NamespaceInfoV2
namespaceInfoV2_identityStore = (NamespaceInfoV2 -> Maybe IdentityStore)
-> (NamespaceInfoV2 -> Maybe IdentityStore -> NamespaceInfoV2)
-> Lens
NamespaceInfoV2
NamespaceInfoV2
(Maybe IdentityStore)
(Maybe IdentityStore)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NamespaceInfoV2' {Maybe IdentityStore
identityStore :: Maybe IdentityStore
$sel:identityStore:NamespaceInfoV2' :: NamespaceInfoV2 -> Maybe IdentityStore
identityStore} -> Maybe IdentityStore
identityStore) (\s :: NamespaceInfoV2
s@NamespaceInfoV2' {} Maybe IdentityStore
a -> NamespaceInfoV2
s {$sel:identityStore:NamespaceInfoV2' :: Maybe IdentityStore
identityStore = Maybe IdentityStore
a} :: NamespaceInfoV2)
instance Core.FromJSON NamespaceInfoV2 where
parseJSON :: Value -> Parser NamespaceInfoV2
parseJSON =
String
-> (Object -> Parser NamespaceInfoV2)
-> Value
-> Parser NamespaceInfoV2
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NamespaceInfoV2"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2
NamespaceInfoV2'
(Maybe Text
-> Maybe Text
-> Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CapacityRegion")
Parser
(Maybe Text
-> Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2)
-> Parser (Maybe Text)
-> Parser
(Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
Parser
(Maybe NamespaceStatus
-> Maybe Text
-> Maybe NamespaceError
-> Maybe IdentityStore
-> NamespaceInfoV2)
-> Parser (Maybe NamespaceStatus)
-> Parser
(Maybe Text
-> Maybe NamespaceError -> Maybe IdentityStore -> NamespaceInfoV2)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationStatus")
Parser
(Maybe Text
-> Maybe NamespaceError -> Maybe IdentityStore -> NamespaceInfoV2)
-> Parser (Maybe Text)
-> Parser
(Maybe NamespaceError -> Maybe IdentityStore -> NamespaceInfoV2)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe NamespaceError -> Maybe IdentityStore -> NamespaceInfoV2)
-> Parser (Maybe NamespaceError)
-> Parser (Maybe IdentityStore -> NamespaceInfoV2)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceError)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NamespaceError")
Parser (Maybe IdentityStore -> NamespaceInfoV2)
-> Parser (Maybe IdentityStore) -> Parser NamespaceInfoV2
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IdentityStore)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentityStore")
)
instance Prelude.Hashable NamespaceInfoV2
instance Prelude.NFData NamespaceInfoV2