{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AppInstance = AppInstance'
{
AppInstance -> Maybe Text
appInstanceArn :: Prelude.Maybe Prelude.Text,
AppInstance -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
AppInstance -> Maybe POSIX
lastUpdatedTimestamp :: Prelude.Maybe Data.POSIX,
AppInstance -> Maybe (Sensitive Text)
metadata :: Prelude.Maybe (Data.Sensitive Prelude.Text),
AppInstance -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text)
}
deriving (AppInstance -> AppInstance -> Bool
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
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. 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'
{ $sel:appInstanceArn:AppInstance' :: Maybe Text
appInstanceArn = forall a. Maybe a
Prelude.Nothing,
$sel:createdTimestamp:AppInstance' :: Maybe POSIX
createdTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:AppInstance' :: Maybe POSIX
lastUpdatedTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:metadata:AppInstance' :: Maybe (Sensitive Text)
metadata = forall a. Maybe a
Prelude.Nothing,
$sel:name:AppInstance' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing
}
appInstance_appInstanceArn :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_appInstanceArn :: Lens' AppInstance (Maybe Text)
appInstance_appInstanceArn = 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 :: Lens' AppInstance (Maybe UTCTime)
appInstance_createdTimestamp = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
appInstance_lastUpdatedTimestamp :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.UTCTime)
appInstance_lastUpdatedTimestamp :: Lens' AppInstance (Maybe UTCTime)
appInstance_lastUpdatedTimestamp = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
appInstance_metadata :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_metadata :: Lens' AppInstance (Maybe Text)
appInstance_metadata = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
appInstance_name :: Lens.Lens' AppInstance (Prelude.Maybe Prelude.Text)
appInstance_name :: Lens' AppInstance (Maybe Text)
appInstance_name = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
instance Data.FromJSON AppInstance where
parseJSON :: Value -> Parser AppInstance
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AppInstance"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> AppInstance
AppInstance'
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
"AppInstanceArn")
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
"CreatedTimestamp")
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
"LastUpdatedTimestamp")
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
"Metadata")
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
"Name")
)
instance Prelude.Hashable AppInstance where
hashWithSalt :: Int -> AppInstance -> Int
hashWithSalt Int
_salt AppInstance' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
name :: Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
lastUpdatedTimestamp :: Maybe POSIX
createdTimestamp :: Maybe POSIX
appInstanceArn :: Maybe Text
$sel:name:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
$sel:metadata:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
$sel:lastUpdatedTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
$sel:createdTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
$sel:appInstanceArn:AppInstance' :: AppInstance -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
appInstanceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
metadata
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
instance Prelude.NFData AppInstance where
rnf :: AppInstance -> ()
rnf AppInstance' {Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
name :: Maybe (Sensitive Text)
metadata :: Maybe (Sensitive Text)
lastUpdatedTimestamp :: Maybe POSIX
createdTimestamp :: Maybe POSIX
appInstanceArn :: Maybe Text
$sel:name:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
$sel:metadata:AppInstance' :: AppInstance -> Maybe (Sensitive Text)
$sel:lastUpdatedTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
$sel:createdTimestamp:AppInstance' :: AppInstance -> Maybe POSIX
$sel:appInstanceArn:AppInstance' :: AppInstance -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appInstanceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
metadata
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name