{-# 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.ECS.Types.AttachmentStateChange where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AttachmentStateChange = AttachmentStateChange'
{
AttachmentStateChange -> Text
attachmentArn :: Prelude.Text,
AttachmentStateChange -> Text
status :: Prelude.Text
}
deriving (AttachmentStateChange -> AttachmentStateChange -> Bool
(AttachmentStateChange -> AttachmentStateChange -> Bool)
-> (AttachmentStateChange -> AttachmentStateChange -> Bool)
-> Eq AttachmentStateChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachmentStateChange -> AttachmentStateChange -> Bool
$c/= :: AttachmentStateChange -> AttachmentStateChange -> Bool
== :: AttachmentStateChange -> AttachmentStateChange -> Bool
$c== :: AttachmentStateChange -> AttachmentStateChange -> Bool
Prelude.Eq, ReadPrec [AttachmentStateChange]
ReadPrec AttachmentStateChange
Int -> ReadS AttachmentStateChange
ReadS [AttachmentStateChange]
(Int -> ReadS AttachmentStateChange)
-> ReadS [AttachmentStateChange]
-> ReadPrec AttachmentStateChange
-> ReadPrec [AttachmentStateChange]
-> Read AttachmentStateChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachmentStateChange]
$creadListPrec :: ReadPrec [AttachmentStateChange]
readPrec :: ReadPrec AttachmentStateChange
$creadPrec :: ReadPrec AttachmentStateChange
readList :: ReadS [AttachmentStateChange]
$creadList :: ReadS [AttachmentStateChange]
readsPrec :: Int -> ReadS AttachmentStateChange
$creadsPrec :: Int -> ReadS AttachmentStateChange
Prelude.Read, Int -> AttachmentStateChange -> ShowS
[AttachmentStateChange] -> ShowS
AttachmentStateChange -> String
(Int -> AttachmentStateChange -> ShowS)
-> (AttachmentStateChange -> String)
-> ([AttachmentStateChange] -> ShowS)
-> Show AttachmentStateChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachmentStateChange] -> ShowS
$cshowList :: [AttachmentStateChange] -> ShowS
show :: AttachmentStateChange -> String
$cshow :: AttachmentStateChange -> String
showsPrec :: Int -> AttachmentStateChange -> ShowS
$cshowsPrec :: Int -> AttachmentStateChange -> ShowS
Prelude.Show, (forall x. AttachmentStateChange -> Rep AttachmentStateChange x)
-> (forall x. Rep AttachmentStateChange x -> AttachmentStateChange)
-> Generic AttachmentStateChange
forall x. Rep AttachmentStateChange x -> AttachmentStateChange
forall x. AttachmentStateChange -> Rep AttachmentStateChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttachmentStateChange x -> AttachmentStateChange
$cfrom :: forall x. AttachmentStateChange -> Rep AttachmentStateChange x
Prelude.Generic)
newAttachmentStateChange ::
Prelude.Text ->
Prelude.Text ->
AttachmentStateChange
newAttachmentStateChange :: Text -> Text -> AttachmentStateChange
newAttachmentStateChange Text
pAttachmentArn_ Text
pStatus_ =
AttachmentStateChange' :: Text -> Text -> AttachmentStateChange
AttachmentStateChange'
{ $sel:attachmentArn:AttachmentStateChange' :: Text
attachmentArn =
Text
pAttachmentArn_,
$sel:status:AttachmentStateChange' :: Text
status = Text
pStatus_
}
attachmentStateChange_attachmentArn :: Lens.Lens' AttachmentStateChange Prelude.Text
attachmentStateChange_attachmentArn :: (Text -> f Text)
-> AttachmentStateChange -> f AttachmentStateChange
attachmentStateChange_attachmentArn = (AttachmentStateChange -> Text)
-> (AttachmentStateChange -> Text -> AttachmentStateChange)
-> Lens AttachmentStateChange AttachmentStateChange Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachmentStateChange' {Text
attachmentArn :: Text
$sel:attachmentArn:AttachmentStateChange' :: AttachmentStateChange -> Text
attachmentArn} -> Text
attachmentArn) (\s :: AttachmentStateChange
s@AttachmentStateChange' {} Text
a -> AttachmentStateChange
s {$sel:attachmentArn:AttachmentStateChange' :: Text
attachmentArn = Text
a} :: AttachmentStateChange)
attachmentStateChange_status :: Lens.Lens' AttachmentStateChange Prelude.Text
attachmentStateChange_status :: (Text -> f Text)
-> AttachmentStateChange -> f AttachmentStateChange
attachmentStateChange_status = (AttachmentStateChange -> Text)
-> (AttachmentStateChange -> Text -> AttachmentStateChange)
-> Lens AttachmentStateChange AttachmentStateChange Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachmentStateChange' {Text
status :: Text
$sel:status:AttachmentStateChange' :: AttachmentStateChange -> Text
status} -> Text
status) (\s :: AttachmentStateChange
s@AttachmentStateChange' {} Text
a -> AttachmentStateChange
s {$sel:status:AttachmentStateChange' :: Text
status = Text
a} :: AttachmentStateChange)
instance Prelude.Hashable AttachmentStateChange
instance Prelude.NFData AttachmentStateChange
instance Core.ToJSON AttachmentStateChange where
toJSON :: AttachmentStateChange -> Value
toJSON AttachmentStateChange' {Text
status :: Text
attachmentArn :: Text
$sel:status:AttachmentStateChange' :: AttachmentStateChange -> Text
$sel:attachmentArn:AttachmentStateChange' :: AttachmentStateChange -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"attachmentArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
attachmentArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"status" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
status)
]
)