{-# 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.DocumentDefaultVersionDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DocumentDefaultVersionDescription = DocumentDefaultVersionDescription'
{
DocumentDefaultVersionDescription -> Maybe Text
defaultVersionName :: Prelude.Maybe Prelude.Text,
DocumentDefaultVersionDescription -> Maybe Text
defaultVersion :: Prelude.Maybe Prelude.Text,
DocumentDefaultVersionDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool
(DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool)
-> (DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool)
-> Eq DocumentDefaultVersionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool
$c/= :: DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool
== :: DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool
$c== :: DocumentDefaultVersionDescription
-> DocumentDefaultVersionDescription -> Bool
Prelude.Eq, ReadPrec [DocumentDefaultVersionDescription]
ReadPrec DocumentDefaultVersionDescription
Int -> ReadS DocumentDefaultVersionDescription
ReadS [DocumentDefaultVersionDescription]
(Int -> ReadS DocumentDefaultVersionDescription)
-> ReadS [DocumentDefaultVersionDescription]
-> ReadPrec DocumentDefaultVersionDescription
-> ReadPrec [DocumentDefaultVersionDescription]
-> Read DocumentDefaultVersionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentDefaultVersionDescription]
$creadListPrec :: ReadPrec [DocumentDefaultVersionDescription]
readPrec :: ReadPrec DocumentDefaultVersionDescription
$creadPrec :: ReadPrec DocumentDefaultVersionDescription
readList :: ReadS [DocumentDefaultVersionDescription]
$creadList :: ReadS [DocumentDefaultVersionDescription]
readsPrec :: Int -> ReadS DocumentDefaultVersionDescription
$creadsPrec :: Int -> ReadS DocumentDefaultVersionDescription
Prelude.Read, Int -> DocumentDefaultVersionDescription -> ShowS
[DocumentDefaultVersionDescription] -> ShowS
DocumentDefaultVersionDescription -> String
(Int -> DocumentDefaultVersionDescription -> ShowS)
-> (DocumentDefaultVersionDescription -> String)
-> ([DocumentDefaultVersionDescription] -> ShowS)
-> Show DocumentDefaultVersionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentDefaultVersionDescription] -> ShowS
$cshowList :: [DocumentDefaultVersionDescription] -> ShowS
show :: DocumentDefaultVersionDescription -> String
$cshow :: DocumentDefaultVersionDescription -> String
showsPrec :: Int -> DocumentDefaultVersionDescription -> ShowS
$cshowsPrec :: Int -> DocumentDefaultVersionDescription -> ShowS
Prelude.Show, (forall x.
DocumentDefaultVersionDescription
-> Rep DocumentDefaultVersionDescription x)
-> (forall x.
Rep DocumentDefaultVersionDescription x
-> DocumentDefaultVersionDescription)
-> Generic DocumentDefaultVersionDescription
forall x.
Rep DocumentDefaultVersionDescription x
-> DocumentDefaultVersionDescription
forall x.
DocumentDefaultVersionDescription
-> Rep DocumentDefaultVersionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentDefaultVersionDescription x
-> DocumentDefaultVersionDescription
$cfrom :: forall x.
DocumentDefaultVersionDescription
-> Rep DocumentDefaultVersionDescription x
Prelude.Generic)
newDocumentDefaultVersionDescription ::
DocumentDefaultVersionDescription
newDocumentDefaultVersionDescription :: DocumentDefaultVersionDescription
newDocumentDefaultVersionDescription =
DocumentDefaultVersionDescription' :: Maybe Text
-> Maybe Text -> Maybe Text -> DocumentDefaultVersionDescription
DocumentDefaultVersionDescription'
{ $sel:defaultVersionName:DocumentDefaultVersionDescription' :: Maybe Text
defaultVersionName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultVersion:DocumentDefaultVersionDescription' :: Maybe Text
defaultVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DocumentDefaultVersionDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
documentDefaultVersionDescription_defaultVersionName :: Lens.Lens' DocumentDefaultVersionDescription (Prelude.Maybe Prelude.Text)
documentDefaultVersionDescription_defaultVersionName :: (Maybe Text -> f (Maybe Text))
-> DocumentDefaultVersionDescription
-> f DocumentDefaultVersionDescription
documentDefaultVersionDescription_defaultVersionName = (DocumentDefaultVersionDescription -> Maybe Text)
-> (DocumentDefaultVersionDescription
-> Maybe Text -> DocumentDefaultVersionDescription)
-> Lens
DocumentDefaultVersionDescription
DocumentDefaultVersionDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentDefaultVersionDescription' {Maybe Text
defaultVersionName :: Maybe Text
$sel:defaultVersionName:DocumentDefaultVersionDescription' :: DocumentDefaultVersionDescription -> Maybe Text
defaultVersionName} -> Maybe Text
defaultVersionName) (\s :: DocumentDefaultVersionDescription
s@DocumentDefaultVersionDescription' {} Maybe Text
a -> DocumentDefaultVersionDescription
s {$sel:defaultVersionName:DocumentDefaultVersionDescription' :: Maybe Text
defaultVersionName = Maybe Text
a} :: DocumentDefaultVersionDescription)
documentDefaultVersionDescription_defaultVersion :: Lens.Lens' DocumentDefaultVersionDescription (Prelude.Maybe Prelude.Text)
documentDefaultVersionDescription_defaultVersion :: (Maybe Text -> f (Maybe Text))
-> DocumentDefaultVersionDescription
-> f DocumentDefaultVersionDescription
documentDefaultVersionDescription_defaultVersion = (DocumentDefaultVersionDescription -> Maybe Text)
-> (DocumentDefaultVersionDescription
-> Maybe Text -> DocumentDefaultVersionDescription)
-> Lens
DocumentDefaultVersionDescription
DocumentDefaultVersionDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentDefaultVersionDescription' {Maybe Text
defaultVersion :: Maybe Text
$sel:defaultVersion:DocumentDefaultVersionDescription' :: DocumentDefaultVersionDescription -> Maybe Text
defaultVersion} -> Maybe Text
defaultVersion) (\s :: DocumentDefaultVersionDescription
s@DocumentDefaultVersionDescription' {} Maybe Text
a -> DocumentDefaultVersionDescription
s {$sel:defaultVersion:DocumentDefaultVersionDescription' :: Maybe Text
defaultVersion = Maybe Text
a} :: DocumentDefaultVersionDescription)
documentDefaultVersionDescription_name :: Lens.Lens' DocumentDefaultVersionDescription (Prelude.Maybe Prelude.Text)
documentDefaultVersionDescription_name :: (Maybe Text -> f (Maybe Text))
-> DocumentDefaultVersionDescription
-> f DocumentDefaultVersionDescription
documentDefaultVersionDescription_name = (DocumentDefaultVersionDescription -> Maybe Text)
-> (DocumentDefaultVersionDescription
-> Maybe Text -> DocumentDefaultVersionDescription)
-> Lens
DocumentDefaultVersionDescription
DocumentDefaultVersionDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentDefaultVersionDescription' {Maybe Text
name :: Maybe Text
$sel:name:DocumentDefaultVersionDescription' :: DocumentDefaultVersionDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: DocumentDefaultVersionDescription
s@DocumentDefaultVersionDescription' {} Maybe Text
a -> DocumentDefaultVersionDescription
s {$sel:name:DocumentDefaultVersionDescription' :: Maybe Text
name = Maybe Text
a} :: DocumentDefaultVersionDescription)
instance
Core.FromJSON
DocumentDefaultVersionDescription
where
parseJSON :: Value -> Parser DocumentDefaultVersionDescription
parseJSON =
String
-> (Object -> Parser DocumentDefaultVersionDescription)
-> Value
-> Parser DocumentDefaultVersionDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DocumentDefaultVersionDescription"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> DocumentDefaultVersionDescription
DocumentDefaultVersionDescription'
(Maybe Text
-> Maybe Text -> Maybe Text -> DocumentDefaultVersionDescription)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> DocumentDefaultVersionDescription)
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
"DefaultVersionName")
Parser
(Maybe Text -> Maybe Text -> DocumentDefaultVersionDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DocumentDefaultVersionDescription)
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
"DefaultVersion")
Parser (Maybe Text -> DocumentDefaultVersionDescription)
-> Parser (Maybe Text) -> Parser DocumentDefaultVersionDescription
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")
)
instance
Prelude.Hashable
DocumentDefaultVersionDescription
instance
Prelude.NFData
DocumentDefaultVersionDescription