{-# 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.ReportedOs 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 ReportedOs = ReportedOs'
{
ReportedOs -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
ReportedOs -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ReportedOs -> Maybe Text
version :: Prelude.Maybe Prelude.Text
}
deriving (ReportedOs -> ReportedOs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportedOs -> ReportedOs -> Bool
$c/= :: ReportedOs -> ReportedOs -> Bool
== :: ReportedOs -> ReportedOs -> Bool
$c== :: ReportedOs -> ReportedOs -> Bool
Prelude.Eq, ReadPrec [ReportedOs]
ReadPrec ReportedOs
Int -> ReadS ReportedOs
ReadS [ReportedOs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportedOs]
$creadListPrec :: ReadPrec [ReportedOs]
readPrec :: ReadPrec ReportedOs
$creadPrec :: ReadPrec ReportedOs
readList :: ReadS [ReportedOs]
$creadList :: ReadS [ReportedOs]
readsPrec :: Int -> ReadS ReportedOs
$creadsPrec :: Int -> ReadS ReportedOs
Prelude.Read, Int -> ReportedOs -> ShowS
[ReportedOs] -> ShowS
ReportedOs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportedOs] -> ShowS
$cshowList :: [ReportedOs] -> ShowS
show :: ReportedOs -> String
$cshow :: ReportedOs -> String
showsPrec :: Int -> ReportedOs -> ShowS
$cshowsPrec :: Int -> ReportedOs -> ShowS
Prelude.Show, forall x. Rep ReportedOs x -> ReportedOs
forall x. ReportedOs -> Rep ReportedOs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportedOs x -> ReportedOs
$cfrom :: forall x. ReportedOs -> Rep ReportedOs x
Prelude.Generic)
newReportedOs ::
ReportedOs
newReportedOs :: ReportedOs
newReportedOs =
ReportedOs'
{ $sel:family:ReportedOs' :: Maybe Text
family = forall a. Maybe a
Prelude.Nothing,
$sel:name:ReportedOs' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:version:ReportedOs' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
}
reportedOs_family :: Lens.Lens' ReportedOs (Prelude.Maybe Prelude.Text)
reportedOs_family :: Lens' ReportedOs (Maybe Text)
reportedOs_family = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportedOs' {Maybe Text
family :: Maybe Text
$sel:family:ReportedOs' :: ReportedOs -> Maybe Text
family} -> Maybe Text
family) (\s :: ReportedOs
s@ReportedOs' {} Maybe Text
a -> ReportedOs
s {$sel:family:ReportedOs' :: Maybe Text
family = Maybe Text
a} :: ReportedOs)
reportedOs_name :: Lens.Lens' ReportedOs (Prelude.Maybe Prelude.Text)
reportedOs_name :: Lens' ReportedOs (Maybe Text)
reportedOs_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportedOs' {Maybe Text
name :: Maybe Text
$sel:name:ReportedOs' :: ReportedOs -> Maybe Text
name} -> Maybe Text
name) (\s :: ReportedOs
s@ReportedOs' {} Maybe Text
a -> ReportedOs
s {$sel:name:ReportedOs' :: Maybe Text
name = Maybe Text
a} :: ReportedOs)
reportedOs_version :: Lens.Lens' ReportedOs (Prelude.Maybe Prelude.Text)
reportedOs_version :: Lens' ReportedOs (Maybe Text)
reportedOs_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportedOs' {Maybe Text
version :: Maybe Text
$sel:version:ReportedOs' :: ReportedOs -> Maybe Text
version} -> Maybe Text
version) (\s :: ReportedOs
s@ReportedOs' {} Maybe Text
a -> ReportedOs
s {$sel:version:ReportedOs' :: Maybe Text
version = Maybe Text
a} :: ReportedOs)
instance Data.FromJSON ReportedOs where
parseJSON :: Value -> Parser ReportedOs
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ReportedOs"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ReportedOs
ReportedOs'
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
"Family")
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")
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
"Version")
)
instance Prelude.Hashable ReportedOs where
hashWithSalt :: Int -> ReportedOs -> Int
hashWithSalt Int
_salt ReportedOs' {Maybe Text
version :: Maybe Text
name :: Maybe Text
family :: Maybe Text
$sel:version:ReportedOs' :: ReportedOs -> Maybe Text
$sel:name:ReportedOs' :: ReportedOs -> Maybe Text
$sel:family:ReportedOs' :: ReportedOs -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
family
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
instance Prelude.NFData ReportedOs where
rnf :: ReportedOs -> ()
rnf ReportedOs' {Maybe Text
version :: Maybe Text
name :: Maybe Text
family :: Maybe Text
$sel:version:ReportedOs' :: ReportedOs -> Maybe Text
$sel:name:ReportedOs' :: ReportedOs -> Maybe Text
$sel:family:ReportedOs' :: ReportedOs -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
family
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version