{-# 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.Pinpoint.Types.ApplicationResponse 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 ApplicationResponse = ApplicationResponse'
{
ApplicationResponse -> Maybe Text
creationDate :: Prelude.Maybe Prelude.Text,
ApplicationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ApplicationResponse -> Text
id :: Prelude.Text,
ApplicationResponse -> Text
arn :: Prelude.Text,
ApplicationResponse -> Text
name :: Prelude.Text
}
deriving (ApplicationResponse -> ApplicationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationResponse -> ApplicationResponse -> Bool
$c/= :: ApplicationResponse -> ApplicationResponse -> Bool
== :: ApplicationResponse -> ApplicationResponse -> Bool
$c== :: ApplicationResponse -> ApplicationResponse -> Bool
Prelude.Eq, ReadPrec [ApplicationResponse]
ReadPrec ApplicationResponse
Int -> ReadS ApplicationResponse
ReadS [ApplicationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationResponse]
$creadListPrec :: ReadPrec [ApplicationResponse]
readPrec :: ReadPrec ApplicationResponse
$creadPrec :: ReadPrec ApplicationResponse
readList :: ReadS [ApplicationResponse]
$creadList :: ReadS [ApplicationResponse]
readsPrec :: Int -> ReadS ApplicationResponse
$creadsPrec :: Int -> ReadS ApplicationResponse
Prelude.Read, Int -> ApplicationResponse -> ShowS
[ApplicationResponse] -> ShowS
ApplicationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationResponse] -> ShowS
$cshowList :: [ApplicationResponse] -> ShowS
show :: ApplicationResponse -> String
$cshow :: ApplicationResponse -> String
showsPrec :: Int -> ApplicationResponse -> ShowS
$cshowsPrec :: Int -> ApplicationResponse -> ShowS
Prelude.Show, forall x. Rep ApplicationResponse x -> ApplicationResponse
forall x. ApplicationResponse -> Rep ApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationResponse x -> ApplicationResponse
$cfrom :: forall x. ApplicationResponse -> Rep ApplicationResponse x
Prelude.Generic)
newApplicationResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ApplicationResponse
newApplicationResponse :: Text -> Text -> Text -> ApplicationResponse
newApplicationResponse Text
pId_ Text
pArn_ Text
pName_ =
ApplicationResponse'
{ $sel:creationDate:ApplicationResponse' :: Maybe Text
creationDate =
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ApplicationResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:id:ApplicationResponse' :: Text
id = Text
pId_,
$sel:arn:ApplicationResponse' :: Text
arn = Text
pArn_,
$sel:name:ApplicationResponse' :: Text
name = Text
pName_
}
applicationResponse_creationDate :: Lens.Lens' ApplicationResponse (Prelude.Maybe Prelude.Text)
applicationResponse_creationDate :: Lens' ApplicationResponse (Maybe Text)
applicationResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationResponse' {Maybe Text
creationDate :: Maybe Text
$sel:creationDate:ApplicationResponse' :: ApplicationResponse -> Maybe Text
creationDate} -> Maybe Text
creationDate) (\s :: ApplicationResponse
s@ApplicationResponse' {} Maybe Text
a -> ApplicationResponse
s {$sel:creationDate:ApplicationResponse' :: Maybe Text
creationDate = Maybe Text
a} :: ApplicationResponse)
applicationResponse_tags :: Lens.Lens' ApplicationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
applicationResponse_tags :: Lens' ApplicationResponse (Maybe (HashMap Text Text))
applicationResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ApplicationResponse' :: ApplicationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ApplicationResponse
s@ApplicationResponse' {} Maybe (HashMap Text Text)
a -> ApplicationResponse
s {$sel:tags:ApplicationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ApplicationResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationResponse_id :: Lens.Lens' ApplicationResponse Prelude.Text
applicationResponse_id :: Lens' ApplicationResponse Text
applicationResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationResponse' {Text
id :: Text
$sel:id:ApplicationResponse' :: ApplicationResponse -> Text
id} -> Text
id) (\s :: ApplicationResponse
s@ApplicationResponse' {} Text
a -> ApplicationResponse
s {$sel:id:ApplicationResponse' :: Text
id = Text
a} :: ApplicationResponse)
applicationResponse_arn :: Lens.Lens' ApplicationResponse Prelude.Text
applicationResponse_arn :: Lens' ApplicationResponse Text
applicationResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationResponse' {Text
arn :: Text
$sel:arn:ApplicationResponse' :: ApplicationResponse -> Text
arn} -> Text
arn) (\s :: ApplicationResponse
s@ApplicationResponse' {} Text
a -> ApplicationResponse
s {$sel:arn:ApplicationResponse' :: Text
arn = Text
a} :: ApplicationResponse)
applicationResponse_name :: Lens.Lens' ApplicationResponse Prelude.Text
applicationResponse_name :: Lens' ApplicationResponse Text
applicationResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationResponse' {Text
name :: Text
$sel:name:ApplicationResponse' :: ApplicationResponse -> Text
name} -> Text
name) (\s :: ApplicationResponse
s@ApplicationResponse' {} Text
a -> ApplicationResponse
s {$sel:name:ApplicationResponse' :: Text
name = Text
a} :: ApplicationResponse)
instance Data.FromJSON ApplicationResponse where
parseJSON :: Value -> Parser ApplicationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ApplicationResponse"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> ApplicationResponse
ApplicationResponse'
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
"CreationDate")
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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
)
instance Prelude.Hashable ApplicationResponse where
hashWithSalt :: Int -> ApplicationResponse -> Int
hashWithSalt Int
_salt ApplicationResponse' {Maybe Text
Maybe (HashMap Text Text)
Text
name :: Text
arn :: Text
id :: Text
tags :: Maybe (HashMap Text Text)
creationDate :: Maybe Text
$sel:name:ApplicationResponse' :: ApplicationResponse -> Text
$sel:arn:ApplicationResponse' :: ApplicationResponse -> Text
$sel:id:ApplicationResponse' :: ApplicationResponse -> Text
$sel:tags:ApplicationResponse' :: ApplicationResponse -> Maybe (HashMap Text Text)
$sel:creationDate:ApplicationResponse' :: ApplicationResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData ApplicationResponse where
rnf :: ApplicationResponse -> ()
rnf ApplicationResponse' {Maybe Text
Maybe (HashMap Text Text)
Text
name :: Text
arn :: Text
id :: Text
tags :: Maybe (HashMap Text Text)
creationDate :: Maybe Text
$sel:name:ApplicationResponse' :: ApplicationResponse -> Text
$sel:arn:ApplicationResponse' :: ApplicationResponse -> Text
$sel:id:ApplicationResponse' :: ApplicationResponse -> Text
$sel:tags:ApplicationResponse' :: ApplicationResponse -> Maybe (HashMap Text Text)
$sel:creationDate:ApplicationResponse' :: ApplicationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name