{-# 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.ChimeSDKIdentity.Types.AppInstance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AppInstance = AppInstance'
{
AppInstance -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Core.Sensitive Prelude.Text),
AppInstance -> Maybe (Sensitive Text)
metadata :: Prelude.Maybe (Core.Sensitive Prelude.Text),
AppInstance -> Maybe Text
appInstanceArn :: Prelude.Maybe Prelude.Text,
AppInstance -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
AppInstance -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Core.POSIX
}
deriving (AppInstance -> AppInstance -> Bool
(AppInstance -> AppInstance -> Bool)
-> (AppInstance -> AppInstance -> Bool) -> Eq AppInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppInstance -> AppInstance -> Bool
$c/= :: AppInstance -> AppInstance -> Bool
== :: AppInstance -> AppInstance -> Bool
$c== :: AppInstance -> AppInstance -> Bool
Prelude.Eq, Int -> AppInstance -> ShowS
[AppInstance] -> ShowS
AppInstance -> String
(Int -> AppInstance -> ShowS)
-> (AppInstance -> String)
-> ([AppInstance] -> ShowS)
-> Show AppInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AppInstance] -> ShowS
$cshowList :: [AppInstance] -> ShowS
show :: AppInstance -> String
$cshow :: AppInstance -> String
showsPrec :: Int -> AppInstance -> ShowS
$cshowsPrec :: Int -> AppInstance -> ShowS
Prelude.Show, (forall x. AppInstance -> Rep AppInstance x)
-> (forall x. Rep AppInstance x -> AppInstance)
-> Generic AppInstance
forall x. Rep AppInstance x -> AppInstance
forall x. AppInstance -> Rep AppInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AppInstance x -> AppInstance
$cfrom :: forall x. AppInstance -> Rep AppInstance x
Prelude.Generic)
newAppInstance ::
AppInstance
newAppInstance :: AppInstance
newAppInstance =
AppInstance' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> AppInstance
AppInstance'
{ $sel:name:AppInstance' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:AppInstance' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:appInstanceArn:AppInstance' :: Maybe Text
appInstanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:AppInstance' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:AppInstance' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
appInstance_name :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_name :: (Maybe Text -> f (Maybe Text)) -> AppInstance -> f AppInstance
appInstance_name = (AppInstance -> Maybe (Sensitive Text))
-> (AppInstance -> Maybe (Sensitive Text) -> AppInstance)
-> Lens
AppInstance
AppInstance
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstance' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: AppInstance
s@AppInstance' {} Maybe (Sensitive Text)
a -> AppInstance
s {$sel:name:AppInstance' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: AppInstance) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> AppInstance -> f AppInstance)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> AppInstance
-> f AppInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
appInstance_metadata :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_metadata :: (Maybe Text -> f (Maybe Text)) -> AppInstance -> f AppInstance
appInstance_metadata = (AppInstance -> Maybe (Sensitive Text))
-> (AppInstance -> Maybe (Sensitive Text) -> AppInstance)
-> Lens
AppInstance
AppInstance
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstance' {Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
$sel:metadata:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
metadata} -> Maybe (Sensitive Text)
metadata) (\s :: AppInstance
s@AppInstance' {} Maybe (Sensitive Text)
a -> AppInstance
s {$sel:metadata:AppInstance' :: Maybe (Sensitive Text)
metadata = Maybe (Sensitive Text)
a} :: AppInstance) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> AppInstance -> f AppInstance)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> AppInstance
-> f AppInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
appInstance_appInstanceArn :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_appInstanceArn :: (Maybe Text -> f (Maybe Text)) -> AppInstance -> f AppInstance
appInstance_appInstanceArn = (AppInstance -> Maybe Text)
-> (AppInstance -> Maybe Text -> AppInstance)
-> Lens AppInstance AppInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstance' {Maybe Text
appInstanceArn :: Maybe Text
$sel:appInstanceArn:AppInstance' :: AppInstance -> Maybe Text
appInstanceArn} -> Maybe Text
appInstanceArn) (\s :: AppInstance
s@AppInstance' {} Maybe Text
a -> AppInstance
s {$sel:appInstanceArn:AppInstance' :: Maybe Text
appInstanceArn = Maybe Text
a} :: AppInstance)
appInstance_createdTimestamp :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.UTCTime)
appInstance_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AppInstance -> f AppInstance
appInstance_createdTimestamp = (AppInstance -> Maybe POSIX)
-> (AppInstance -> Maybe POSIX -> AppInstance)
-> Lens AppInstance AppInstance (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstance' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: AppInstance
s@AppInstance' {} Maybe POSIX
a -> AppInstance
s {$sel:createdTimestamp:AppInstance' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: AppInstance) ((Maybe POSIX -> f (Maybe POSIX)) -> AppInstance -> f AppInstance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AppInstance
-> f AppInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
appInstance_lastUpdatedTimestamp :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.UTCTime)
appInstance_lastUpdatedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AppInstance -> f AppInstance
appInstance_lastUpdatedTimestamp = (AppInstance -> Maybe POSIX)
-> (AppInstance -> Maybe POSIX -> AppInstance)
-> Lens AppInstance AppInstance (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AppInstance' {Maybe POSIX
lastUpdatedTimestamp :: Maybe POSIX
$sel:lastUpdatedTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
lastUpdatedTimestamp} -> Maybe POSIX
lastUpdatedTimestamp) (\s :: AppInstance
s@AppInstance' {} Maybe POSIX
a -> AppInstance
s {$sel:lastUpdatedTimestamp:AppInstance' :: Maybe POSIX
lastUpdatedTimestamp = Maybe POSIX
a} :: AppInstance) ((Maybe POSIX -> f (Maybe POSIX)) -> AppInstance -> f AppInstance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AppInstance
-> f AppInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON AppInstance where
parseJSON :: Value -> Parser AppInstance
parseJSON =
String
-> (Object -> Parser AppInstance) -> Value -> Parser AppInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AppInstance"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> AppInstance
AppInstance'
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> AppInstance)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe (Sensitive Text)
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> AppInstance)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
Parser
(Maybe (Sensitive Text)
-> Maybe Text -> Maybe POSIX -> Maybe POSIX -> AppInstance)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> Maybe POSIX -> Maybe POSIX -> AppInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Metadata")
Parser (Maybe Text -> Maybe POSIX -> Maybe POSIX -> AppInstance)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe POSIX -> AppInstance)
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
"AppInstanceArn")
Parser (Maybe POSIX -> Maybe POSIX -> AppInstance)
-> Parser (Maybe POSIX) -> Parser (Maybe POSIX -> AppInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTimestamp")
Parser (Maybe POSIX -> AppInstance)
-> Parser (Maybe POSIX) -> Parser AppInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTimestamp")
)
instance Prelude.Hashable AppInstance
instance Prelude.NFData AppInstance