{-# 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.SegmentResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.SegmentDimensions
import Amazonka.Pinpoint.Types.SegmentGroupList
import Amazonka.Pinpoint.Types.SegmentImportResource
import Amazonka.Pinpoint.Types.SegmentType
import qualified Amazonka.Prelude as Prelude
data SegmentResponse = SegmentResponse'
{
SegmentResponse -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
SegmentResponse -> Maybe SegmentGroupList
segmentGroups :: Prelude.Maybe SegmentGroupList,
SegmentResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SegmentResponse -> Maybe Int
version :: Prelude.Maybe Prelude.Int,
SegmentResponse -> Maybe SegmentImportResource
importDefinition :: Prelude.Maybe SegmentImportResource,
SegmentResponse -> Maybe SegmentDimensions
dimensions :: Prelude.Maybe SegmentDimensions,
SegmentResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
SegmentResponse -> SegmentType
segmentType :: SegmentType,
SegmentResponse -> Text
creationDate :: Prelude.Text,
SegmentResponse -> Text
id :: Prelude.Text,
SegmentResponse -> Text
arn :: Prelude.Text,
SegmentResponse -> Text
applicationId :: Prelude.Text
}
deriving (SegmentResponse -> SegmentResponse -> Bool
(SegmentResponse -> SegmentResponse -> Bool)
-> (SegmentResponse -> SegmentResponse -> Bool)
-> Eq SegmentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SegmentResponse -> SegmentResponse -> Bool
$c/= :: SegmentResponse -> SegmentResponse -> Bool
== :: SegmentResponse -> SegmentResponse -> Bool
$c== :: SegmentResponse -> SegmentResponse -> Bool
Prelude.Eq, ReadPrec [SegmentResponse]
ReadPrec SegmentResponse
Int -> ReadS SegmentResponse
ReadS [SegmentResponse]
(Int -> ReadS SegmentResponse)
-> ReadS [SegmentResponse]
-> ReadPrec SegmentResponse
-> ReadPrec [SegmentResponse]
-> Read SegmentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SegmentResponse]
$creadListPrec :: ReadPrec [SegmentResponse]
readPrec :: ReadPrec SegmentResponse
$creadPrec :: ReadPrec SegmentResponse
readList :: ReadS [SegmentResponse]
$creadList :: ReadS [SegmentResponse]
readsPrec :: Int -> ReadS SegmentResponse
$creadsPrec :: Int -> ReadS SegmentResponse
Prelude.Read, Int -> SegmentResponse -> ShowS
[SegmentResponse] -> ShowS
SegmentResponse -> String
(Int -> SegmentResponse -> ShowS)
-> (SegmentResponse -> String)
-> ([SegmentResponse] -> ShowS)
-> Show SegmentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SegmentResponse] -> ShowS
$cshowList :: [SegmentResponse] -> ShowS
show :: SegmentResponse -> String
$cshow :: SegmentResponse -> String
showsPrec :: Int -> SegmentResponse -> ShowS
$cshowsPrec :: Int -> SegmentResponse -> ShowS
Prelude.Show, (forall x. SegmentResponse -> Rep SegmentResponse x)
-> (forall x. Rep SegmentResponse x -> SegmentResponse)
-> Generic SegmentResponse
forall x. Rep SegmentResponse x -> SegmentResponse
forall x. SegmentResponse -> Rep SegmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SegmentResponse x -> SegmentResponse
$cfrom :: forall x. SegmentResponse -> Rep SegmentResponse x
Prelude.Generic)
newSegmentResponse ::
SegmentType ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
SegmentResponse
newSegmentResponse :: SegmentType -> Text -> Text -> Text -> Text -> SegmentResponse
newSegmentResponse
SegmentType
pSegmentType_
Text
pCreationDate_
Text
pId_
Text
pArn_
Text
pApplicationId_ =
SegmentResponse' :: Maybe Text
-> Maybe SegmentGroupList
-> Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse
SegmentResponse'
{ $sel:lastModifiedDate:SegmentResponse' :: Maybe Text
lastModifiedDate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:segmentGroups:SegmentResponse' :: Maybe SegmentGroupList
segmentGroups = Maybe SegmentGroupList
forall a. Maybe a
Prelude.Nothing,
$sel:name:SegmentResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:SegmentResponse' :: Maybe Int
version = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:importDefinition:SegmentResponse' :: Maybe SegmentImportResource
importDefinition = Maybe SegmentImportResource
forall a. Maybe a
Prelude.Nothing,
$sel:dimensions:SegmentResponse' :: Maybe SegmentDimensions
dimensions = Maybe SegmentDimensions
forall a. Maybe a
Prelude.Nothing,
$sel:tags:SegmentResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:segmentType:SegmentResponse' :: SegmentType
segmentType = SegmentType
pSegmentType_,
$sel:creationDate:SegmentResponse' :: Text
creationDate = Text
pCreationDate_,
$sel:id:SegmentResponse' :: Text
id = Text
pId_,
$sel:arn:SegmentResponse' :: Text
arn = Text
pArn_,
$sel:applicationId:SegmentResponse' :: Text
applicationId = Text
pApplicationId_
}
segmentResponse_lastModifiedDate :: Lens.Lens' SegmentResponse (Prelude.Maybe Prelude.Text)
segmentResponse_lastModifiedDate :: (Maybe Text -> f (Maybe Text))
-> SegmentResponse -> f SegmentResponse
segmentResponse_lastModifiedDate = (SegmentResponse -> Maybe Text)
-> (SegmentResponse -> Maybe Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:SegmentResponse' :: SegmentResponse -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe Text
a -> SegmentResponse
s {$sel:lastModifiedDate:SegmentResponse' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: SegmentResponse)
segmentResponse_segmentGroups :: Lens.Lens' SegmentResponse (Prelude.Maybe SegmentGroupList)
segmentResponse_segmentGroups :: (Maybe SegmentGroupList -> f (Maybe SegmentGroupList))
-> SegmentResponse -> f SegmentResponse
segmentResponse_segmentGroups = (SegmentResponse -> Maybe SegmentGroupList)
-> (SegmentResponse -> Maybe SegmentGroupList -> SegmentResponse)
-> Lens
SegmentResponse
SegmentResponse
(Maybe SegmentGroupList)
(Maybe SegmentGroupList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe SegmentGroupList
segmentGroups :: Maybe SegmentGroupList
$sel:segmentGroups:SegmentResponse' :: SegmentResponse -> Maybe SegmentGroupList
segmentGroups} -> Maybe SegmentGroupList
segmentGroups) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe SegmentGroupList
a -> SegmentResponse
s {$sel:segmentGroups:SegmentResponse' :: Maybe SegmentGroupList
segmentGroups = Maybe SegmentGroupList
a} :: SegmentResponse)
segmentResponse_name :: Lens.Lens' SegmentResponse (Prelude.Maybe Prelude.Text)
segmentResponse_name :: (Maybe Text -> f (Maybe Text))
-> SegmentResponse -> f SegmentResponse
segmentResponse_name = (SegmentResponse -> Maybe Text)
-> (SegmentResponse -> Maybe Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe Text
name :: Maybe Text
$sel:name:SegmentResponse' :: SegmentResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe Text
a -> SegmentResponse
s {$sel:name:SegmentResponse' :: Maybe Text
name = Maybe Text
a} :: SegmentResponse)
segmentResponse_version :: Lens.Lens' SegmentResponse (Prelude.Maybe Prelude.Int)
segmentResponse_version :: (Maybe Int -> f (Maybe Int))
-> SegmentResponse -> f SegmentResponse
segmentResponse_version = (SegmentResponse -> Maybe Int)
-> (SegmentResponse -> Maybe Int -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe Int
version :: Maybe Int
$sel:version:SegmentResponse' :: SegmentResponse -> Maybe Int
version} -> Maybe Int
version) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe Int
a -> SegmentResponse
s {$sel:version:SegmentResponse' :: Maybe Int
version = Maybe Int
a} :: SegmentResponse)
segmentResponse_importDefinition :: Lens.Lens' SegmentResponse (Prelude.Maybe SegmentImportResource)
segmentResponse_importDefinition :: (Maybe SegmentImportResource -> f (Maybe SegmentImportResource))
-> SegmentResponse -> f SegmentResponse
segmentResponse_importDefinition = (SegmentResponse -> Maybe SegmentImportResource)
-> (SegmentResponse
-> Maybe SegmentImportResource -> SegmentResponse)
-> Lens
SegmentResponse
SegmentResponse
(Maybe SegmentImportResource)
(Maybe SegmentImportResource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe SegmentImportResource
importDefinition :: Maybe SegmentImportResource
$sel:importDefinition:SegmentResponse' :: SegmentResponse -> Maybe SegmentImportResource
importDefinition} -> Maybe SegmentImportResource
importDefinition) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe SegmentImportResource
a -> SegmentResponse
s {$sel:importDefinition:SegmentResponse' :: Maybe SegmentImportResource
importDefinition = Maybe SegmentImportResource
a} :: SegmentResponse)
segmentResponse_dimensions :: Lens.Lens' SegmentResponse (Prelude.Maybe SegmentDimensions)
segmentResponse_dimensions :: (Maybe SegmentDimensions -> f (Maybe SegmentDimensions))
-> SegmentResponse -> f SegmentResponse
segmentResponse_dimensions = (SegmentResponse -> Maybe SegmentDimensions)
-> (SegmentResponse -> Maybe SegmentDimensions -> SegmentResponse)
-> Lens
SegmentResponse
SegmentResponse
(Maybe SegmentDimensions)
(Maybe SegmentDimensions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe SegmentDimensions
dimensions :: Maybe SegmentDimensions
$sel:dimensions:SegmentResponse' :: SegmentResponse -> Maybe SegmentDimensions
dimensions} -> Maybe SegmentDimensions
dimensions) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe SegmentDimensions
a -> SegmentResponse
s {$sel:dimensions:SegmentResponse' :: Maybe SegmentDimensions
dimensions = Maybe SegmentDimensions
a} :: SegmentResponse)
segmentResponse_tags :: Lens.Lens' SegmentResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
segmentResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SegmentResponse -> f SegmentResponse
segmentResponse_tags = (SegmentResponse -> Maybe (HashMap Text Text))
-> (SegmentResponse
-> Maybe (HashMap Text Text) -> SegmentResponse)
-> Lens
SegmentResponse
SegmentResponse
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:SegmentResponse' :: SegmentResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: SegmentResponse
s@SegmentResponse' {} Maybe (HashMap Text Text)
a -> SegmentResponse
s {$sel:tags:SegmentResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: SegmentResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SegmentResponse -> f SegmentResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SegmentResponse
-> f SegmentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
segmentResponse_segmentType :: Lens.Lens' SegmentResponse SegmentType
segmentResponse_segmentType :: (SegmentType -> f SegmentType)
-> SegmentResponse -> f SegmentResponse
segmentResponse_segmentType = (SegmentResponse -> SegmentType)
-> (SegmentResponse -> SegmentType -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse SegmentType SegmentType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {SegmentType
segmentType :: SegmentType
$sel:segmentType:SegmentResponse' :: SegmentResponse -> SegmentType
segmentType} -> SegmentType
segmentType) (\s :: SegmentResponse
s@SegmentResponse' {} SegmentType
a -> SegmentResponse
s {$sel:segmentType:SegmentResponse' :: SegmentType
segmentType = SegmentType
a} :: SegmentResponse)
segmentResponse_creationDate :: Lens.Lens' SegmentResponse Prelude.Text
segmentResponse_creationDate :: (Text -> f Text) -> SegmentResponse -> f SegmentResponse
segmentResponse_creationDate = (SegmentResponse -> Text)
-> (SegmentResponse -> Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Text
creationDate :: Text
$sel:creationDate:SegmentResponse' :: SegmentResponse -> Text
creationDate} -> Text
creationDate) (\s :: SegmentResponse
s@SegmentResponse' {} Text
a -> SegmentResponse
s {$sel:creationDate:SegmentResponse' :: Text
creationDate = Text
a} :: SegmentResponse)
segmentResponse_id :: Lens.Lens' SegmentResponse Prelude.Text
segmentResponse_id :: (Text -> f Text) -> SegmentResponse -> f SegmentResponse
segmentResponse_id = (SegmentResponse -> Text)
-> (SegmentResponse -> Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Text
id :: Text
$sel:id:SegmentResponse' :: SegmentResponse -> Text
id} -> Text
id) (\s :: SegmentResponse
s@SegmentResponse' {} Text
a -> SegmentResponse
s {$sel:id:SegmentResponse' :: Text
id = Text
a} :: SegmentResponse)
segmentResponse_arn :: Lens.Lens' SegmentResponse Prelude.Text
segmentResponse_arn :: (Text -> f Text) -> SegmentResponse -> f SegmentResponse
segmentResponse_arn = (SegmentResponse -> Text)
-> (SegmentResponse -> Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Text
arn :: Text
$sel:arn:SegmentResponse' :: SegmentResponse -> Text
arn} -> Text
arn) (\s :: SegmentResponse
s@SegmentResponse' {} Text
a -> SegmentResponse
s {$sel:arn:SegmentResponse' :: Text
arn = Text
a} :: SegmentResponse)
segmentResponse_applicationId :: Lens.Lens' SegmentResponse Prelude.Text
segmentResponse_applicationId :: (Text -> f Text) -> SegmentResponse -> f SegmentResponse
segmentResponse_applicationId = (SegmentResponse -> Text)
-> (SegmentResponse -> Text -> SegmentResponse)
-> Lens SegmentResponse SegmentResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentResponse' {Text
applicationId :: Text
$sel:applicationId:SegmentResponse' :: SegmentResponse -> Text
applicationId} -> Text
applicationId) (\s :: SegmentResponse
s@SegmentResponse' {} Text
a -> SegmentResponse
s {$sel:applicationId:SegmentResponse' :: Text
applicationId = Text
a} :: SegmentResponse)
instance Core.FromJSON SegmentResponse where
parseJSON :: Value -> Parser SegmentResponse
parseJSON =
String
-> (Object -> Parser SegmentResponse)
-> Value
-> Parser SegmentResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SegmentResponse"
( \Object
x ->
Maybe Text
-> Maybe SegmentGroupList
-> Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse
SegmentResponse'
(Maybe Text
-> Maybe SegmentGroupList
-> Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe SegmentGroupList
-> Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
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
"LastModifiedDate")
Parser
(Maybe SegmentGroupList
-> Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe SegmentGroupList)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SegmentGroupList)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SegmentGroups")
Parser
(Maybe Text
-> Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
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 Int
-> Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser
(Maybe SegmentImportResource
-> Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe SegmentImportResource)
-> Parser
(Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SegmentImportResource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImportDefinition")
Parser
(Maybe SegmentDimensions
-> Maybe (HashMap Text Text)
-> SegmentType
-> Text
-> Text
-> Text
-> Text
-> SegmentResponse)
-> Parser (Maybe SegmentDimensions)
-> Parser
(Maybe (HashMap Text Text)
-> SegmentType -> Text -> Text -> Text -> Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SegmentDimensions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Dimensions")
Parser
(Maybe (HashMap Text Text)
-> SegmentType -> Text -> Text -> Text -> Text -> SegmentResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(SegmentType -> Text -> Text -> Text -> Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(SegmentType -> Text -> Text -> Text -> Text -> SegmentResponse)
-> Parser SegmentType
-> Parser (Text -> Text -> Text -> Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SegmentType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SegmentType")
Parser (Text -> Text -> Text -> Text -> SegmentResponse)
-> Parser Text -> Parser (Text -> Text -> Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationDate")
Parser (Text -> Text -> Text -> SegmentResponse)
-> Parser Text -> Parser (Text -> Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
Parser (Text -> Text -> SegmentResponse)
-> Parser Text -> Parser (Text -> SegmentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
Parser (Text -> SegmentResponse)
-> Parser Text -> Parser SegmentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationId")
)
instance Prelude.Hashable SegmentResponse
instance Prelude.NFData SegmentResponse