{-# 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.OpsWorks.Types.OperatingSystem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types.OperatingSystemConfigurationManager
import qualified Amazonka.Prelude as Prelude
data OperatingSystem = OperatingSystem'
{
OperatingSystem -> Maybe Text
reportedVersion :: Prelude.Maybe Prelude.Text,
OperatingSystem -> Maybe Bool
supported :: Prelude.Maybe Prelude.Bool,
OperatingSystem -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
OperatingSystem -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
OperatingSystem -> Maybe [OperatingSystemConfigurationManager]
configurationManagers :: Prelude.Maybe [OperatingSystemConfigurationManager],
OperatingSystem -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
OperatingSystem -> Maybe Text
reportedName :: Prelude.Maybe Prelude.Text
}
deriving (OperatingSystem -> OperatingSystem -> Bool
(OperatingSystem -> OperatingSystem -> Bool)
-> (OperatingSystem -> OperatingSystem -> Bool)
-> Eq OperatingSystem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OperatingSystem -> OperatingSystem -> Bool
$c/= :: OperatingSystem -> OperatingSystem -> Bool
== :: OperatingSystem -> OperatingSystem -> Bool
$c== :: OperatingSystem -> OperatingSystem -> Bool
Prelude.Eq, ReadPrec [OperatingSystem]
ReadPrec OperatingSystem
Int -> ReadS OperatingSystem
ReadS [OperatingSystem]
(Int -> ReadS OperatingSystem)
-> ReadS [OperatingSystem]
-> ReadPrec OperatingSystem
-> ReadPrec [OperatingSystem]
-> Read OperatingSystem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OperatingSystem]
$creadListPrec :: ReadPrec [OperatingSystem]
readPrec :: ReadPrec OperatingSystem
$creadPrec :: ReadPrec OperatingSystem
readList :: ReadS [OperatingSystem]
$creadList :: ReadS [OperatingSystem]
readsPrec :: Int -> ReadS OperatingSystem
$creadsPrec :: Int -> ReadS OperatingSystem
Prelude.Read, Int -> OperatingSystem -> ShowS
[OperatingSystem] -> ShowS
OperatingSystem -> String
(Int -> OperatingSystem -> ShowS)
-> (OperatingSystem -> String)
-> ([OperatingSystem] -> ShowS)
-> Show OperatingSystem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OperatingSystem] -> ShowS
$cshowList :: [OperatingSystem] -> ShowS
show :: OperatingSystem -> String
$cshow :: OperatingSystem -> String
showsPrec :: Int -> OperatingSystem -> ShowS
$cshowsPrec :: Int -> OperatingSystem -> ShowS
Prelude.Show, (forall x. OperatingSystem -> Rep OperatingSystem x)
-> (forall x. Rep OperatingSystem x -> OperatingSystem)
-> Generic OperatingSystem
forall x. Rep OperatingSystem x -> OperatingSystem
forall x. OperatingSystem -> Rep OperatingSystem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OperatingSystem x -> OperatingSystem
$cfrom :: forall x. OperatingSystem -> Rep OperatingSystem x
Prelude.Generic)
newOperatingSystem ::
OperatingSystem
newOperatingSystem :: OperatingSystem
newOperatingSystem =
OperatingSystem' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem
OperatingSystem'
{ $sel:reportedVersion:OperatingSystem' :: Maybe Text
reportedVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supported:OperatingSystem' :: Maybe Bool
supported = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:name:OperatingSystem' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:OperatingSystem' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configurationManagers:OperatingSystem' :: Maybe [OperatingSystemConfigurationManager]
configurationManagers = Maybe [OperatingSystemConfigurationManager]
forall a. Maybe a
Prelude.Nothing,
$sel:type':OperatingSystem' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reportedName:OperatingSystem' :: Maybe Text
reportedName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
operatingSystem_reportedVersion :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Text)
operatingSystem_reportedVersion :: (Maybe Text -> f (Maybe Text))
-> OperatingSystem -> f OperatingSystem
operatingSystem_reportedVersion = (OperatingSystem -> Maybe Text)
-> (OperatingSystem -> Maybe Text -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Text
reportedVersion :: Maybe Text
$sel:reportedVersion:OperatingSystem' :: OperatingSystem -> Maybe Text
reportedVersion} -> Maybe Text
reportedVersion) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Text
a -> OperatingSystem
s {$sel:reportedVersion:OperatingSystem' :: Maybe Text
reportedVersion = Maybe Text
a} :: OperatingSystem)
operatingSystem_supported :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Bool)
operatingSystem_supported :: (Maybe Bool -> f (Maybe Bool))
-> OperatingSystem -> f OperatingSystem
operatingSystem_supported = (OperatingSystem -> Maybe Bool)
-> (OperatingSystem -> Maybe Bool -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Bool
supported :: Maybe Bool
$sel:supported:OperatingSystem' :: OperatingSystem -> Maybe Bool
supported} -> Maybe Bool
supported) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Bool
a -> OperatingSystem
s {$sel:supported:OperatingSystem' :: Maybe Bool
supported = Maybe Bool
a} :: OperatingSystem)
operatingSystem_name :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Text)
operatingSystem_name :: (Maybe Text -> f (Maybe Text))
-> OperatingSystem -> f OperatingSystem
operatingSystem_name = (OperatingSystem -> Maybe Text)
-> (OperatingSystem -> Maybe Text -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Text
name :: Maybe Text
$sel:name:OperatingSystem' :: OperatingSystem -> Maybe Text
name} -> Maybe Text
name) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Text
a -> OperatingSystem
s {$sel:name:OperatingSystem' :: Maybe Text
name = Maybe Text
a} :: OperatingSystem)
operatingSystem_id :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Text)
operatingSystem_id :: (Maybe Text -> f (Maybe Text))
-> OperatingSystem -> f OperatingSystem
operatingSystem_id = (OperatingSystem -> Maybe Text)
-> (OperatingSystem -> Maybe Text -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Text
id :: Maybe Text
$sel:id:OperatingSystem' :: OperatingSystem -> Maybe Text
id} -> Maybe Text
id) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Text
a -> OperatingSystem
s {$sel:id:OperatingSystem' :: Maybe Text
id = Maybe Text
a} :: OperatingSystem)
operatingSystem_configurationManagers :: Lens.Lens' OperatingSystem (Prelude.Maybe [OperatingSystemConfigurationManager])
operatingSystem_configurationManagers :: (Maybe [OperatingSystemConfigurationManager]
-> f (Maybe [OperatingSystemConfigurationManager]))
-> OperatingSystem -> f OperatingSystem
operatingSystem_configurationManagers = (OperatingSystem -> Maybe [OperatingSystemConfigurationManager])
-> (OperatingSystem
-> Maybe [OperatingSystemConfigurationManager] -> OperatingSystem)
-> Lens
OperatingSystem
OperatingSystem
(Maybe [OperatingSystemConfigurationManager])
(Maybe [OperatingSystemConfigurationManager])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe [OperatingSystemConfigurationManager]
configurationManagers :: Maybe [OperatingSystemConfigurationManager]
$sel:configurationManagers:OperatingSystem' :: OperatingSystem -> Maybe [OperatingSystemConfigurationManager]
configurationManagers} -> Maybe [OperatingSystemConfigurationManager]
configurationManagers) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe [OperatingSystemConfigurationManager]
a -> OperatingSystem
s {$sel:configurationManagers:OperatingSystem' :: Maybe [OperatingSystemConfigurationManager]
configurationManagers = Maybe [OperatingSystemConfigurationManager]
a} :: OperatingSystem) ((Maybe [OperatingSystemConfigurationManager]
-> f (Maybe [OperatingSystemConfigurationManager]))
-> OperatingSystem -> f OperatingSystem)
-> ((Maybe [OperatingSystemConfigurationManager]
-> f (Maybe [OperatingSystemConfigurationManager]))
-> Maybe [OperatingSystemConfigurationManager]
-> f (Maybe [OperatingSystemConfigurationManager]))
-> (Maybe [OperatingSystemConfigurationManager]
-> f (Maybe [OperatingSystemConfigurationManager]))
-> OperatingSystem
-> f OperatingSystem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
-> Iso
(Maybe [OperatingSystemConfigurationManager])
(Maybe [OperatingSystemConfigurationManager])
(Maybe [OperatingSystemConfigurationManager])
(Maybe [OperatingSystemConfigurationManager])
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
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
[OperatingSystemConfigurationManager]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
operatingSystem_type :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Text)
operatingSystem_type :: (Maybe Text -> f (Maybe Text))
-> OperatingSystem -> f OperatingSystem
operatingSystem_type = (OperatingSystem -> Maybe Text)
-> (OperatingSystem -> Maybe Text -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Text
type' :: Maybe Text
$sel:type':OperatingSystem' :: OperatingSystem -> Maybe Text
type'} -> Maybe Text
type') (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Text
a -> OperatingSystem
s {$sel:type':OperatingSystem' :: Maybe Text
type' = Maybe Text
a} :: OperatingSystem)
operatingSystem_reportedName :: Lens.Lens' OperatingSystem (Prelude.Maybe Prelude.Text)
operatingSystem_reportedName :: (Maybe Text -> f (Maybe Text))
-> OperatingSystem -> f OperatingSystem
operatingSystem_reportedName = (OperatingSystem -> Maybe Text)
-> (OperatingSystem -> Maybe Text -> OperatingSystem)
-> Lens OperatingSystem OperatingSystem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OperatingSystem' {Maybe Text
reportedName :: Maybe Text
$sel:reportedName:OperatingSystem' :: OperatingSystem -> Maybe Text
reportedName} -> Maybe Text
reportedName) (\s :: OperatingSystem
s@OperatingSystem' {} Maybe Text
a -> OperatingSystem
s {$sel:reportedName:OperatingSystem' :: Maybe Text
reportedName = Maybe Text
a} :: OperatingSystem)
instance Core.FromJSON OperatingSystem where
parseJSON :: Value -> Parser OperatingSystem
parseJSON =
String
-> (Object -> Parser OperatingSystem)
-> Value
-> Parser OperatingSystem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OperatingSystem"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem
OperatingSystem'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
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
"ReportedVersion")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Supported")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
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 Text
-> Maybe [OperatingSystemConfigurationManager]
-> Maybe Text
-> Maybe Text
-> OperatingSystem)
-> Parser (Maybe Text)
-> Parser
(Maybe [OperatingSystemConfigurationManager]
-> Maybe Text -> Maybe Text -> OperatingSystem)
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
"Id")
Parser
(Maybe [OperatingSystemConfigurationManager]
-> Maybe Text -> Maybe Text -> OperatingSystem)
-> Parser (Maybe [OperatingSystemConfigurationManager])
-> Parser (Maybe Text -> Maybe Text -> OperatingSystem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [OperatingSystemConfigurationManager]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationManagers"
Parser (Maybe (Maybe [OperatingSystemConfigurationManager]))
-> Maybe [OperatingSystemConfigurationManager]
-> Parser (Maybe [OperatingSystemConfigurationManager])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OperatingSystemConfigurationManager]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> Maybe Text -> OperatingSystem)
-> Parser (Maybe Text) -> Parser (Maybe Text -> OperatingSystem)
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
"Type")
Parser (Maybe Text -> OperatingSystem)
-> Parser (Maybe Text) -> Parser OperatingSystem
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
"ReportedName")
)
instance Prelude.Hashable OperatingSystem
instance Prelude.NFData OperatingSystem