{-# 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.SSM.Types.ServiceSetting where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServiceSetting = ServiceSetting'
{
ServiceSetting -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ServiceSetting -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
ServiceSetting -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ServiceSetting -> Maybe Text
settingId :: Prelude.Maybe Prelude.Text,
ServiceSetting -> Maybe Text
lastModifiedUser :: Prelude.Maybe Prelude.Text,
ServiceSetting -> Maybe Text
settingValue :: Prelude.Maybe Prelude.Text
}
deriving (ServiceSetting -> ServiceSetting -> Bool
(ServiceSetting -> ServiceSetting -> Bool)
-> (ServiceSetting -> ServiceSetting -> Bool) -> Eq ServiceSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceSetting -> ServiceSetting -> Bool
$c/= :: ServiceSetting -> ServiceSetting -> Bool
== :: ServiceSetting -> ServiceSetting -> Bool
$c== :: ServiceSetting -> ServiceSetting -> Bool
Prelude.Eq, ReadPrec [ServiceSetting]
ReadPrec ServiceSetting
Int -> ReadS ServiceSetting
ReadS [ServiceSetting]
(Int -> ReadS ServiceSetting)
-> ReadS [ServiceSetting]
-> ReadPrec ServiceSetting
-> ReadPrec [ServiceSetting]
-> Read ServiceSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceSetting]
$creadListPrec :: ReadPrec [ServiceSetting]
readPrec :: ReadPrec ServiceSetting
$creadPrec :: ReadPrec ServiceSetting
readList :: ReadS [ServiceSetting]
$creadList :: ReadS [ServiceSetting]
readsPrec :: Int -> ReadS ServiceSetting
$creadsPrec :: Int -> ReadS ServiceSetting
Prelude.Read, Int -> ServiceSetting -> ShowS
[ServiceSetting] -> ShowS
ServiceSetting -> String
(Int -> ServiceSetting -> ShowS)
-> (ServiceSetting -> String)
-> ([ServiceSetting] -> ShowS)
-> Show ServiceSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceSetting] -> ShowS
$cshowList :: [ServiceSetting] -> ShowS
show :: ServiceSetting -> String
$cshow :: ServiceSetting -> String
showsPrec :: Int -> ServiceSetting -> ShowS
$cshowsPrec :: Int -> ServiceSetting -> ShowS
Prelude.Show, (forall x. ServiceSetting -> Rep ServiceSetting x)
-> (forall x. Rep ServiceSetting x -> ServiceSetting)
-> Generic ServiceSetting
forall x. Rep ServiceSetting x -> ServiceSetting
forall x. ServiceSetting -> Rep ServiceSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceSetting x -> ServiceSetting
$cfrom :: forall x. ServiceSetting -> Rep ServiceSetting x
Prelude.Generic)
newServiceSetting ::
ServiceSetting
newServiceSetting :: ServiceSetting
newServiceSetting =
ServiceSetting' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ServiceSetting
ServiceSetting'
{ $sel:status:ServiceSetting' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:ServiceSetting' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ServiceSetting' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:settingId:ServiceSetting' :: Maybe Text
settingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedUser:ServiceSetting' :: Maybe Text
lastModifiedUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:settingValue:ServiceSetting' :: Maybe Text
settingValue = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serviceSetting_status :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.Text)
serviceSetting_status :: (Maybe Text -> f (Maybe Text))
-> ServiceSetting -> f ServiceSetting
serviceSetting_status = (ServiceSetting -> Maybe Text)
-> (ServiceSetting -> Maybe Text -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe Text
status :: Maybe Text
$sel:status:ServiceSetting' :: ServiceSetting -> Maybe Text
status} -> Maybe Text
status) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe Text
a -> ServiceSetting
s {$sel:status:ServiceSetting' :: Maybe Text
status = Maybe Text
a} :: ServiceSetting)
serviceSetting_lastModifiedDate :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.UTCTime)
serviceSetting_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSetting -> f ServiceSetting
serviceSetting_lastModifiedDate = (ServiceSetting -> Maybe POSIX)
-> (ServiceSetting -> Maybe POSIX -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ServiceSetting' :: ServiceSetting -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe POSIX
a -> ServiceSetting
s {$sel:lastModifiedDate:ServiceSetting' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ServiceSetting) ((Maybe POSIX -> f (Maybe POSIX))
-> ServiceSetting -> f ServiceSetting)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSetting
-> f ServiceSetting
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
serviceSetting_arn :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.Text)
serviceSetting_arn :: (Maybe Text -> f (Maybe Text))
-> ServiceSetting -> f ServiceSetting
serviceSetting_arn = (ServiceSetting -> Maybe Text)
-> (ServiceSetting -> Maybe Text -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe Text
arn :: Maybe Text
$sel:arn:ServiceSetting' :: ServiceSetting -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe Text
a -> ServiceSetting
s {$sel:arn:ServiceSetting' :: Maybe Text
arn = Maybe Text
a} :: ServiceSetting)
serviceSetting_settingId :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.Text)
serviceSetting_settingId :: (Maybe Text -> f (Maybe Text))
-> ServiceSetting -> f ServiceSetting
serviceSetting_settingId = (ServiceSetting -> Maybe Text)
-> (ServiceSetting -> Maybe Text -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe Text
settingId :: Maybe Text
$sel:settingId:ServiceSetting' :: ServiceSetting -> Maybe Text
settingId} -> Maybe Text
settingId) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe Text
a -> ServiceSetting
s {$sel:settingId:ServiceSetting' :: Maybe Text
settingId = Maybe Text
a} :: ServiceSetting)
serviceSetting_lastModifiedUser :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.Text)
serviceSetting_lastModifiedUser :: (Maybe Text -> f (Maybe Text))
-> ServiceSetting -> f ServiceSetting
serviceSetting_lastModifiedUser = (ServiceSetting -> Maybe Text)
-> (ServiceSetting -> Maybe Text -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe Text
lastModifiedUser :: Maybe Text
$sel:lastModifiedUser:ServiceSetting' :: ServiceSetting -> Maybe Text
lastModifiedUser} -> Maybe Text
lastModifiedUser) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe Text
a -> ServiceSetting
s {$sel:lastModifiedUser:ServiceSetting' :: Maybe Text
lastModifiedUser = Maybe Text
a} :: ServiceSetting)
serviceSetting_settingValue :: Lens.Lens' ServiceSetting (Prelude.Maybe Prelude.Text)
serviceSetting_settingValue :: (Maybe Text -> f (Maybe Text))
-> ServiceSetting -> f ServiceSetting
serviceSetting_settingValue = (ServiceSetting -> Maybe Text)
-> (ServiceSetting -> Maybe Text -> ServiceSetting)
-> Lens ServiceSetting ServiceSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSetting' {Maybe Text
settingValue :: Maybe Text
$sel:settingValue:ServiceSetting' :: ServiceSetting -> Maybe Text
settingValue} -> Maybe Text
settingValue) (\s :: ServiceSetting
s@ServiceSetting' {} Maybe Text
a -> ServiceSetting
s {$sel:settingValue:ServiceSetting' :: Maybe Text
settingValue = Maybe Text
a} :: ServiceSetting)
instance Core.FromJSON ServiceSetting where
parseJSON :: Value -> Parser ServiceSetting
parseJSON =
String
-> (Object -> Parser ServiceSetting)
-> Value
-> Parser ServiceSetting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceSetting"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ServiceSetting
ServiceSetting'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ServiceSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ServiceSetting)
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
"Status")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ServiceSetting)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ServiceSetting)
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
"LastModifiedDate")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ServiceSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ServiceSetting)
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 Text -> Maybe Text -> Maybe Text -> ServiceSetting)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ServiceSetting)
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
"SettingId")
Parser (Maybe Text -> Maybe Text -> ServiceSetting)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ServiceSetting)
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
"LastModifiedUser")
Parser (Maybe Text -> ServiceSetting)
-> Parser (Maybe Text) -> Parser ServiceSetting
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
"SettingValue")
)
instance Prelude.Hashable ServiceSetting
instance Prelude.NFData ServiceSetting